#define round(x,s) ((((x)-1) & ~((s)-1)) + (s))
register struct argent
*mlbot
= lbot
;
int fildes
, totsize
, readsize
;
char *sbrk(), *currend
, *tfile
, cbuf
[512], *mytemp(), *gstab();
if(np
- mlbot
!= 3 || TYPE(mlbot
[1].val
)!=ATOM
)
mlbot
[1].val
= error("Incorrect .o file specification",TRUE
);
if(np
- mlbot
!= 3 || TYPE(mlbot
[2].val
)!=ATOM
)
mlbot
[2].val
= error("Incorrect entry specification for fasl"
if(np
- mlbot
!= 3 || TYPE(mlbot
[3].val
)!=ATOM
|| mlbot
[3].val
==nil
)
mlbot
[3].val
= error( "Bad associated atom name for fasl",TRUE
);
"nld -A %s -T %x -N %s -e %s -o %s",
printf(cbuf
); fflush(stdout
);
if((fildes
= open(tfile
,0))<0)
* Read a.out header to find out how much room to
* allocate and attempt to do so.
if(read(fildes
,(char *)&header
,sizeof(header
)) <= 0) {
readsize
= header
.a_text
+ header
.a_data
;
totsize
= readsize
+ header
.a_bss
;
totsize
= round(totsize
,512);
* Fix up system indicators, typing info, etc.
currend
= (char *)csegment(int_name
,totsize
/4);
if(readsize
!=read(fildes
,currend
,readsize
))
work
->entry
= (lispval (*)())header
.a_entry
;
work
->discipline
= lambda
;
return(mlbot
[3].val
->fnbnd
= work
);
register char *cp
, *cp2
; char *getenv();
cp
=":/usr/ucb:/bin:/usr/bin";
if(stat(Xargv
[0],&stbuf
)==0) {
/* copy over current directory
and then append argv[0] */
for(cp2
=myname
;(*cp
)!=0 && (*cp
)!=':';)
if(0!=stat(myname
,&stbuf
)) continue;
error("Could not find which file is being executed.",FALSE
);