1 eÿexit.c
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\v\ 1/* $Id: exit.c,v 2.4 1994/06/24 12:17:41 ceriel Exp $ */
4 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
5 * See the copyright notice in the ACK home directory, in the file "Copyright".
13 \0gtty.c
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0¯
\0/* $Id: gtty.c,v 2.4 1994/06/24 12:17:45 ceriel Exp $ */
16 gtty(fildes,argp) int fildes ; struct sgttyb *argp ; {
17 return ioctl(fildes,TIOCGETP,argp) ;
19 Ksignal.c
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\87 /* $Id: signal.c,v 2.4 1994/06/24 12:17:48 ceriel Exp $ */
22 typedef void (*callvec)() ;
24 static callvec vector[16] = {
25 SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL,
26 SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL
29 static char mapvec[] = {
38 0, /* EIUND, already ignored */
51 SIGSEGV, /* EBADMEM */
62 static firsttime = 1 ;
63 static int catchtrp() ;
64 static int procesig() ;
66 callvec signal(sig,func) int sig ; callvec func ; {
71 if ( index<0 || index>=(sizeof vector/sizeof vector[0]) ) {
82 if ( func==SIG_IGN ) {
84 } else if ( func==SIG_DFL ) {
89 if ( sigtrp(mapval,sig)== -1 ) return (callvec) -1;
95 static int catchtrp(trapno) int trapno ; {
96 if ( trapno>VECBASE &&
97 trapno<=VECBASE + (sizeof vector/sizeof vector[0]) ) {
98 return procesig(trapno-VECBASE) ;
100 if ( trapno>=0 && trapno< (sizeof mapvec/sizeof mapvec[0]) &&
102 return procesig(mapvec[trapno]) ;
104 return 0 ; /* Failed to handle the trap */
107 static int procesig(sig) int sig ; {
113 if ( trf==SIG_IGN ) return 1 ;
114 if ( sig!=SIGILL && sig!=SIGTRAP ) vector[index]= SIG_IGN ;
115 if ( trf==SIG_DFL ) return 0 ;
119 \0stty.c
\0c
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0¯
\0/* $Id: stty.c,v 2.4 1994/06/24 12:17:51 ceriel Exp $ */
122 stty(fildes,argp) int fildes ; struct sgttyb *argp ; {
123 return ioctl(fildes,TIOCSETP,argp) ;
125 _tell.c
\0c
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\95\0/* $Id: tell.c,v 2.3 1994/06/24 12:17:54 ceriel Exp $ */
127 * return offset in file.
134 return(lseek(f, 0L, 1));
136 ftime.c
\0c
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0æ
\0/* $Id: time.c,v 2.4 1994/06/24 12:17:56 ceriel Exp $ */
137 #include <sys/types.h>
138 #include <sys/timeb.h>
140 time(timpt) time_t *timpt ; {
144 if ( timpt ) *timpt= buf.time ;
147 cleanup.c
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0I
\0/* $Id: cleanup.c,v 2.3 1994/06/24 12:17:39 ceriel Exp $ */
149 paccess.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0§
\0#
150 mes 2,EM_WSIZE,EM_PSIZE
154 loi EM_WSIZE+EM_PSIZE
165 (acct.e
\0e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9a\0#
166 mes 2,EM_WSIZE,EM_PSIZE
181 alarm.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\
\0#
182 mes 2,EM_WSIZE,EM_PSIZE
190 brk.e
\0e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0 \ 2#
193 mes 2,EM_WSIZE,EM_PSIZE
228 str 2 ; The - possibly - occurring trap is caught
244 *chdir.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0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sbrk.e
\0e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\98\ 2#
775 mes 2,EM_WSIZE,EM_PSIZE
811 ads EM_WSIZE ; this is the new heap pointer, but watch out for overflow!
814 cmp ; compare with old heap pointer
816 str 2 ; The - possibly - occurring trap is caught
832 setgid.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\90\0#
833 mes 2,EM_WSIZE,EM_PSIZE
847 setuid.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\90\0#
848 mes 2,EM_WSIZE,EM_PSIZE
862 setsig.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0û
\ 2#
863 mes 2,EM_WSIZE,EM_PSIZE
876 lpi $catchit ; trap to catchit
878 lae save ; remember higher level trap
889 loi EM_PSIZE ; fetch procedure identifier
893 ; trap not handled by trf function, trap through; trapno still on stack
899 lpi $catchit ; trap ignored, further traps to catchit
902 lae save ; remember higher level trap
907 *sigtrp.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0{
\0#
908 mes 2,EM_WSIZE,EM_PSIZE
921 stat.e
\0e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9c\0#
922 mes 2,EM_WSIZE,EM_PSIZE
937 stime.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0¸
\0#
938 mes 2,EM_WSIZE,EM_PSIZE
957 sync.e
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0L
\0#
958 mes 2,EM_WSIZE,EM_PSIZE
965 times.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0c
\0#
966 mes 2,EM_WSIZE,EM_PSIZE
975 iumask.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\
\0#
976 mes 2,EM_WSIZE,EM_PSIZE
984 umount.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9e\0#
985 mes 2,EM_WSIZE,EM_PSIZE
1000 unlink.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9e\0#
1001 mes 2,EM_WSIZE,EM_PSIZE
1016 utime.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9e\0#
1017 mes 2,EM_WSIZE,EM_PSIZE
1032 wait.e
\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\8f\ 1#
1033 mes 2,EM_WSIZE,EM_PSIZE
1035 #define STATUS_SIZE 2
1037 #define STATUS_SIZE EM_WSIZE
1052 sti 2 ; 2 bytes, not one int!
1065 write.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ò
\0#
1066 mes 2,EM_WSIZE,EM_PSIZE
1069 lol EM_WSIZE+EM_PSIZE
1074 loi EM_WSIZE+EM_PSIZE
1088 errno.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0?
\0#
1089 mes 2,EM_WSIZE,EM_PSIZE
1094 I_alarm.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0^
\0#
1095 mes 2,EM_WSIZE,EM_PSIZE
1103 _brk.e
\0e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\v\ 2#
1106 mes 2,EM_WSIZE,EM_PSIZE
1141 str 2 ; The - possibly - occurring trap is caught
1157 r_close.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\8f\0#
1158 mes 2,EM_WSIZE,EM_PSIZE
1172 _creat.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0¬
\0#
1173 mes 2,EM_WSIZE,EM_PSIZE
1177 loi EM_WSIZE+EM_PSIZE
1181 ste errno ; since e==r0
1186 _dup.e
\0e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\85\0#
1187 mes 2,EM_WSIZE,EM_PSIZE
1200 n_dup2.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9f\0#
1201 mes 2,EM_WSIZE,EM_PSIZE
1216 M_execl.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0§
\0#
1217 mes 2,EM_WSIZE,EM_PSIZE
1231 _execve.e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\83\0#
1232 mes 2,EM_WSIZE,EM_PSIZE
1243 t_exit.e
\0e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0M
\0#
1244 mes 2,EM_WSIZE,EM_PSIZE
1251 Z_fork.e
\0e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9f\0#
1252 mes 2,EM_WSIZE,EM_PSIZE
1269 Z_fstat.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0§
\0#
1270 mes 2,EM_WSIZE,EM_PSIZE
1274 loi EM_WSIZE+EM_PSIZE
1285 _ftime.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9a\0#
1286 mes 2,EM_WSIZE,EM_PSIZE
1302 _getpid.e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0Y
\0#
1303 mes 2,EM_WSIZE,EM_PSIZE
1310 _gtty.c
\0e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0²
\0/* $Id: _gtty.c,v 1.2 1994/06/24 12:17:33 ceriel Exp $ */
1313 _gtty(fildes,argp) int fildes ; struct sgttyb *argp ; {
1314 return _ioctl(fildes,TIOCGETP,argp) ;
1316 _stty.c
\0e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0²
\0/* $Id: _stty.c,v 1.2 1994/06/24 12:17:36 ceriel Exp $ */
1319 _stty(fildes,argp) int fildes ; struct sgttyb *argp ; {
1320 return _ioctl(fildes,TIOCSETP,argp) ;
1322 _ioctl.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0©
\0#
1323 mes 2,EM_WSIZE,EM_PSIZE
1327 loi EM_PSIZE+2*EM_WSIZE
1338 r_kill.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\8e\0#
1339 mes 2,EM_WSIZE,EM_PSIZE
1353 _link.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9d\0#
1354 mes 2,EM_WSIZE,EM_PSIZE
1369 __lseek.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0X
\ 1#
1370 mes 2,EM_WSIZE,EM_PSIZE
1402 _open.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\8f\0#
1403 mes 2,EM_WSIZE,EM_PSIZE
1407 loi EM_WSIZE+EM_PSIZE
1416 o_pause.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0P
\0#
1417 mes 2,EM_WSIZE,EM_PSIZE
1424 _pipe.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0±
\0#
1425 mes 2,EM_WSIZE,EM_PSIZE
1442 l_read.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ò
\0#
1443 mes 2,EM_WSIZE,EM_PSIZE
1446 lol EM_WSIZE+EM_PSIZE
1451 loi EM_WSIZE+EM_PSIZE
1465 _sbrk.e
\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9a\ 2#
1468 mes 2,EM_WSIZE,EM_PSIZE
1504 ads EM_WSIZE ; this is the new heap pointer, but watch out for overflow!
1507 cmp ; compare with old heap pointer
1509 str 2 ; The - possibly - occurring trap is caught
1525 _times.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0e
\0#
1526 mes 2,EM_WSIZE,EM_PSIZE
1535 h_unlink.e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0 \0#
1536 mes 2,EM_WSIZE,EM_PSIZE
1551 _wait.e
\0e
\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\91\ 1#
1552 mes 2,EM_WSIZE,EM_PSIZE
1554 #define STATUS_SIZE 2
1556 #define STATUS_SIZE EM_WSIZE
1571 sti 2 ; 2 bytes, not one int!
1584 S_write.e
\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ô
\0#
1585 mes 2,EM_WSIZE,EM_PSIZE
1588 lol EM_WSIZE+EM_PSIZE
1593 loi EM_WSIZE+EM_PSIZE