24 #define NSIG NUM_SIGNALS 30 #include <sys/types.h> 31 #include <sys/times.h> 34 #include <sys/ioctl.h> 37 #include <sys/socket.h> 39 #include <netinet/in.h> 52 #if (SunOS4_1 || (mips && !IRIX && !IRIX6)) && !Linux 54 #define IOC_VOID _IOC_VOID 55 #define IOC_IN _IOC_IN 56 #define IOC_OUT _IOC_OUT 57 #define IOC_INOUT _IOC_INOUT 64 #if Solaris2 || Linux || alpha || Cygwin 77 #include <sys/utsname.h> 78 #include <sys/types.h> 83 #if system5 || Linux || Cygwin 84 #include <sys/utsname.h> 115 t=
cons(ctx,mkbigint(et),t);
125 return(
makeint(buffer.tms_utime+buffer.tms_stime));}
140 tms=localtime_r((time_t *)&clock,&res);
145 if (getenv(
"TZ")==
NULL) {
156 tz=
cons(ctx, tz0, tz);
166 tv[8]=(tms->tm_isdst>0)?
T:
NIL;
168 vpop(); vpop(); vpop();
176 struct tm tms1, *tms;
179 #define ASCTIME_STRLEN 30 180 char at[ASCTIME_STRLEN];
183 if (isintvector(argv[0])) tms=(
struct tm *)a->
c.
ivec.
iv;
184 else if (isvector(a)) {
185 tms1.tm_sec=ckintval(a->
c.
vec.
v[0]);
186 tms1.tm_min=ckintval(a->
c.
vec.
v[1]);
187 tms1.tm_hour=ckintval(a->
c.
vec.
v[2]);
188 tms1.tm_mday=ckintval(a->
c.
vec.
v[3]);
189 tms1.tm_mon=ckintval(a->
c.
vec.
v[4]);
190 tms1.tm_year=ckintval(a->
c.
vec.
v[5]);
191 tms1.tm_wday=ckintval(a->
c.
vec.
v[6]);
193 tms1.tm_isdst=(a->
c.
vec.
v[8]==
NIL)?0:1;
196 #if defined(__USE_POSIX) || Cygwin || Linux 197 atp=asctime_r(tms,at);
199 atp=asctime_r(tms,at,ASCTIME_STRLEN);
204 #include <sys/resource.h> 208 {
register int who,i;
214 ckarg(1); who=ckintval(argv[0]);
215 getrusage(who,(
struct rusage *)rusage);
216 utime=rusage[0]+rusage[1]*1.0e-6;
217 stime=rusage[2]+rusage[3]*1.0e-6;
218 for (i=17; i>=4; i--) r=
cons(ctx,
makeint(rusage[i]),r);
229 return(
makeint(getpagesize())); }
243 gettimeofday(&tm, 0);
248 p=
cons(ctx, mkbigint(tm.tv_sec), p);
257 struct itimerval tmval;
261 stat=getitimer(ckintval(argv[0]), &tmval);
262 if (stat<0)
return(
NIL);
263 interval=tmval.it_interval.tv_sec + ( tmval.it_interval.tv_usec*1.0E-6);
264 value=tmval.it_value.tv_sec + (tmval.it_value.tv_usec*1.0E-6);
274 struct itimerval tmval,oldtmval;
280 tmval.it_value.tv_sec=value;
281 tmval.it_value.tv_usec=(value-tmval.it_value.tv_sec)*1.0E6;
282 tmval.it_interval.tv_sec=interval;
283 tmval.it_interval.tv_usec=(interval-tmval.it_interval.tv_sec)*1.0E6;
284 stat=setitimer(ckintval(argv[0]), &tmval, &oldtmval);
285 if (stat<0)
return(result);
286 interval=oldtmval.it_interval.tv_sec + (oldtmval.it_interval.tv_usec*1.0E-6);
287 value=oldtmval.it_value.tv_sec + (oldtmval.it_value.tv_usec*1.0E-6);
310 signum=ckintval(argv[1]);
311 if (isvector(argv[0]) &&
312 ((elmtypeof(argv[0])==ELM_INT) || (elmtypeof(argv[0])==ELM_BIT))) {
313 set=(sigset_t *)argv[0]->c.ivec.iv;
314 sigaddset(
set, signum);
326 signum=ckintval(argv[1]);
327 if (isvector(argv[0]) &&
328 ((elmtypeof(argv[0])==ELM_INT) || (elmtypeof(argv[0])==ELM_BIT))) {
329 set=(sigset_t *)argv[0]->c.ivec.iv;
330 sigdelset(
set, signum);
339 { sigset_t *
set, *oset;
342 how=ckintval(argv[0]);
343 if (isvector(argv[1]) &&
344 ((elmtypeof(argv[1])==ELM_INT) || (elmtypeof(argv[1])==ELM_BIT))) {
345 set=(sigset_t *)argv[1]->c.ivec.iv;
346 if (isvector(argv[2]) &&
347 ((elmtypeof(argv[2])==ELM_INT) || (elmtypeof(argv[2])==ELM_BIT)))
348 oset=(sigset_t *)argv[2]->
c.
ivec.
iv;
349 else oset=(sigset_t *)0;
350 stat=sigprocmask(how,
set, oset);
361 return(
makeint(kill(ckintval(argv[0]),ckintval(argv[1]))));}
363 #if Solaris2 || Linux || IRIX || IRIX6 || Cygwin 375 s=
min(ckintval(argv[0]),NSIG-1);
377 if (
n==1)
return(oldval);
380 sv.sa_handler= (void (*)())f;
384 for (j=0; j< _SIGSET_NWORDS; j++) sv.sa_mask.__val[j]=0;
391 #elif (IRIX || IRIX6) && !IRIX6_2
392 for (i=0; i<4; i++) sv.sa_mask.sigbits[i]=0;
394 for (i=0; i<4; i++) sv.sa_mask.__sigbits[i]=0;
397 if (
n==3) sv.sa_flags= ckintval(argv[2]);
400 s=sigaction(s,&sv,0);
401 if (s== -1)
return(
makeint(-
errno));
else return(oldval);
415 s=
min(ckintval(argv[0]),NSIG-1);
417 if (
n==1)
return(oldval);
420 sv.sv_handler=(void (*)())f;
423 #if sun3 || sun4 || mips || alpha 424 if (
n==3) sv.sv_flags=ckintval(argv[2]);
428 if (s== -1)
return(
makeint(-
errno));
else return(oldval);
435 #include <sys/wait.h> 440 {
int completion=0, stat;
449 return(
makeint(alarm(ckintval(argv[0]))));}
452 #if sun3 || sun4 || news || sanyo || alpha || Linux 458 return(
makeint(ualarm(ckintval(argv[0]), ckintval(argv[1]))));}
487 #if system5 | Linux | Cygwin 492 if (
n==1) pid=ckintval(argv[0]);
494 return(
makeint(getpgrp(pid)));}
498 #if system5 | Linux | Cygwin 504 return(
makeint(setpgrp(ckintval(argv[0]),ckintval(argv[1]))));}
537 n=setuid(ckintval(argv[0]));
545 n=setgid(ckintval(argv[0]));
550 #if system5 || Linux || Cygwin 559 vpush(
makestring(u.sysname,strlen(u.sysname)));
560 vpush(
makestring(u.nodename,strlen(u.nodename)));
561 vpush(
makestring(u.release,strlen(u.release)));
562 vpush(
makestring(u.version,strlen(u.version)));
563 vpush(
makestring(u.machine,strlen(u.machine)));
572 #if !Solaris2 || !THREADED 589 for (i=0; i<MAXTHREAD; i++) {
598 for (i=0; i<MAXTHREAD; i++) {
626 #if sun3 || sun4 || vax || news || sanyo || (mips && !IRIX && !IRIX6) || alpha || Linux 639 {
byte *exeargv[512];
646 stat=execvp(exeargv[0],(
char **)exeargv);
658 return(
makeint(setpriority(ckintval(argv[0]),
660 ckintval(argv[2]))));}
668 return(
makeint(getpriority(ckintval(argv[0]), ckintval(argv[1]))));}
672 pointer EXIT(ctx,n,argv) 682 if (n==0) thr_exit(0);
683 else thr_exit(ckintval(argv[0]));
685 if (exithook !=
NIL) {
688 else exit(ckintval(argv[0]));
698 else _exit(ckintval(argv[0]));
711 #if (WORD_SIZE == 64) 712 {
register int fd,offset=0;
713 register long int size;
715 {
register int fd,size,offset=0;
723 if (isfilestream(strm)) {
729 if (n==2) size=
min(strlength(buf),ckintval(argv[1]));
730 else size=strlength(buf);}
731 else if (isint(strm)) {
734 if (isvector(buf) && (elmtypeof(buf)==ELM_FOREIGN))
736 else if (isstring(buf)) bufp=buf->
c.
str.
chars;
738 if (n>=3) size=
min(strlength(buf),ckintval(argv[2]));
739 else size=strlength(buf);
740 if (n==4) offset=ckintval(argv[3]);}
742 GC_REGION(size=read(fd, &bufp[offset],size););
744 if (isstream(strm)) {
756 register int size,fd;
761 if (isfilestream(strm)) {
765 else if (isint(strm)) fd=
intval(strm);
768 if (isvector(buf) && (elmtypeof(buf)==ELM_FOREIGN))
770 else if (isstring(buf)) bufp=buf->
c.
str.
chars;
773 if (n==3) size=
min(size,ckintval(argv[2]));
774 size=write(fd,bufp,size);
783 if (close(ckintval(argv[0]))==0)
return(
T);
else return(
makeint(
errno));}
792 int fd,func,size,result;
796 else if (isint(argv[0])) fd=
intval(argv[0]);
798 func= ckintval(argv[1]);
799 if (n==3) size=ckintval(argv[2]);
801 result=lockf(fd,func,size);
810 {
register pointer a=argv[0];
int fd,result;
814 else if (isint(argv[0])) fd=
intval(argv[0]);
816 result=fcntl(fd,ckintval(argv[1]),ckintval(argv[2]));
831 if (isfilestream(strm)) {
834 else fd=ckintval(argv[0]);
835 if (isint(argv[1])) request=ckintval(argv[1]);
837 else request=argv[1]->
c.
ivec.
iv[0];
838 if (isstring(argv[2])) ctlarg=(
eusinteger_t)(argv[2]->c.str.chars);
839 else ctlarg=ckintval(argv[2]);
840 return(
makeint(ioctl(fd,request,ctlarg)));
844 #if !vxworks && !Solaris2 847 {
register int s=vecsize(p);
848 switch (elmtypeof(p)) {
849 case ELM_BIT:
return((s+7)/8);
850 case ELM_BYTE:
case ELM_CHAR:
case ELM_FOREIGN:
return(s);
851 case ELM_FLOAT:
return(s*
sizeof(
float));
852 case ELM_INT:
return(s*
sizeof(
int));
853 default:
return(s*
sizeof(
pointer));}}
856 #define IOC_IN _IOC_READ 857 #define IOC_OUT _IOC_WRITE 858 #define IOC_INOUT (IOC_IN | IOC_OUT) 875 else fd=ckintval(strm);
877 x=ckintval(argv[1]); y=ckintval(argv[2]);
878 #if alpha || Linux_ppc 879 if (ioctl(fd,_IO(x, y), addr))
881 if (ioctl(fd,IOC_VOID | (size<<16) | (x<<8) | y, addr))
899 else fd=ckintval(strm);
901 x=ckintval(argv[1]); y=ckintval(argv[2]);
902 if (isstring(argv[3]) || isintvector(argv[3]))
905 if (n==5) size=ckintval(argv[4]);
908 if (ioctl(fd,_IOC(IOC_OUT, x, y, size), addr))
910 if (ioctl(fd,IOC_OUT | (size<<16) | (x<<8) | y, addr))
928 else fd=ckintval(strm);
930 x=ckintval(argv[1]); y=ckintval(argv[2]);
931 if (isstring(argv[3]) || isintvector(argv[3]))
934 if (n==5) size=ckintval(argv[4]);
936 #if alpha || Linux_ppc 937 if (ioctl(fd,_IOC(IOC_IN, x, y, size), addr))
939 if (ioctl(fd,IOC_IN | (size<<16) | (x<<8) | y, addr))
951 {
register pointer strm=argv[0];
958 else fd=ckintval(strm);
960 x=ckintval(argv[1]); y=ckintval(argv[2]);
961 if (isstring(argv[3]) || isintvector(argv[3]))
964 if (n==5) size=ckintval(argv[4]);
966 #if alpha || Linux_ppc 967 if (ioctl(fd,_IOC(IOC_INOUT, x, y, size), addr))
969 if (ioctl(fd,IOC_INOUT | (size <<16) | (x<<8) | y, addr))
986 oldfd=ckintval(argv[0]);
994 {
int newfd,oldfd,stat;
996 newfd=ckintval(argv[0]);
997 oldfd=ckintval(argv[1]);
998 stat=dup2(newfd,oldfd);
1007 stat=mknod((
char *)
Getstring(argv[0])->c.str.chars,ckintval(argv[1]),0);
1017 if (n==2) mode=ckintval(argv[1]);
else mode=0775;
1018 stat=mkdir((
char *)
Getstring(argv[0])->c.str.chars,mode);
1064 stat=rename((
char *)from,(
char *) to);
1076 if (n==2) mode=ckintval(argv[1]);
else mode=0;
1099 a=
cons(ctx,mkbigint(s.st_ctime),
NIL);
1100 a=
cons(ctx,mkbigint(s.st_mtime),a);
1101 a=
cons(ctx,mkbigint(s.st_atime),a);
1113 #if Solaris2 || Linux || alpha || Cygwin 1127 struct dirent *direntp;
1132 if ( (dirp = opendir((
char *)s)) ==
NULL )
return (
NIL);
1133 while ( (direntp = readdir( dirp )) !=
NULL ){
1134 str=direntp->d_name;
1147 printf(
"Not Implemented!");
1159 if (n==3) whence=ckintval(argv[2]);
else whence=0;
1162 if (isfilestream(strm)){
1167 ret=lseek(
intval(fd),ckintval(argv[1]),whence);
1168 if (ret==-1) perror(
"lseek");
1177 {
register int stat;
1179 stat=chdir(
Getstring(argv[0])->c.str.chars);
1191 mode=ckintval(argv[1]);
1192 stat=chmod((
char *)path,mode);
1201 int owner,newowner,stat;
1204 owner=ckintval(argv[1]);
1205 newowner=ckintval(argv[2]);
1206 stat=chown(path,owner,newowner);
1214 {
int pfd[2],stat,size;
1215 register pointer instream,outstream;
1218 if (n==1) size=ckintval(argv[0]);
else size=128;
1234 {
register int key,qid,mode;
1236 key=ckintval(argv[0]);
1237 if (n==2) mode=ckintval(argv[1]);
else mode=0666;
1238 qid=msgget(key,IPC_CREAT | (mode & 0777));
1245 {
register int qid,mtype,flag,stat;
1248 qid=ckintval(argv[0]);
1251 if (n>=3) mtype=ckintval(argv[2]);
else mtype=0;
1252 if (n==4)
if (argv[3]==
NIL) flag=0;
else flag=IPC_NOWAIT;
1258 if (stat<0) { breakck;
goto rcv_again;}
1268 {
register int qid,msize,mtype,flag,stat;
1271 qid=ckintval(argv[0]);
1276 msize=ckintval(argv[2]);
1278 else msize=
intval(lsave);
1279 if (n>=4) mtype=ckintval(argv[3]);
else mtype=
mypid;
1280 if (n==5)
if (argv[4]==
NIL) flag=0;
else flag=IPC_NOWAIT;
1283 stat=msgsnd(qid,(
struct msgbuf *)&buf->
c.
str.
length,msize,flag);
1292 {
int qid,cmnd,stat;
1295 qid=ckintval(argv[0]); cmnd=ckintval(argv[1]);
1298 stat=msgctl(qid,cmnd,(
struct msqid_ds *)buf);
1317 if (n==0) stat=system(
"csh");
1318 else if (isstring(argv[0])) stat=system((
char *)argv[0]->c.str.chars);
1320 signal(SIGCHLD,(
void (*)())s);
1329 #if Solaris2 || Linux || Cygwin 1330 char *r = getcwd(buf,256);
1340 {
register char *envval;
1343 if (envval)
return(
makestring(envval,strlen(envval)));
1346 #if sun3 || sun4 || vax || mips || alpha || Linux 1356 b= (
char *)malloc(vecsize(a)+1);
1363 {
extern char **environ;
1367 while ((b=environ[count++])) {
1379 if (nanosleep(&treq,
NULL)<0)
return(
NIL);
1383 #if sun3 || sun4 && !Solaris2 || Linux || alpha || Cygwin 1391 treq.
tv_nsec = (ckintval(argv[0])%1000000)*1000);
1392 if (nanosleep(&treq,
NULL)<0)
return(
NIL);
1411 fprintf(stderr,
"%c[3%cm;; ERROR ", 0x1b, 49);
1413 fprintf(stderr,
"%c[0m", 0x1b);
1425 n=ckintval(argv[0]);
1448 else fd=ckintval(a);
1454 if (isatty(fd))
return(
T);
else return(
NIL);}
1470 if (n==3) proto=ckintval(argv[2]);
1472 s=socket(ckintval(argv[0]),ckintval(argv[1]),proto);
1482 struct sockaddr *sa;
1485 s=ckintval(argv[0]);
1487 sa= (
struct sockaddr *)(argv[1]->c.str.chars);
1488 if (sa->sa_family==AF_UNIX) l=strlen(sa->sa_data)+2;
1489 else l=
sizeof(
struct sockaddr_in);
1490 s=(int)bind(s, sa, l);
1498 struct sockaddr *sa;
1500 s=ckintval(argv[0]);
1502 sa= (
struct sockaddr *)(argv[1]->c.str.chars);
1503 if (sa->sa_family==AF_UNIX) l=strlen(sa->sa_data)+2;
1504 else l=
sizeof(
struct sockaddr_in);
1505 s=(int)connect(s, sa, l);
1516 if (n==2) backlog=ckintval(argv[1]);
1518 stat=listen(ckintval(argv[0]),backlog);
1527 #if vxworks || Cygwin || Linux || Solaris2 1528 struct sockaddr sockun;
1530 struct sockaddr_un sockun;
1535 s=ckintval(argv[0]);
1536 ns=accept(s, (
struct sockaddr *)&sockun, &len);
1550 {
int len,
sock, flags, stat;
1553 sock=ckintval(argv[0]);
1556 if (n>=4) len=ckintval(argv[3]);
else len=vecsize(msg);
1557 if (n>=5) flags=ckintval(argv[4]);
else flags=0;
1558 stat=sendto(sock, (
char *)msg->
c.
str.
chars, len, flags,
1559 (
struct sockaddr *)addr->
c.
str.
chars, vecsize(addr));
1560 if (stat<0) stat= -
errno;
1572 {
int len=2000,
sock, flags, stat, addrlen;
1573 unsigned char buf[2000], *bufp=
buf, *addrp=
NULL;
1576 sock=ckintval(argv[0]);
1585 addrlen=vecsize(addr);
1587 if (n>=4) flags=ckintval(argv[3]);
else flags=0;
1588 stat=recvfrom(
sock, (
char *)bufp, len, flags, (
struct sockaddr *)addrp, &addrlen);
1592 if (n<2)
return(
makestring((
char *)bufp,stat));
1603 stat=getpeername(ckintval(argv[0]), (
struct sockaddr *)name, &namelen);
1611 {
if (a==
NIL) { *size=0;
return(0);}
1613 switch(elmtypeof(a)) {
1614 case ELM_BIT: *size=vecsize(a);
return(a->
c.
ivec.
iv);
1615 case ELM_INT: *size=vecsize(a) * WORD_SIZE;
return(a->
c.
ivec.
iv);
1616 case ELM_BYTE:
case ELM_CHAR:
1617 *size=vecsize(a) * 8;
return(a->
c.
ivec.
iv);
1628 long i, maxwidth, width,size0, size1, size2;
1629 fd_set *readfds, *writefds, *exceptfds;
1638 maxwidth=
min(256,
max(
max(size0, size1), size2));
1646 for (i=0; i<maxwidth; i++) {
1647 if (readfds && FD_ISSET(i, readfds)) width=i;
1648 if (writefds && FD_ISSET(i, writefds)) width=i;
1649 if (exceptfds && FD_ISSET(i, exceptfds)) width=i;}
1654 {
GC_REGION(i=select(width, readfds, writefds, exceptfds,0););}
1657 timeout=timeout-to.tv_sec;
1658 timeout=timeout*1000000;
1660 GC_REGION(i=select(width, readfds, writefds, exceptfds,&to);)}
1668 {
struct timeval to;
1670 long i, size, width, fds;
1675 if (isint(argv[0])) {
1677 fdvec=(fd_set *)&fds;
1681 for (i=0; i<size; i++)
if (FD_ISSET(i, fdvec)) width=i;
1685 if (timeout==0.0) {
GC_REGION(n=select(width, fdvec, 0, 0, 0););}
1688 timeout=timeout-to.tv_sec;
1689 timeout=timeout*1000000;
1691 GC_REGION(n=select(width, fdvec, 0, 0, &to););}
1693 if (isint(argv[0])) {
1697 else return(argv[0]); }
1719 { free((
void *)bigintval(argv[0]));
1722 #if sun3 || sun4 || news || alpha 1726 {
return(
makeint(valloc(ckintval(argv[0]))));}
1729 #if sun3 || sun4 || news || alpha || Linux || Cygwin 1741 else fd=ckintval(strm);
1742 len=ckintval(argv[1]);
1743 if (isintvector(argv[5]))
1745 else offset=ckintval(argv[5]);
1746 result=(
eusinteger_t)mmap((caddr_t)ckintval(argv[0]), len,
1747 ckintval(argv[2]), ckintval(argv[3]), fd, offset);
1754 {
return(
makeint(munmap((caddr_t)ckintval(argv[0]),ckintval(argv[1]))));}
1774 {
char buf[32];
int stat;
1775 stat=gethostname(buf,32);
1776 if (stat==0)
return(
makestring(buf,strlen(buf)));
1783 {
register struct hostent *hp;
1787 hp=gethostbyname((
char *)
Getstring(argv[0])->c.str.chars);
1798 struct hostent *host;
1801 host=gethostbyaddr((
char *)addr->
c.
str.
chars, vecsize(addr), 2);
1803 else return(
makestring(host->h_name, strlen(host->h_name)));}
1810 {
struct netent *np;
1812 np=getnetbyname((
char *)
Getstring(argv[0])->c.str.chars);
1822 {
struct protoent *pp;
1824 pp=getprotobyname((
char *)
Getstring(argv[0])->c.str.chars);
1826 return(
makeint(pp->p_proto));}
1832 {
struct servent *sp;
1840 sp=getservbyname((
char *)
Getstring(argv[0])->c.str.chars,(
char *)p);
1842 s=
makestring(sp->s_proto,strlen(sp->s_proto));
1844 port = ntohs(sp->s_port);
1856 unsigned short netshort;
1858 hostshort=ckintval(argv[0]);
1859 netshort=htons((
short)hostshort);
1867 unsigned short netshort;
1869 netshort=ckintval(argv[0]);
1870 hostshort=ntohs((
short)netshort);
1894 dbm=dbm_open(
Getstring(argv[0])->c.str.chars,
1904 dbm_close(ckintval(argv[0]));
1916 key.dsize=strlength(s);
1917 content=dbm_fetch(ckintval(argv[0]), key);
1918 if (content.dptr==
NULL)
return(
NIL);
1919 return(
makestring(content.dptr,content.dsize));}
1930 key.dsize=strlength(s);
1933 content.dsize=strlength(s);
1934 n=dbm_store(ckintval(argv[0]), key, content, ckintval(argv[3]));
1935 return((n==0)?
T:
NIL);}
1946 key.dsize=strlength(s);
1947 n=dbm_delete(ckintval(argv[0]), key);
1948 return((n==0)?
T:
NIL);}
1956 key=dbm_firstkey(ckintval(argv[0]), key);
1957 if (key.dptr==
NULL)
return(
NIL);
1966 key=dbm_nextkey(ckintval(argv[0]), key);
1967 if (key.dptr==
NULL)
return(
NIL);
1975 n=dbm_error((DBM *)ckintval(argv[0]));
1976 return((n==0)?
T:
NIL);}
1983 dbm_clearerr((DBM *)ckintval(argv[0]));
2045 #if sun3 || sun4 || news || sanyo || alpha || Linux 2120 #if sun3 || sun4 || vax || news || sanyo || (mips && !IRIX && !IRIX6) || alpha || Linux 2124 #if !Solaris2 && !Cygwin 2129 #if sun3 || sun4 || vax || mips || alpha || Linux 2132 #if sun3 || sun4 && !Solaris2 || Linux || alpha || Cygwin 2143 #if sun3 || sun4 || news || alpha 2146 #if sun3 || sun4 || news || alpha || Linux || Cygwin 2152 #if system5 || Linux || Cygwin 2173 pointer_update(Spevalof(
PACKAGE),p);
context * euscontexts[MAXTHREAD]
pointer IOCTL_(context *, int, pointer *)
pointer GETITIMER(context *ctx, int n, argv)
pointer N2HS(context *, int, pointer *)
pointer GETENV(context *, int, pointer *)
pointer SETPGRP(context *, int, pointer *)
pointer PAUSE(context *, int, pointer *)
pointer RMDIR(context *, int, pointer *)
pointer UNIXWRITE(context *, int, pointer *)
pointer SIGNAL(context *ctx, int n, argv)
pointer UNIXCLOSE(context *, int, pointer *)
pointer ACCESS(context *, int, pointer *)
static void * parent(void)
pointer LOCKF(context *, int, pointer *)
pointer DBM_CLOSE(context *ctx, int n, argv)
pointer UALARM(context *ctx, int n, argv)
pointer FCNTL(context *, int, pointer *)
pointer SBRK(context *, int, pointer *)
pointer cons(context *, pointer, pointer)
static pointer GETPRIORITY(context *ctx, int n, pointer *argv)
struct filestream fstream
pointer EXEC(context *ctx, int n, pointer *argv)
pointer mkfilestream(context *, pointer, pointer, int, pointer)
pointer MSGCTL(context *, int, pointer *)
pointer GETHOSTBYNAME(context *, int, pointer *)
pointer DBM_STORE(context *ctx, int n, argv)
pointer GETPAGESIZE(context *ctx, int n, argv)
pointer SENDTO(context *, int, pointer *)
pointer PUTENV(context *, int, pointer *)
pointer SIGADDSET(context *ctx, int n, argv)
pointer RECVFROM(context *, int, pointer *)
pointer SYSERRLIST(context *, int, pointer *)
pointer MKDIR(context *, int, pointer *)
pointer GETPGRP(context *ctx, int n, argv)
pointer ASCTIME(context *ctx, int n, argv)
pointer H2NS(context *, int, pointer *)
pointer GETEUID(context *ctx, int n, argv)
pointer MSGGET(context *, int, pointer *)
pointer SIGDELSET(context *ctx, int n, argv)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
eusinteger_t * checkbitvec(pointer, long *)
pointer ufuncall(context *, pointer, pointer, pointer, struct bindframe *, int)
pointer DUP2(context *, int, pointer *)
pointer MKNOD(context *, int, pointer *)
pointer LINK(context *, int, pointer *)
pointer MSGSND(context *, int, pointer *)
pointer KILL(context *ctx, int n, argv)
pointer LISTEN(context *, int, pointer *)
pointer makevector(pointer, int)
pointer PTIMES(context *ctx, int n, argv)
pointer GETEGID(context *ctx, int n, argv)
pointer GETSERVBYNAME(context *, int, pointer *)
pointer RENAME(context *, int, pointer *)
pointer DBM_OPEN(context *ctx, int n, argv)
pointer DBM_NEXTKEY(context *ctx, int n, argv)
pointer FORK(context *ctx, int n, pointer *argv)
pointer GETHOSTNAME(context *, int, pointer *)
static void key(unsigned char c, int x, int y)
pointer FORK1(context *ctx, int n, pointer *argv)
pointer GETGID(context *ctx, int n, argv)
pointer VFORK(context *ctx, int n, pointer *argv)
pointer ENVIRON(context *, int, pointer *)
pointer MALLOC(context *, int, pointer *)
pointer CHMOD(context *, int, pointer *)
pointer GETNETBYNAME(context *, int, pointer *)
pointer IOCTL_R(context *, int, pointer *)
pointer GETUID(context *ctx, int n, pointer *argv)
pointer mkiostream(context *, pointer, pointer)
pointer RUNTIME(context *ctx, int n, argv)
pointer ERRNO(context *, int, pointer *)
static void * child(void)
void unixcall(context *, pointer)
pointer GETRUSAGE(context *ctx, int n, argv)
static pointer SETPRIORITY(context *ctx, int n, pointer *argv)
pointer USLEEP(context *, int, pointer *)
pointer CHDIR(context *, int, pointer *)
pointer SETITIMER(context *ctx, int n, argv)
pointer GETWD(context *, int, pointer *)
pointer IOCTL_W(context *, int, pointer *)
pointer SELECT_READ(context *, int, pointer *)
pointer IOCTL(context *, int, pointer *)
pointer PIPE(context *, int, pointer *)
pointer SIGPROCMASK(context *ctx, int n, argv)
pointer GETHOSTBYADDR(context *, int, pointer *)
eusinteger_t coerceintval(pointer)
pointer SETGID(context *ctx, int n, argv)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer GETPID(context *ctx, int n, pointer *argv)
pointer SETUID(context *ctx, int n, argv)
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 UNLINK(context *, int, pointer *)
pointer UNIXREAD(context *ctx, int n, argv)
pointer stacknlist(context *, int)
pointer GETPEERNAME(context *, int, pointer *)
pointer ISATTY(context *, int, pointer *)
#define GC_REGION(cmp_statement)
pointer MMAP(context *, int, pointer *)
pointer SELECT(context *, int, pointer *)
static int ctxid_in_child
pointer ACCEPT(context *, int, pointer *)
pointer FREE(context *, int, pointer *)
pointer LOCALTIME(context *ctx, int n, argv)
static void * prepare(void)
void eusint(int s, int code, int x, eusinteger_t addr)
pointer _EXIT(context *ctx, int n, pointer *argv)
pointer makestring(char *, int)
pointer MSGRCV(context *, int, pointer *)
pointer CHOWN(context *, int, pointer *)
pointer DUP(context *, int, pointer *)
pointer DBM_ERROR(context *ctx, int n, argv)
pointer EXIT(context *ctx, int n, pointer *argv)
pointer LSEEK(context *, int, pointer *)
pointer WAIT(context *ctx, int n, argv)
pointer IOCTL_WR(context *, int, pointer *)
pointer SOCKET(context *, int, pointer *)
pointer make_foreign_string(eusinteger_t, int)
pointer BIND(context *, int, pointer *)
static char buf[CHAR_SIZE]
pointer ALARM(context *ctx, int n, argv)
pointer CONNECT(context *, int, pointer *)
pointer GETTIMEOFDAY(context *ctx, int n, argv)
pointer SLEEP(context *, int, pointer *)
pointer GETPPID(context *ctx, int n, argv)
pointer MUNMAP(context *, int, pointer *)
pointer DBM_DELETE(context *ctx, int n, argv)
pointer GETPROTOBYNAME(context *, int, pointer *)
pointer STAT(context *, int, pointer *)
pointer UNAME(context *ctx, int n, pointer *argv)
pointer DBM_CLEARERR(context *ctx, int n, argv)