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) 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 374 s=
min(ckintval(argv[0]),NSIG-1);
376 if (n==1)
return(oldval);
379 sv.sa_handler= (void (*)())f;
383 for (i=0; i< _SIGSET_NWORDS; i++) sv.sa_mask.__val[i]=0;
390 #elif (IRIX || IRIX6) && !IRIX6_2
391 for (i=0; i<4; i++) sv.sa_mask.sigbits[i]=0;
393 for (i=0; i<4; i++) sv.sa_mask.__sigbits[i]=0;
396 if (n==3) sv.sa_flags= ckintval(argv[2]);
399 s=sigaction(s,&sv,0);
400 if (s== -1)
return(
makeint(-
errno));
else return(oldval);
414 s=
min(ckintval(argv[0]),NSIG-1);
416 if (
n==1)
return(oldval);
419 sv.sv_handler=(void (*)())f;
422 #if sun3 || sun4 || mips || alpha 423 if (
n==3) sv.sv_flags=ckintval(argv[2]);
427 if (s== -1)
return(
makeint(-
errno));
else return(oldval);
434 #include <sys/wait.h> 439 {
int completion=0, stat;
448 return(
makeint(alarm(ckintval(argv[0]))));}
451 #if sun3 || sun4 || news || sanyo || alpha || i386 || x86_64 || ARM 457 return(
makeint(ualarm(ckintval(argv[0]), ckintval(argv[1]))));}
486 #if system5 | Linux | Cygwin 491 if (n==1) pid=ckintval(argv[0]);
493 return(
makeint(getpgrp(pid)));}
497 #if system5 | Linux | Cygwin 503 return(
makeint(setpgrp(ckintval(argv[0]),ckintval(argv[1]))));}
536 n=setuid(ckintval(argv[0]));
544 n=setgid(ckintval(argv[0]));
549 #if system5 || Linux || Cygwin 558 vpush(
makestring(u.sysname,strlen(u.sysname)));
559 vpush(
makestring(u.nodename,strlen(u.nodename)));
560 vpush(
makestring(u.release,strlen(u.release)));
561 vpush(
makestring(u.version,strlen(u.version)));
562 vpush(
makestring(u.machine,strlen(u.machine)));
571 #if !Solaris2 || !THREADED 588 for (i=0; i<MAXTHREAD; i++) {
597 for (i=0; i<MAXTHREAD; i++) {
625 #if sun3 || sun4 || vax || news || sanyo || (mips && !IRIX && !IRIX6) || i386 || alpha || x86_64 || ARM 638 {
byte *exeargv[512];
645 stat=execvp(exeargv[0],(
char **)exeargv);
657 return(
makeint(setpriority(ckintval(argv[0]),
659 ckintval(argv[2]))));}
667 return(
makeint(getpriority(ckintval(argv[0]), ckintval(argv[1]))));}
671 pointer EXIT(ctx,n,argv) 681 if (n==0) thr_exit(0);
682 else thr_exit(ckintval(argv[0]));
684 if (exithook !=
NIL) {
687 else exit(ckintval(argv[0]));
697 else _exit(ckintval(argv[0]));
710 #if (WORD_SIZE == 64) 711 {
register int fd,offset=0;
712 register long int size;
714 {
register int fd,size,offset=0;
722 if (isfilestream(strm)) {
728 if (n==2) size=
min(strlength(buf),ckintval(argv[1]));
729 else size=strlength(buf);}
730 else if (isint(strm)) {
733 if (isvector(buf) && (elmtypeof(buf)==ELM_FOREIGN))
735 else if (isstring(buf)) bufp=buf->
c.
str.
chars;
737 if (n>=3) size=
min(strlength(buf),ckintval(argv[2]));
738 else size=strlength(buf);
739 if (n==4) offset=ckintval(argv[3]);}
741 GC_REGION(size=read(fd, &bufp[offset],size););
743 if (isstream(strm)) {
755 register int size,fd;
760 if (isfilestream(strm)) {
764 else if (isint(strm)) fd=
intval(strm);
767 if (isvector(buf) && (elmtypeof(buf)==ELM_FOREIGN))
769 else if (isstring(buf)) bufp=buf->
c.
str.
chars;
772 if (n==3) size=
min(size,ckintval(argv[2]));
773 size=write(fd,bufp,size);
782 if (close(ckintval(argv[0]))==0)
return(
T);
else return(
makeint(
errno));}
791 int fd,func,size,result;
795 else if (isint(argv[0])) fd=
intval(argv[0]);
797 func= ckintval(argv[1]);
798 if (n==3) size=ckintval(argv[2]);
800 result=lockf(fd,func,size);
809 {
register pointer a=argv[0];
int fd,result;
813 else if (isint(argv[0])) fd=
intval(argv[0]);
815 result=fcntl(fd,ckintval(argv[1]),ckintval(argv[2]));
830 if (isfilestream(strm)) {
833 else fd=ckintval(argv[0]);
834 if (isint(argv[1])) request=ckintval(argv[1]);
836 else request=argv[1]->
c.
ivec.
iv[0];
837 if (isstring(argv[2])) ctlarg=(
eusinteger_t)(argv[2]->c.str.chars);
838 else ctlarg=ckintval(argv[2]);
839 return(
makeint(ioctl(fd,request,ctlarg)));
843 #if !vxworks && !Solaris2 846 {
register int s=vecsize(p);
847 switch (elmtypeof(p)) {
848 case ELM_BIT:
return((s+7)/8);
849 case ELM_BYTE:
case ELM_CHAR:
case ELM_FOREIGN:
return(s);
850 case ELM_FLOAT:
return(s*
sizeof(
float));
851 case ELM_INT:
return(s*
sizeof(
int));
852 default:
return(s*
sizeof(
pointer));}}
855 #define IOC_IN _IOC_READ 856 #define IOC_OUT _IOC_WRITE 857 #define IOC_INOUT (IOC_IN | IOC_OUT) 874 else fd=ckintval(strm);
876 x=ckintval(argv[1]); y=ckintval(argv[2]);
877 #if alpha || Linux_ppc 878 if (ioctl(fd,_IO(x, y), addr))
880 if (ioctl(fd,IOC_VOID | (size<<16) | (x<<8) | y, addr))
898 else fd=ckintval(strm);
900 x=ckintval(argv[1]); y=ckintval(argv[2]);
901 if (isstring(argv[3]) || isintvector(argv[3]))
904 if (n==5) size=ckintval(argv[4]);
907 if (ioctl(fd,_IOC(IOC_OUT, x, y, size), addr))
909 if (ioctl(fd,IOC_OUT | (size<<16) | (x<<8) | y, addr))
927 else fd=ckintval(strm);
929 x=ckintval(argv[1]); y=ckintval(argv[2]);
930 if (isstring(argv[3]) || isintvector(argv[3]))
933 if (n==5) size=ckintval(argv[4]);
935 #if alpha || Linux_ppc 936 if (ioctl(fd,_IOC(IOC_IN, x, y, size), addr))
938 if (ioctl(fd,IOC_IN | (size<<16) | (x<<8) | y, addr))
950 {
register pointer strm=argv[0];
957 else fd=ckintval(strm);
959 x=ckintval(argv[1]); y=ckintval(argv[2]);
960 if (isstring(argv[3]) || isintvector(argv[3]))
963 if (n==5) size=ckintval(argv[4]);
965 #if alpha || Linux_ppc 966 if (ioctl(fd,_IOC(IOC_INOUT, x, y, size), addr))
968 if (ioctl(fd,IOC_INOUT | (size <<16) | (x<<8) | y, addr))
985 oldfd=ckintval(argv[0]);
993 {
int newfd,oldfd,stat;
995 newfd=ckintval(argv[0]);
996 oldfd=ckintval(argv[1]);
997 stat=dup2(newfd,oldfd);
1006 stat=mknod((
char *)
Getstring(argv[0])->c.str.chars,ckintval(argv[1]),0);
1016 if (n==2) mode=ckintval(argv[1]);
else mode=0775;
1017 stat=mkdir((
char *)
Getstring(argv[0])->c.str.chars,mode);
1063 stat=rename((
char *)from,(
char *) to);
1075 if (n==2) mode=ckintval(argv[1]);
else mode=0;
1098 a=
cons(ctx,mkbigint(s.st_ctime),
NIL);
1099 a=
cons(ctx,mkbigint(s.st_mtime),a);
1100 a=
cons(ctx,mkbigint(s.st_atime),a);
1112 #if Solaris2 || Linux || alpha || Cygwin 1126 struct dirent *direntp;
1131 if ( (dirp = opendir((
char *)s)) ==
NULL )
return (
NIL);
1132 while ( (direntp = readdir( dirp )) !=
NULL ){
1133 str=direntp->d_name;
1146 printf(
"Not Implemented!");
1158 if (n==3) whence=ckintval(argv[2]);
else whence=0;
1161 if (isfilestream(strm)){
1166 ret=lseek(
intval(fd),ckintval(argv[1]),whence);
1167 if (ret==-1) perror(
"lseek");
1176 {
register int stat;
1178 stat=chdir(
Getstring(argv[0])->c.str.chars);
1190 mode=ckintval(argv[1]);
1191 stat=chmod((
char *)path,mode);
1200 int owner,newowner,stat;
1203 owner=ckintval(argv[1]);
1204 newowner=ckintval(argv[2]);
1205 stat=chown(path,owner,newowner);
1213 {
int pfd[2],stat,size;
1214 register pointer instream,outstream;
1217 if (n==1) size=ckintval(argv[0]);
else size=128;
1233 {
register int key,qid,mode;
1235 key=ckintval(argv[0]);
1236 if (n==2) mode=ckintval(argv[1]);
else mode=0666;
1237 qid=msgget(key,IPC_CREAT | (mode & 0777));
1244 {
register int qid,mtype,flag,stat;
1247 qid=ckintval(argv[0]);
1250 if (n>=3) mtype=ckintval(argv[2]);
else mtype=0;
1251 if (n==4)
if (argv[3]==
NIL) flag=0;
else flag=IPC_NOWAIT;
1257 if (stat<0) { breakck;
goto rcv_again;}
1267 {
register int qid,msize,mtype,flag,stat;
1270 qid=ckintval(argv[0]);
1275 msize=ckintval(argv[2]);
1277 else msize=
intval(lsave);
1278 if (n>=4) mtype=ckintval(argv[3]);
else mtype=
mypid;
1279 if (n==5)
if (argv[4]==
NIL) flag=0;
else flag=IPC_NOWAIT;
1282 stat=msgsnd(qid,(
struct msgbuf *)&buf->
c.
str.
length,msize,flag);
1291 {
int qid,cmnd,stat;
1294 qid=ckintval(argv[0]); cmnd=ckintval(argv[1]);
1297 stat=msgctl(qid,cmnd,(
struct msqid_ds *)buf);
1316 if (n==0) stat=system(
"csh");
1317 else if (isstring(argv[0])) stat=system((
char *)argv[0]->c.str.chars);
1319 signal(SIGCHLD,(
void (*)())s);
1328 #if Solaris2 || Linux || Cygwin 1329 char *r = getcwd(buf,256);
1339 {
register char *envval;
1342 if (envval)
return(
makestring(envval,strlen(envval)));
1345 #if sun3 || sun4 || vax || mips || i386 || alpha || x86_64 || ARM 1355 b= (
char *)malloc(vecsize(a)+1);
1362 {
extern char **environ;
1366 while ((b=environ[count++])) {
1378 if (nanosleep(&treq,
NULL)<0)
return(
NIL);
1382 #if sun3 || sun4 && !Solaris2 || Linux || alpha || Cygwin 1390 treq.
tv_nsec = (ckintval(argv[0])%1000000)*1000);
1391 if (nanosleep(&treq,
NULL)<0)
return(
NIL);
1410 fprintf(stderr,
"%c[3%cm;; ERROR ", 0x1b, 49);
1412 fprintf(stderr,
"%c[0m", 0x1b);
1424 n=ckintval(argv[0]);
1447 else fd=ckintval(a);
1453 if (isatty(fd))
return(
T);
else return(
NIL);}
1469 if (n==3) proto=ckintval(argv[2]);
1471 s=socket(ckintval(argv[0]),ckintval(argv[1]),proto);
1481 struct sockaddr *sa;
1484 s=ckintval(argv[0]);
1486 sa= (
struct sockaddr *)(argv[1]->c.str.chars);
1487 if (sa->sa_family==AF_UNIX) l=strlen(sa->sa_data)+2;
1488 else l=
sizeof(
struct sockaddr_in);
1489 s=(int)bind(s, sa, l);
1497 struct sockaddr *sa;
1499 s=ckintval(argv[0]);
1501 sa= (
struct sockaddr *)(argv[1]->c.str.chars);
1502 if (sa->sa_family==AF_UNIX) l=strlen(sa->sa_data)+2;
1503 else l=
sizeof(
struct sockaddr_in);
1504 s=(int)connect(s, sa, l);
1515 if (n==2) backlog=ckintval(argv[1]);
1517 stat=listen(ckintval(argv[0]),backlog);
1526 #if vxworks || Cygwin || Linux || Solaris2 1527 struct sockaddr sockun;
1529 struct sockaddr_un sockun;
1534 s=ckintval(argv[0]);
1535 ns=accept(s, (
struct sockaddr *)&sockun, &len);
1549 {
int len,
sock, flags, stat;
1552 sock=ckintval(argv[0]);
1555 if (n>=4) len=ckintval(argv[3]);
else len=vecsize(msg);
1556 if (n>=5) flags=ckintval(argv[4]);
else flags=0;
1557 stat=sendto(sock, (
char *)msg->
c.
str.
chars, len, flags,
1558 (
struct sockaddr *)addr->
c.
str.
chars, vecsize(addr));
1559 if (stat<0) stat= -
errno;
1571 {
int len=2000,
sock, flags, stat, addrlen;
1572 unsigned char buf[2000], *bufp=
buf, *addrp=
NULL;
1575 sock=ckintval(argv[0]);
1584 addrlen=vecsize(addr);
1586 if (n>=4) flags=ckintval(argv[3]);
else flags=0;
1587 stat=recvfrom(
sock, (
char *)bufp, len, flags, (
struct sockaddr *)addrp, &addrlen);
1591 if (n<2)
return(
makestring((
char *)bufp,stat));
1602 stat=getpeername(ckintval(argv[0]), (
struct sockaddr *)name, &namelen);
1610 {
if (a==
NIL) { *size=0;
return(0);}
1612 switch(elmtypeof(a)) {
1613 case ELM_BIT: *size=vecsize(a);
return(a->
c.
ivec.
iv);
1614 case ELM_INT: *size=vecsize(a) * WORD_SIZE;
return(a->
c.
ivec.
iv);
1615 case ELM_BYTE:
case ELM_CHAR:
1616 *size=vecsize(a) * 8;
return(a->
c.
ivec.
iv);
1627 long i, maxwidth, width,size0, size1, size2;
1628 fd_set *readfds, *writefds, *exceptfds;
1637 maxwidth=
min(256,
max(
max(size0, size1), size2));
1645 for (i=0; i<maxwidth; i++) {
1646 if (readfds && FD_ISSET(i, readfds)) width=i;
1647 if (writefds && FD_ISSET(i, writefds)) width=i;
1648 if (exceptfds && FD_ISSET(i, exceptfds)) width=i;}
1653 {
GC_REGION(i=select(width, readfds, writefds, exceptfds,0););}
1656 timeout=timeout-to.tv_sec;
1657 timeout=timeout*1000000;
1659 GC_REGION(i=select(width, readfds, writefds, exceptfds,&to);)}
1667 {
struct timeval to;
1669 long i, size, width, fds;
1674 if (isint(argv[0])) {
1676 fdvec=(fd_set *)&fds;
1680 for (i=0; i<size; i++)
if (FD_ISSET(i, fdvec)) width=i;
1684 if (timeout==0.0) {
GC_REGION(n=select(width, fdvec, 0, 0, 0););}
1687 timeout=timeout-to.tv_sec;
1688 timeout=timeout*1000000;
1690 GC_REGION(n=select(width, fdvec, 0, 0, &to););}
1692 if (isint(argv[0])) {
1696 else return(argv[0]); }
1718 { free((
void *)bigintval(argv[0]));
1721 #if sun3 || sun4 || news || alpha 1725 {
return(
makeint(valloc(ckintval(argv[0]))));}
1728 #if sun3 || sun4 || news || alpha || Linux || Cygwin 1740 else fd=ckintval(strm);
1741 len=ckintval(argv[1]);
1742 if (isintvector(argv[5]))
1744 else offset=ckintval(argv[5]);
1745 result=(
eusinteger_t)mmap((caddr_t)ckintval(argv[0]), len,
1746 ckintval(argv[2]), ckintval(argv[3]), fd, offset);
1753 {
return(
makeint(munmap((caddr_t)ckintval(argv[0]),ckintval(argv[1]))));}
1773 {
char buf[32];
int stat;
1774 stat=gethostname(buf,32);
1775 if (stat==0)
return(
makestring(buf,strlen(buf)));
1782 {
register struct hostent *hp;
1786 hp=gethostbyname((
char *)
Getstring(argv[0])->c.str.chars);
1797 struct hostent *host;
1800 host=gethostbyaddr((
char *)addr->
c.
str.
chars, vecsize(addr), 2);
1802 else return(
makestring(host->h_name, strlen(host->h_name)));}
1809 {
struct netent *np;
1811 np=getnetbyname((
char *)
Getstring(argv[0])->c.str.chars);
1821 {
struct protoent *pp;
1823 pp=getprotobyname((
char *)
Getstring(argv[0])->c.str.chars);
1825 return(
makeint(pp->p_proto));}
1831 {
struct servent *sp;
1839 sp=getservbyname((
char *)
Getstring(argv[0])->c.str.chars,(
char *)p);
1841 s=
makestring(sp->s_proto,strlen(sp->s_proto));
1843 port = ntohs(sp->s_port);
1855 unsigned short netshort;
1857 hostshort=ckintval(argv[0]);
1858 netshort=htons((
short)hostshort);
1866 unsigned short netshort;
1868 netshort=ckintval(argv[0]);
1869 hostshort=ntohs((
short)netshort);
1893 dbm=dbm_open(
Getstring(argv[0])->c.str.chars,
1903 dbm_close(ckintval(argv[0]));
1915 key.dsize=strlength(s);
1916 content=dbm_fetch(ckintval(argv[0]), key);
1917 if (content.dptr==
NULL)
return(
NIL);
1918 return(
makestring(content.dptr,content.dsize));}
1929 key.dsize=strlength(s);
1932 content.dsize=strlength(s);
1933 n=dbm_store(ckintval(argv[0]), key, content, ckintval(argv[3]));
1934 return((n==0)?
T:
NIL);}
1945 key.dsize=strlength(s);
1946 n=dbm_delete(ckintval(argv[0]), key);
1947 return((n==0)?
T:
NIL);}
1955 key=dbm_firstkey(ckintval(argv[0]), key);
1956 if (key.dptr==
NULL)
return(
NIL);
1965 key=dbm_nextkey(ckintval(argv[0]), key);
1966 if (key.dptr==
NULL)
return(
NIL);
1974 n=dbm_error((DBM *)ckintval(argv[0]));
1975 return((n==0)?
T:
NIL);}
1982 dbm_clearerr((DBM *)ckintval(argv[0]));
2044 #if sun3 || sun4 || news || sanyo || alpha || x86_64 || ARM 2119 #if sun3 || sun4 || vax || news || sanyo || (mips && !IRIX && !IRIX6) || i386 || alpha || x86_64 || ARM 2123 #if !Solaris2 && !Cygwin 2128 #if sun3 || sun4 || vax || mips || i386 || alpha || x86_64 || ARM 2131 #if sun3 || sun4 && !Solaris2 || Linux || alpha || Cygwin 2142 #if sun3 || sun4 || news || alpha 2145 #if sun3 || sun4 || news || alpha || Linux || Cygwin 2151 #if system5 || Linux || Cygwin 2172 pointer_update(Spevalof(
PACKAGE),p);
context * euscontexts[MAXTHREAD]
static char buf[CHAR_SIZE]
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 *)
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)