24 #define NSIG NUM_SIGNALS 30 #include <sys/types.h> 31 #include <sys/times.h> 34 #include <sys/ioctl.h> 36 #include <sys/socket.h> 38 #include <netinet/in.h> 50 #if SunOS4_1 || (mips && !IRIX && !IRIX6) 52 #define IOC_VOID _IOC_VOID 53 #define IOC_IN _IOC_IN 54 #define IOC_OUT _IOC_OUT 55 #define IOC_INOUT _IOC_INOUT 62 #if Solaris2 || Linux || alpha 75 #include <sys/utsname.h> 76 #include <sys/types.h> 82 #include <sys/utsname.h> 112 t=
cons(ctx,mkbigint(et),t);
122 return(
makeint(buffer.tms_utime+buffer.tms_stime));}
135 tms=localtime((time_t *)&clock);
143 tz=
cons(ctx, tz0, tz);
153 tv[8]=(tms->tm_isdst>0)?
T:
NIL;
155 vpop(); vpop(); vpop();
163 struct tm tms1, *tms;
168 if (isintvector(argv[0])) tms=(
struct tm *)a->
c.
ivec.
iv;
169 else if (isvector(a)) {
170 tms1.tm_sec=ckintval(a->
c.
vec.
v[0]);
171 tms1.tm_min=ckintval(a->
c.
vec.
v[1]);
172 tms1.tm_hour=ckintval(a->
c.
vec.
v[2]);
173 tms1.tm_mday=ckintval(a->
c.
vec.
v[3]);
174 tms1.tm_mon=ckintval(a->
c.
vec.
v[4]);
175 tms1.tm_year=ckintval(a->
c.
vec.
v[5]);
176 tms1.tm_wday=ckintval(a->
c.
vec.
v[6]);
178 tms1.tm_isdst=(a->
c.
vec.
v[8]==
NIL)?0:1;
188 {
register int who,i;
194 ckarg(1); who=ckintval(argv[0]);
195 getrusage(who,rusage);
196 utime=rusage[0]+rusage[1]*1.0e-6;
197 stime=rusage[2]+rusage[3]*1.0e-6;
198 for (i=17; i>=4; i--) r=
cons(ctx,
makeint(rusage[i]),r);
209 return(
makeint(getpagesize())); }
223 gettimeofday(&tm, 0);
226 p=
cons(ctx, mkbigint(tm.tv_usec), p);
227 p=
cons(ctx, mkbigint(tm.tv_sec), p);
235 struct itimerval tmval;
236 float interval,value;
239 stat=getitimer(ckintval(argv[0]), &tmval);
240 if (stat<0)
return(
NIL);
241 interval=tmval.it_interval.tv_sec + ( tmval.it_interval.tv_usec*1.0E-6);
242 value=tmval.it_value.tv_sec + (tmval.it_value.tv_usec*1.0E-6);
252 struct itimerval tmval,oldtmval;
253 float interval,value;
258 tmval.it_value.tv_sec=value;
259 tmval.it_value.tv_usec=(value-tmval.it_value.tv_sec)*1.0E6;
260 tmval.it_interval.tv_sec=interval;
261 tmval.it_interval.tv_usec=(interval-tmval.it_interval.tv_sec)*1.0E6;
262 stat=setitimer(ckintval(argv[0]), &tmval, &oldtmval);
263 if (stat<0)
return(result);
264 interval=oldtmval.it_interval.tv_sec + (oldtmval.it_interval.tv_usec*1.0E-6);
265 value=oldtmval.it_value.tv_sec + (oldtmval.it_value.tv_usec*1.0E-6);
288 signum=ckintval(argv[1]);
289 if (isvector(argv[0]) &&
290 ((elmtypeof(argv[0])==ELM_INT) || (elmtypeof(argv[0])==ELM_BIT))) {
291 set=(sigset_t *)argv[0]->c.ivec.iv;
292 sigaddset(
set, signum);
304 signum=ckintval(argv[1]);
305 if (isvector(argv[0]) &&
306 ((elmtypeof(argv[0])==ELM_INT) || (elmtypeof(argv[0])==ELM_BIT))) {
307 set=(sigset_t *)argv[0]->c.ivec.iv;
308 sigdelset(
set, signum);
317 { sigset_t *
set, *oset;
320 how=ckintval(argv[0]);
321 if (isvector(argv[1]) &&
322 ((elmtypeof(argv[1])==ELM_INT) || (elmtypeof(argv[1])==ELM_BIT))) {
323 set=(sigset_t *)argv[1]->c.ivec.iv;
324 if (isvector(argv[2]) &&
325 ((elmtypeof(argv[2])==ELM_INT) || (elmtypeof(argv[2])==ELM_BIT)))
326 oset=(sigset_t *)argv[2]->
c.
ivec.
iv;
327 else oset=(sigset_t *)0;
328 stat=sigprocmask(how,
set, oset);
339 return(
makeint(kill(ckintval(argv[0]),ckintval(argv[1]))));}
341 #if Solaris2 || Linux || IRIX || IRIX6 352 s=
min(ckintval(argv[0]),NSIG-1);
354 if (n==1)
return(oldval);
357 sv.sa_handler= (void (*)())f;
361 for (i=0; i< _SIGSET_NWORDS; i++) sv.sa_mask.__val[i]=0;
368 #elif (IRIX || IRIX6) && !IRIX6_2
369 for (i=0; i<4; i++) sv.sa_mask.sigbits[i]=0;
371 for (i=0; i<4; i++) sv.sa_mask.__sigbits[i]=0;
374 if (n==3) sv.sa_flags= ckintval(argv[2]);
377 s=sigaction(s,&sv,0);
378 if (s== -1)
return(
makeint(-
errno));
else return(oldval);
392 s=
min(ckintval(argv[0]),NSIG-1);
394 if (
n==1)
return(oldval);
397 sv.sv_handler=(void (*)())f;
400 #if sun3 || sun4 || mips || alpha 401 if (
n==3) sv.sv_flags=ckintval(argv[2]);
405 if (s== -1)
return(
makeint(-
errno));
else return(oldval);
416 {
int completion=0, stat;
417 stat = wait(&completion);
425 return(
makeint(alarm(ckintval(argv[0]))));}
428 #if sun3 || sun4 || news || sanyo || alpha 434 return(
makeint(ualarm(ckintval(argv[0]), ckintval(argv[1]))));}
468 if (n==1) pid=ckintval(argv[0]);
470 return(
makeint(getpgrp(pid)));}
480 return(
makeint(setpgrp(ckintval(argv[0]),ckintval(argv[1]))));}
513 n=setuid(ckintval(argv[0]));
521 n=setgid(ckintval(argv[0]));
535 vpush(
makestring(u.sysname,strlen(u.sysname)));
536 vpush(
makestring(u.nodename,strlen(u.nodename)));
537 vpush(
makestring(u.release,strlen(u.release)));
538 vpush(
makestring(u.version,strlen(u.version)));
539 vpush(
makestring(u.machine,strlen(u.machine)));
566 #if sun3 || sun4 || vax || news || sanyo || (mips && !IRIX && !IRIX6) || i386 || alpha 579 {
byte *exeargv[512];
586 stat=execvp(exeargv[0],(
char **)exeargv);
598 return(
makeint(setpriority(ckintval(argv[0]),
600 ckintval(argv[2]))));}
608 return(
makeint(getpriority(ckintval(argv[0]), ckintval(argv[1]))));}
612 pointer EXIT(ctx,n,argv) 622 if (n==0) thr_exit(0);
623 else thr_exit(ckintval(argv[0]));
625 if (exithook !=
NIL) {
628 else exit(ckintval(argv[0]));
643 #if (WORD_SIZE == 64) 644 {
register int fd,offset=0;
645 register long int size;
647 {
register int fd,size,offset=0;
655 if (isfilestream(strm)) {
661 if (n==2) size=
min(strlength(buf),ckintval(argv[1]));
662 else size=strlength(buf);}
663 else if (isint(strm)) {
666 if (isvector(buf) && (elmtypeof(buf)==ELM_FOREIGN))
668 else if (isstring(buf)) bufp=buf->
c.
str.
chars;
670 if (n>=3) size=
min(strlength(buf),ckintval(argv[2]));
671 else size=strlength(buf);
672 if (n==4) offset=ckintval(argv[3]);}
674 size=read(fd, &bufp[offset],size);
676 if (isstream(strm)) {
688 register int size,fd;
693 if (isfilestream(strm)) {
697 else if (isint(strm)) fd=
intval(strm);
700 if (isvector(buf) && (elmtypeof(buf)==ELM_FOREIGN))
702 else if (isstring(buf)) bufp=buf->
c.
str.
chars;
705 if (n==3) size=
min(size,ckintval(argv[2]));
706 size=write(fd,bufp,size);
715 if (close(ckintval(argv[0]))==0)
return(
T);
else return(
makeint(
errno));}
723 int fd,func,size,result;
727 else if (isint(argv[0])) fd=
intval(argv[0]);
729 func= ckintval(argv[1]);
730 if (n==3) size=ckintval(argv[2]);
732 result=lockf(fd,func,size);
739 {
register pointer a=argv[0];
int fd,result;
743 else if (isint(argv[0])) fd=
intval(argv[0]);
745 result=fcntl(fd,ckintval(argv[1]),ckintval(argv[2]));
760 if (isfilestream(strm)) {
763 else fd=ckintval(argv[0]);
764 if (isint(argv[1])) request=ckintval(argv[1]);
766 else request=argv[1]->
c.
ivec.
iv[0];
767 if (isstring(argv[2])) ctlarg=(
eusinteger_t)(argv[2]->c.str.chars);
768 else ctlarg=ckintval(argv[2]);
769 return(
makeint(ioctl(fd,request,ctlarg)));
773 #if !vxworks && !Solaris2 776 {
register int s=vecsize(p);
777 switch (elmtypeof(p)) {
778 case ELM_BIT:
return((s+7)/8);
779 case ELM_BYTE:
case ELM_CHAR:
case ELM_FOREIGN:
return(s);
780 case ELM_FLOAT:
return(s*
sizeof(
float));
781 case ELM_INT:
return(s*
sizeof(
int));
782 default:
return(s*
sizeof(
pointer));}}
785 #define IOC_IN _IOC_READ 786 #define IOC_OUT _IOC_WRITE 787 #define IOC_INOUT (IOC_IN | IOC_OUT) 804 else fd=ckintval(strm);
806 x=ckintval(argv[1]); y=ckintval(argv[2]);
807 #if alpha || Linux_ppc 808 if (ioctl(fd,_IO(x, y), addr))
810 if (ioctl(fd,IOC_VOID | (size<<16) | (x<<8) | y, addr))
828 else fd=ckintval(strm);
830 x=ckintval(argv[1]); y=ckintval(argv[2]);
831 if (isstring(argv[3]) || isintvector(argv[3]))
834 if (n==5) size=ckintval(argv[4]);
837 if (ioctl(fd,_IOC(IOC_OUT, x, y, size), addr))
839 if (ioctl(fd,IOC_OUT | (size<<16) | (x<<8) | y, addr))
857 else fd=ckintval(strm);
859 x=ckintval(argv[1]); y=ckintval(argv[2]);
860 if (isstring(argv[3]) || isintvector(argv[3]))
863 if (n==5) size=ckintval(argv[4]);
865 #if alpha || Linux_ppc 866 if (ioctl(fd,_IOC(IOC_IN, x, y, size), addr))
868 if (ioctl(fd,IOC_IN | (size<<16) | (x<<8) | y, addr))
879 {
register pointer strm=argv[0];
886 else fd=ckintval(strm);
888 x=ckintval(argv[1]); y=ckintval(argv[2]);
889 if (isstring(argv[3]) || isintvector(argv[3]))
892 if (n==5) size=ckintval(argv[4]);
894 #if alpha || Linux_ppc 895 if (ioctl(fd,_IOC(IOC_INOUT, x, y, size), addr))
897 if (ioctl(fd,IOC_INOUT | (size <<16) | (x<<8) | y, addr))
913 oldfd=ckintval(argv[0]);
921 {
int newfd,oldfd,stat;
923 newfd=ckintval(argv[0]);
924 oldfd=ckintval(argv[1]);
925 stat=dup2(newfd,oldfd);
934 stat=mknod((
char *)
Getstring(argv[0])->c.str.chars,ckintval(argv[1]),0);
944 if (n==2) mode=ckintval(argv[1]);
else mode=0775;
945 stat=mkdir((
char *)
Getstring(argv[0])->c.str.chars,mode);
991 stat=rename((
char *)from,(
char *) to);
1003 if (n==2) mode=ckintval(argv[1]);
else mode=0;
1026 a=
cons(ctx,mkbigint(s.st_ctime),
NIL);
1027 a=
cons(ctx,mkbigint(s.st_mtime),a);
1028 a=
cons(ctx,mkbigint(s.st_atime),a);
1040 #if Solaris2 || linux || alpha 1054 struct dirent *direntp;
1059 dirp = opendir((
char *)s);
1060 while ( (direntp = readdir( dirp )) !=
NULL ){
1061 str=direntp->d_name;
1074 printf(
"Not Implemented!");
1086 if (n==3) whence=ckintval(argv[2]);
else whence=0;
1089 if (isfilestream(strm)){
1094 return(
makeint(lseek(
intval(fd),ckintval(argv[1]),whence))); }
1102 {
register int stat;
1104 stat=chdir(
Getstring(argv[0])->c.str.chars);
1116 mode=ckintval(argv[1]);
1117 stat=chmod((
char *)path,mode);
1126 int owner,newowner,stat;
1129 owner=ckintval(argv[1]);
1130 newowner=ckintval(argv[2]);
1131 stat=chown(path,owner,newowner);
1139 {
int pfd[2],stat,size;
1140 register pointer instream,outstream;
1143 if (n==1) size=ckintval(argv[0]);
else size=128;
1159 {
register int key,qid,mode;
1161 key=ckintval(argv[0]);
1162 if (n==2) mode=ckintval(argv[1]);
else mode=0666;
1163 qid=msgget(key,IPC_CREAT | (mode & 0777));
1170 {
register int qid,mtype,flag,stat;
1173 qid=ckintval(argv[0]);
1176 if (n>=3) mtype=ckintval(argv[2]);
else mtype=0;
1177 if (n==4)
if (argv[3]==
NIL) flag=0;
else flag=IPC_NOWAIT;
1183 if (stat<0) { breakck;
goto rcv_again;}
1193 {
register int qid,msize,mtype,flag,stat;
1196 qid=ckintval(argv[0]);
1201 msize=ckintval(argv[2]);
1203 else msize=
intval(lsave);
1204 if (n>=4) mtype=ckintval(argv[3]);
else mtype=
mypid;
1205 if (n==5)
if (argv[4]==
NIL) flag=0;
else flag=IPC_NOWAIT;
1208 stat=msgsnd(qid,(
struct msgbuf *)&buf->
c.
str.
length,msize,flag);
1217 {
int qid,cmnd,stat;
1220 qid=ckintval(argv[0]); cmnd=ckintval(argv[1]);
1223 stat=msgctl(qid,cmnd,(
struct msqid_ds *)buf);
1242 if (n==0) stat=system(
"csh");
1243 else if (isstring(argv[0])) stat=system((
char *)argv[0]->c.str.chars);
1245 signal(SIGCHLD,(
void (*)())s);
1254 #if Solaris2 || Linux 1265 {
register char *envval;
1268 if (envval)
return(
makestring(envval,strlen(envval)));
1271 #if sun3 || sun4 || vax || mips || i386 || alpha 1281 b= (
char *)malloc(vecsize(a)+1);
1288 {
extern char **environ;
1292 while (b=environ[count++]) {
1301 sleep(ckintval(argv[0]));
1304 #if sun3 || sun4 && !Solaris2 || Linux || alpha 1310 usleep(ckintval(argv[0]));
1328 n=ckintval(argv[0]);
1332 return(
makestring(errstr, strlen(errstr))); }
1352 else fd=ckintval(a);
1353 if (isatty(fd))
return(
T);
else return(
NIL);}
1369 if (n==3) proto=ckintval(argv[2]);
1371 s=socket(ckintval(argv[0]),ckintval(argv[1]),proto);
1381 struct sockaddr *sa;
1384 s=ckintval(argv[0]);
1386 sa= (
struct sockaddr *)(argv[1]->c.str.chars);
1387 if (sa->sa_family==AF_UNIX) l=strlen(sa->sa_data)+2;
1388 else l=
sizeof(
struct sockaddr_in);
1389 s=(int)bind(s, sa, l);
1397 struct sockaddr *sa;
1399 s=ckintval(argv[0]);
1401 sa= (
struct sockaddr *)(argv[1]->c.str.chars);
1402 if (sa->sa_family==AF_UNIX) l=strlen(sa->sa_data)+2;
1403 else l=
sizeof(
struct sockaddr_in);
1404 s=(int)connect(s, sa, l);
1415 if (n==2) backlog=ckintval(argv[1]);
1417 stat=listen(ckintval(argv[0]),backlog);
1427 struct sockaddr sockun;
1429 struct sockaddr_un sockun;
1434 s=ckintval(argv[0]);
1435 ns=accept(s, (
struct sockaddr *)&sockun, &len);
1449 {
int len,
sock, flags, stat;
1452 sock=ckintval(argv[0]);
1455 if (n>=4) len=ckintval(argv[3]);
else len=vecsize(msg);
1456 if (n>=5) flags=ckintval(argv[4]);
else flags=0;
1457 stat=sendto(sock, (
char *)msg->
c.
str.
chars, len, flags,
1458 (
struct sockaddr *)addr->
c.
str.
chars, vecsize(addr));
1459 if (stat<0) stat= -
errno;
1471 {
int len=2000,
sock, flags, stat, addrlen;
1472 unsigned char buf[2000], *bufp=
buf, *addrp=
NULL;
1475 sock=ckintval(argv[0]);
1484 addrlen=vecsize(addr);
1486 if (n>=4) flags=ckintval(argv[3]);
else flags=0;
1487 stat=recvfrom(
sock, (
char *)bufp, len, flags, (
struct sockaddr *)addrp, &addrlen);
1491 if (n<2)
return(
makestring((
char *)bufp,stat));
1502 stat=getpeername(ckintval(argv[0]), (
struct sockaddr *)name, &namelen);
1510 {
if (a==
NIL) { *size=0;
return(0);}
1512 switch(elmtypeof(a)) {
1513 case ELM_BIT: *size=vecsize(a);
return(a->
c.
ivec.
iv);
1514 case ELM_INT: *size=vecsize(a) * WORD_SIZE;
return(a->
c.
ivec.
iv);
1515 case ELM_BYTE:
case ELM_CHAR:
1516 *size=vecsize(a) * 8;
return(a->
c.
ivec.
iv);
1527 long i, maxwidth, width,size0, size1, size2;
1528 fd_set *readfds, *writefds, *exceptfds;
1537 maxwidth=
min(256,
max(
max(size0, size1), size2));
1545 for (i=0; i<maxwidth; i++) {
1546 if (readfds && FD_ISSET(i, readfds)) width=i;
1547 if (writefds && FD_ISSET(i, writefds)) width=i;
1548 if (exceptfds && FD_ISSET(i, exceptfds)) width=i;}
1553 i=select(width, readfds, writefds, exceptfds,0);
1556 timeout=timeout-to.tv_sec;
1557 timeout=timeout*1000000;
1559 i=select(width, readfds, writefds, exceptfds,&to);}
1567 {
struct timeval to;
1569 long i, size, width, fds;
1574 if (isint(argv[0])) {
1576 fdvec=(fd_set *)&fds;
1580 for (i=0; i<size; i++)
if (FD_ISSET(i, fdvec)) width=i;
1584 if (timeout==0.0) n=select(width, fdvec, 0, 0, 0);
1587 timeout=timeout-to.tv_sec;
1588 timeout=timeout*1000000;
1590 n=select(width, fdvec, 0, 0, &to);}
1592 if (isint(argv[0])) {
1596 else return(argv[0]); }
1608 {
return(
makeint(sbrk(ckintval(argv[0]))));}
1613 {
return(
makeint(malloc(ckintval(argv[0]))));}
1618 { free((
void *)ckintval(argv[0]));
1621 #if sun3 || sun4 || news || alpha 1625 {
return(
makeint(valloc(ckintval(argv[0]))));}
1628 #if sun3 || sun4 || news || alpha || Linux 1640 else fd=ckintval(strm);
1641 len=ckintval(argv[1]);
1642 if (isintvector(argv[5]))
1644 else offset=ckintval(argv[5]);
1645 result=(
eusinteger_t)mmap((caddr_t)ckintval(argv[0]), len,
1646 ckintval(argv[2]), ckintval(argv[3]), fd, offset);
1653 {
return(
makeint(munmap((caddr_t)ckintval(argv[0]),ckintval(argv[1]))));}
1673 {
char buf[32];
int stat;
1674 stat=gethostname(buf,32);
1675 if (stat==0)
return(
makestring(buf,strlen(buf)));
1682 {
register struct hostent *hp;
1686 hp=gethostbyname((
char *)
Getstring(argv[0])->c.str.chars);
1697 struct hostent *host;
1700 host=gethostbyaddr((
char *)addr->
c.
str.
chars, vecsize(addr), 2);
1702 else return(
makestring(host->h_name, strlen(host->h_name)));}
1708 {
struct netent *np;
1710 np=getnetbyname((
char *)
Getstring(argv[0])->c.str.chars);
1719 {
struct protoent *pp;
1721 pp=getprotobyname((
char *)
Getstring(argv[0])->c.str.chars);
1723 return(
makeint(pp->p_proto));}
1729 {
struct servent *sp;
1737 sp=getservbyname((
char *)
Getstring(argv[0])->c.str.chars,(
char *)p);
1739 s=
makestring(sp->s_proto,strlen(sp->s_proto));
1741 port = ntohs(sp->s_port);
1753 unsigned short netshort;
1755 hostshort=ckintval(argv[0]);
1756 netshort=htons((
short)hostshort);
1764 unsigned short netshort;
1766 netshort=ckintval(argv[0]);
1767 hostshort=ntohs((
short)netshort);
1791 dbm=dbm_open(
Getstring(argv[0])->c.str.chars,
1801 dbm_close(ckintval(argv[0]));
1813 key.dsize=strlength(s);
1814 content=dbm_fetch(ckintval(argv[0]), key);
1815 if (content.dptr==
NULL)
return(
NIL);
1816 return(
makestring(content.dptr,content.dsize));}
1827 key.dsize=strlength(s);
1830 content.dsize=strlength(s);
1831 n=dbm_store(ckintval(argv[0]), key, content, ckintval(argv[3]));
1832 return((n==0)?
T:
NIL);}
1843 key.dsize=strlength(s);
1844 n=dbm_delete(ckintval(argv[0]), key);
1845 return((n==0)?
T:
NIL);}
1853 key=dbm_firstkey(ckintval(argv[0]), key);
1854 if (key.dptr==
NULL)
return(
NIL);
1863 key=dbm_nextkey(ckintval(argv[0]), key);
1864 if (key.dptr==
NULL)
return(
NIL);
1872 n=dbm_error((DBM *)ckintval(argv[0]));
1873 return((n==0)?
T:
NIL);}
1880 dbm_clearerr((DBM *)ckintval(argv[0]));
1941 #if sun3 || sun4 || news || sanyo || alpha 2009 #if sun3 || sun4 || vax || news || sanyo || (mips && !IRIX && !IRIX6) || i386 || alpha 2018 #if sun3 || sun4 || vax || mips || i386 || alpha 2021 #if sun3 || sun4 && !Solaris2 || Linux || alpha 2032 #if sun3 || sun4 || news || alpha 2035 #if sun3 || sun4 || news || alpha || Linux 2041 #if system5 || Linux
pointer GETITIMER(context *ctx, int n, argv)
pointer IOCTL_(context *, int, pointer *)
pointer N2HS(context *, int, pointer *)
pointer GETEUID(context *ctx, int n, argv)
static pointer SETPRIORITY(context *ctx, int n, pointer *argv)
pointer GETENV(context *, int, pointer *)
pointer SETPGRP(context *, int, pointer *)
pointer ASCTIME(context *ctx, int n, argv)
pointer PAUSE(context *, int, pointer *)
pointer RMDIR(context *, int, pointer *)
pointer UNIXWRITE(context *, int, pointer *)
pointer UNIXCLOSE(context *, int, pointer *)
pointer ACCESS(context *, int, pointer *)
pointer LOCKF(context *, int, pointer *)
pointer DBM_CLOSE(context *ctx, int n, argv)
pointer FORK(context *ctx, int n, pointer *argv)
pointer ALARM(context *ctx, int n, argv)
pointer FCNTL(context *, int, pointer *)
pointer SBRK(context *, int, pointer *)
pointer cons(context *, pointer, pointer)
struct filestream fstream
pointer mkfilestream(context *, pointer, pointer, int, pointer)
pointer MSGCTL(context *, int, pointer *)
pointer WAIT(context *ctx, int n, argv)
pointer GETHOSTBYNAME(context *, int, pointer *)
pointer DBM_STORE(context *ctx, int n, argv)
pointer GETPPID(context *ctx, int n, argv)
pointer SENDTO(context *, int, pointer *)
pointer PUTENV(context *, int, pointer *)
pointer RECVFROM(context *, int, pointer *)
pointer SYSERRLIST(context *, int, pointer *)
pointer MKDIR(context *, int, pointer *)
pointer PTIMES(context *ctx, int n, argv)
pointer RUNTIME(context *ctx, int n, argv)
pointer H2NS(context *, int, pointer *)
pointer MSGGET(context *, int, pointer *)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
eusinteger_t * checkbitvec(pointer, long *)
pointer SETITIMER(context *ctx, int n, argv)
pointer ufuncall(context *, pointer, pointer, pointer, struct bindframe *, int)
pointer SETUID(context *ctx, int n, argv)
pointer DUP2(context *, int, pointer *)
pointer MKNOD(context *, int, pointer *)
pointer LINK(context *, int, pointer *)
pointer EXIT(context *ctx, int n, pointer *argv)
pointer MSGSND(context *, int, pointer *)
pointer LISTEN(context *, int, pointer *)
pointer GETGID(context *ctx, int n, argv)
pointer makevector(pointer, int)
pointer UALARM(context *ctx, int n, argv)
int coerceintval(pointer)
pointer GETSERVBYNAME(context *, int, pointer *)
pointer RENAME(context *, int, pointer *)
pointer SIGNAL(context *ctx, int n, argv)
pointer DBM_OPEN(context *ctx, int n, argv)
pointer DBM_NEXTKEY(context *ctx, int n, argv)
pointer GETHOSTNAME(context *, int, pointer *)
static void key(unsigned char c, int x, int y)
pointer SIGDELSET(context *ctx, int n, argv)
pointer ENVIRON(context *, int, pointer *)
pointer FORK1(context *ctx, int n, pointer *argv)
pointer MALLOC(context *, int, pointer *)
pointer CHMOD(context *, int, pointer *)
pointer GETNETBYNAME(context *, int, pointer *)
pointer IOCTL_R(context *, int, pointer *)
pointer GETRUSAGE(context *ctx, int n, argv)
pointer mkiostream(context *, pointer, pointer)
pointer ERRNO(context *, int, pointer *)
static pointer GETPRIORITY(context *ctx, int n, pointer *argv)
void unixcall(context *, pointer)
pointer GETUID(context *ctx, int n, pointer *argv)
pointer USLEEP(context *, int, pointer *)
pointer UNIXREAD(context *ctx, int n, argv)
pointer CHDIR(context *, int, pointer *)
pointer GETWD(context *, int, pointer *)
pointer IOCTL_W(context *, int, pointer *)
pointer SELECT_READ(context *, int, pointer *)
pointer GETEGID(context *ctx, int n, argv)
pointer IOCTL(context *, int, pointer *)
pointer PIPE(context *, int, pointer *)
pointer UNAME(context *ctx, int n, pointer *argv)
pointer GETHOSTBYADDR(context *, int, pointer *)
pointer SIGPROCMASK(context *ctx, int n, argv)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer SYSTEM(context *, int, pointer *)
pointer DBM_FETCH(context *ctx, int n, argv)
pointer DBM_FIRSTKEY(context *ctx, int n, argv)
pointer DIRECTORY(context *, int, pointer *)
pointer GETPAGESIZE(context *ctx, int n, argv)
pointer UNLINK(context *, int, pointer *)
pointer VFORK(context *ctx, int n, pointer *argv)
pointer stacknlist(context *, int)
pointer GETPEERNAME(context *, int, pointer *)
pointer ISATTY(context *, int, pointer *)
pointer MMAP(context *, int, pointer *)
pointer SELECT(context *, int, pointer *)
pointer ACCEPT(context *, int, pointer *)
pointer FREE(context *, int, pointer *)
void eusint(int s, int code, int x, eusinteger_t addr)
pointer GETPID(context *ctx, int n, pointer *argv)
pointer makestring(char *, int)
pointer MSGRCV(context *, int, pointer *)
pointer GETPGRP(context *ctx, int n, argv)
pointer CHOWN(context *, int, pointer *)
pointer DUP(context *, int, pointer *)
pointer DBM_ERROR(context *ctx, int n, argv)
pointer KILL(context *ctx, int n, argv)
pointer LSEEK(context *, int, pointer *)
pointer EXEC(context *ctx, int n, pointer *argv)
pointer IOCTL_WR(context *, int, pointer *)
pointer SOCKET(context *, int, pointer *)
pointer LOCALTIME(context *ctx, n, argv)
pointer make_foreign_string(eusinteger_t, int)
pointer GETTIMEOFDAY(context *ctx, int n, argv)
pointer BIND(context *, int, pointer *)
static char buf[CHAR_SIZE]
pointer CONNECT(context *, int, pointer *)
pointer SLEEP(context *, int, pointer *)
pointer MUNMAP(context *, int, pointer *)
pointer DBM_DELETE(context *ctx, int n, argv)
pointer GETPROTOBYNAME(context *, int, pointer *)
pointer STAT(context *, int, pointer *)
pointer SETGID(context *ctx, int n, argv)
pointer SIGADDSET(context *ctx, int n, argv)
pointer DBM_CLEARERR(context *ctx, int n, argv)