|
|
1.1 root 1: /* @(#)llib-lc 1.47 (Berkeley) 10/1/89 */
2:
3: /* LINTLIBRARY */
4:
5: #include <sys/types.h>
6: #include <sys/time.h>
7:
8: #include <sys/wait.h>
9: #include <sys/dir.h>
10: #include <sys/resource.h>
11: #include <sys/socket.h>
12: #include <sys/stat.h>
13: #include <sys/timeb.h>
14: #include <sys/times.h>
15: #include <sys/uio.h>
16: #include <sys/vtimes.h>
17:
18: #include <netinet/in.h>
19:
20: #include <netns/ns.h>
21:
22: #include <arpa/inet.h>
23:
24: #include <sys/disklabel.h>
25: #include <fstab.h>
26: #include <grp.h>
27: #include <ndbm.h>
28: #include <netdb.h>
29: #include <nlist.h>
30: #include <pwd.h>
31: #include <setjmp.h>
32: #include <sgtty.h>
33: #include <signal.h>
34: #include <stdio.h>
35: #include <ttyent.h>
36:
37: /*** SECTION 2 ***/
38: int errno;
39:
40: int accept(s, a, l) struct sockaddr *a; int *l; { return s; }
41: int access( p, m) char *p; { return 0; }
42: int acct(f) char *f; { return 0;}
43: int adjtime(delta, odelta) struct timeval *delta, *odelta; { return 0; }
44: int bind(s, n, l) struct sockaddr *n; { return 0; }
45: char *brk(a) char *a; { return(a); }
46: int chdir(s) char *s; { return(0); }
47: int chmod(s, m) char *s; { return(0); }
48: int chown(s, u, g) char *s; { return(0); }
49: int chroot( d ) char *d; { return 0; }
50: int close(f) { return(0); }
51: int connect( s, n, l) struct sockaddr *n; { return 0; }
52: int dup(f) { return(f); }
53: int dup2( o, n) { return o; }
54: execve(s, v, e) char *s, *v[], *e[]; {;}
55: _exit(s) {;}
56: int fchmod(f, m) { return(0); }
57: int fchown(f, u, g) { return(0); }
58: int fcntl(f, c, a) { return (0); }
59: int flock( f, o ) { return 0; }
60: int fork() { return(0); }
61: int fsync( f ) { return 0; }
62: int fstat(f, b) struct stat *b; { return(0); }
63: int ftruncate( d, l) off_t l; { return 0;}
64: int getdtablesize() { return 20 ; }
65: gid_t getegid() { return((gid_t)1); }
66: uid_t geteuid() { return((uid_t)1); }
67: gid_t getgid() { return((gid_t)1); }
68: int getgroups( n, g ) int n, *g; { return 0; }
69: long gethostid() { return 1L; }
70: int gethostname( n, l ) char *n; int l; { return 0 ;}
71: int getitimer( w, v ) struct itimerval *v; { return 0; }
72: int getpagesize() { return 1; }
73: int getpeername(s, n, l) struct sockaddr *n; int *l; { return (0); }
74: int getpgrp(p) { return 1; }
75: int getpid() { return(1); }
76: int getppid() { return(1); }
77: int getpriority( w, who) { return 1;}
78: int getrlimit( res, rip) struct rlimit *rip; { return 0;}
79: int getrusage( res, rip) struct rusage *rip; { return 0;}
80: int getsockname(s, name, namelen) struct sockaddr *name; int *namelen; { return(0); }
81: int getsockopt( s, level, opt, buf, len ) char *buf; int *len; { return 0;}
82: int gettimeofday( t, z ) struct timeval *t; struct timezone *z; { return 0;}
83: uid_t getuid() { return((uid_t)1); }
84: int ioctl( d, r, p) u_long r; char *p; { return 0;}
85: int kill(p, s) { return(0); }
86: int killpg( pg, s) { return 0;}
87: int link(a, b) char *a, *b; { return(0); }
88: int listen( s, b ){ return 0; }
89: off_t lseek(f, o, d) off_t o; { return(o); }
90: int lstat(s, b) char *s; struct stat *b; { return(0); }
91: #ifdef notdef
92: int madvise( a, l, b ) char * a; int l, b; { return 0;}
93: int mmap( a, l, p, s, f, o ) char * a; off_t o; { return 0;}
94: int mincore( a, l, v ) char * a; int l; char *v; { return 0; }
95: #endif
96: int mkdir( p, m ) char *p; { return 0; }
97: int mknod(n, m, a) char *n; { return(0); }
98: int mount(s, n, f) char *s, *n; { return(0); }
99: #ifdef notdef
100: int mprotect( a, l, p) char * a; { return 0;}
101: int mremap( a, l, p, s, f) char * a, f; { return 0;}
102: int munmap( a, l) char * a; { return 0;}
103: #endif
104: /* VARARGS2 */
105: int open(f, m, stuff) char *f; { return(0); }
106: int pipe(f) int f[2]; { return(0); }
107: profil(b, s, o, i) char *b; {;}
108: int ptrace(r, p, a, d) int *a; { return(0); }
109: int quota(c, u, a, ad) char *ad; { return(0); }
110: int read(f, b, l) char *b; { return(l); }
111: int readv( d, v, l) struct iovec *v; { return l; }
112: int readlink( p, b, s ) char *p, *b; { return 1; }
113: reboot( h ) {;}
114: int recv( s, b, l, f ) char *b; { return l ; }
115: int recvfrom( s, b, l, f, fr, fl ) char *b; struct sockaddr *fr; int *fl;
116: { return l; }
117: int recvmsg( s, m, f ) struct msghdr m[]; { return 1; }
118: int rename( f, t ) char *f, *t; { return 0;}
119: int rmdir( p ) char *p; { return 0;}
120: char *sbrk(i) { return((char *)0); }
121: int select( n, r, w, e, t ) fd_set *r, *w, *e; struct timeval *t; { return n; }
122: int send( s, m, l, f ) char *m; { return l; }
123: int sendto( s, m, l, f, t, tl ) char *m; struct sockaddr *t; { return l; }
124: int sendmsg( s, m, l) struct msghdr m[]; { return l; }
125: int setgroups( n, g) int *g; { return 0; }
126: int sethostid( h ) long h; { return 0;}
127: int sethostname( n, l ) char *n; int l; { return 0 ;}
128: int setitimer( w, v, ov ) struct itimerval *v, *ov; { return 0; }
129: int setpgrp( g, pg) { return 0; }
130: int setpriority( w, who, pri ) { return 1;}
131: int setquota(s, f) char *s, *f; { return 0; }
132: int setregid( r, e) int r, e; { return 0; }
133: int setreuid( r, e) int r, e; { return 0; }
134: int setrlimit( res, rip) struct rlimit *rip; { return 0;}
135: /* VARARGS */
136: int setsockopt( s, level, opt, buf, len ) char *buf; { return 0;}
137: int settimeofday( t, z ) struct timeval *t; struct timezone *z; { return 0;}
138: int shutdown( s, h ){ return 0;}
139: void (*signal(c, f))() void (*f)(); { return(f); }
140: int sigvec(c, f, m) struct sigvec *f, *m; { return 0; }
141: int sigblock(m) { return (m); }
142: int sigsetmask(m) { return (m); }
143: sigpause(m) { ; }
144: int sigreturn(scp) struct sigcontext *scp; { return -1; }
145: int sigstack(ss, oss) struct sigstack *ss, *oss; { return 0 ; }
146: int socket( a, t, p) {return 1;}
147: int socketpair( d, t, p, s ) int s[2]; { return 0; }
148: int stat(s, b) char *s; struct stat *b; { return(0); }
149: #ifdef notdef
150: char * stk( a ) char * a; { return a; }
151: char * sstk( a ) int a; { return (char *)0; }
152: #endif
153: int swapon( s ) char *s; { return 0;}
154: int symlink( t, f) char *t, *f; { return 0;}
155: sync(){;}
156: int truncate( p, l) char *p; off_t l; { return 0;}
157: int umask( n ) { return n; }
158: int umount(s) char *s; { return 0; }
159: int unlink(s) char *s; { return(0); }
160: int utimes( f, t ) char *f; struct timeval t[2]; { return 0 ;}
161: int vfork() { return(0); }
162: vhangup() { ; }
163: int wait(s) union wait *s; { return(1); }
164: int wait3( s, o, r) union wait *s; struct rusage *r; { return 1;}
165: int write(f, b, l) char *b; { return(l); }
166: int writev( f, v, l) struct iovec *v; { return l; }
167:
168:
169: /*** SECTION 3 ***/
170:
171: struct qelem { /* this should really be defined in an include file */
172: struct qelem *q_forw;
173: struct qelem *q_back;
174: char data[1];
175: }
176:
177: /* antique system calls and unclassified */
178: _longjmp( e, v) jmp_buf e; {;}
179: int _setjmp(e) jmp_buf e; { return(0); }
180: abort() {;}
181: int abs(i) int i; { return(i); }
182: int alarm(s) unsigned s; { return(s); }
183: alphasort( d1, d2) struct direct **d1, **d2; { return 0;}
184: char * asctime(t) struct tm *t; { return(""); }
185: double atof(s) char *s; { return(1.); }
186: int atoi(s) char *s; { return 1; }
187: long atol(s) char *s; { return 1L; }
188: int bcmp(b1, b2, length) char *b1, *b2; { return 0; }
189: bcopy(src, dst, length) char *src, *dst; { ; }
190: bzero(b, length) char *b; { ; }
191: char * calloc(n,s) unsigned n, s; { static char c[1]; return(c); }
192: void closedir( p ) DIR *p; {}
193: closelog() {}
194: int creat(s, m) char *s; { return(0); }
195: char * crypt(k,s) char *k, *s; { return(""); }
196: char * ctime(c) long *c;{ return(""); }
197: char _ctype_[];
198: DBM * dbm_open(file, flags, mode) char *file; { return (DBM *) 0; }
199: void dbm_close(db) DBM *db; { ; }
200: datum dbm_fetch(db, key) DBM *db; datum key; { return key; }
201: int dbm_store(db, key, cont, flags) DBM *db; datum key, cont; { return 0; }
202: int dbm_delete(db, key) DBM *db; datum key; { return 0; }
203: datum dbm_firstkey(db) DBM *db; { datum key; return key; }
204: datum dbm_nextkey(db) DBM *db; { datum key; return key; }
205: char * ecvt(v, n, d, s) double v; int *d, *s; { return(""); }
206: encrypt(s, i) char *s; {}
207: void endfsent() {}
208: void endgrent() { ; }
209: endhostent() { ; }
210: endnetent() { ; }
211: endprotoent() { ; }
212: void endpwent() {}
213: endservent() { ; }
214: endttyent() { ; }
215: endusershell() { ; }
216: char ** environ;
217: /* VARARGS */
218: execl(f, a) char *f, *a; {;}
219: /* VARARGS */
220: execle(f, a) char *f, *a; {;}
221: /* VARARGS */
222: execlp(f, a) char *f, *a; {;}
223: execv(s, v) char *s, *v[]; {;}
224: execvp(s, v) char *s, *v[]; {;}
225: exect(s, v, e) char *s, *v[], *e[]; {;}
226: exit(s) {;}
227: char * fcvt(v, n, d, s) double v; int *d, *s; { return(""); }
228: int ffs(i) { return i; }
229: free(p) char *p; {;}
230: double frexp( v, e) double v; int *e; { return v; }
231: ftime(tp) struct timeb *tp; { ; }
232: char * gcvt(v, n, b) double v; char *b; { return(""); }
233: struct disklabel * getdiskbyname(name) char *name; { return (struct disklabel *) 0; }
234: char * getenv( n ) char *n; { return n; }
235: struct fstab * getfsent() { return (struct fstab *)NULL; }
236: struct fstab * getfsspec( n ) char *n; { return (struct fstab *)NULL; }
237: struct fstab * getfsfile( n ) char *n; { return (struct fstab *)NULL; }
238: struct fstab * getfstype( t ) char *t; { return (struct fstab *)NULL; }
239: struct group * getgrent() { return (struct group *)NULL; }
240: struct group * getgrgid( n ) { return (struct group *)NULL; }
241: struct group * getgrnam( n ) char *n; { return (struct group *)NULL; }
242: struct hostent * gethostbyaddr(addr, len, type) char *addr; { return (struct hostent *) 0; }
243: struct hostent * gethostbyname(name) char *name; { return (struct hostent *) 0; }
244: struct hostent * gethostent() { return (struct hostent *) 0; }
245: int getloadavg( v, l ) double v[]; int l; { return 0; }
246: char * getlogin(){ return " "; }
247: struct netent * getnetbyaddr(net, type) { return (struct netent *) 0; }
248: struct netent * getnetbyname(name) char *name; { return (struct netent *) 0; }
249: struct netent * getnetent() { return (struct netent *) 0; }
250: int getopt(argc, argv, optstr) char **argv, *optstr; { return EOF; }
251: char * getpass( n ) char *n ; { return n; }
252: struct protoent * getprotobyname(name) char *name; { return (struct protoent *) 0; }
253: struct protoent * getprotobynumber(proto) { return (struct protoent *) 0; }
254: struct protoent * getprotoent() { return (struct protoent *) 0; }
255: int getpw( u, b) char *b; { return 0; }
256: struct passwd * getpwent() { return (struct passwd *)NULL; }
257: struct passwd * getpwuid( n ) { return (struct passwd *)NULL; }
258: struct passwd * getpwnam( n ) char *n; { return (struct passwd *)NULL; }
259: struct servent * getservbyname(name, proto) char *name, *proto; { return (struct servent *) 0; }
260: struct servent * getservbyport(port, proto) char *proto; { return (struct servent *) 0; }
261: struct servent * getservent() { return (struct servent *) 0; }
262: struct ttyent * getttynam(name) char *name; { return (struct ttyent *) 0; }
263: char * getusershell() { return (char *) 0; }
264: char * getwd(pathname) char *pathname; { return pathname; }
265: struct tm * gmtime(c) long *c; { return gmtime(c); }
266: int gtty(f, b) struct sgttyb *b; { return(0); }
267: #ifndef htonl
268: unsigned long htonl(hostlong) u_long hostlong; { return hostlong; }
269: #endif htonl
270: #ifndef htons
271: unsigned short htons(hostshort) u_short hostshort; { return hostshort; }
272: #endif htons
273: char * index(s, c) char *s, c; { return s; }
274: u_long inet_addr(cp) char *cp; { return 0L; }
275: u_long inet_lnaof(in) struct in_addr in; { return 0L; }
276: u_long inet_netof(in) struct in_addr in; { return 0L; }
277: struct in_addr inet_makeaddr(net, host) { struct in_addr in; return in; }
278: u_long inet_network(cp) char *cp; { return 0L; }
279: char * inet_ntoa(in) struct in_addr in; { return (char *) 0; }
280: int initgroups(uname, agroup) char *uname; { return 0; }
281: char * initstate( s, st, n) unsigned s; char *st; { return st; }
282: insque(elem, pred) struct qelem *elem, pred; { ; }
283: int isatty(f) { return 1; }
284: double ldexp( v, e) double v; { return v; }
285: longjmp( e, v) jmp_buf e; {;}
286: longjmperror() {;}
287: struct tm *localtime(c) long *c; { return localtime(c); }
288: char * malloc(n) unsigned n; {static char c; return(&c);}
289: char * memccpy(t, f, c, n) char *t, *f; { return t; }
290: char * memchr(s, c, n) char *s; { return s; }
291: int memcmp(s1, s2, n) char *s1, *s2; { return 0; }
292: char * memcpy(t, f, n) char *t, *f; { return t; }
293: char * memset(s, c, n) char *s; { return s; }
294: char * mktemp(p) char *p; { return(p);}
295: int mkstemp(p) char *p; { return(0);}
296: double modf( v, p ) double v, *p; { return v; }
297: moncontrol(mode) { ; }
298: monitor(l, h, b, s, n) int (*l)(), (*h)(); short *b; {}
299: monstartup( l, h) int (*l)(), (*h)(); {;}
300: int nice(incr) { return 0; }
301: int nlist( f, n) char *f; struct nlist n[]; { return (0);}
302: struct ns_addr ns_addr(name) char *name; { struct ns_addr ns; return ns; }
303: char * ns_ntoa(addr) struct ns_addr addr; { return (char *) 0; }
304: #ifndef ntohl
305: u_long ntohl(netlong) u_long netlong; { return netlong; }
306: #endif ntohl
307: #ifndef ntohs
308: u_short ntohs(netshort) u_short netshort; { return netshort; }
309: #endif ntohs
310: DIR * opendir( f ) char *f; { return (DIR *)NULL; }
311: openlog(s, f, l) char *s; {}
312: char * optarg;
313: int optind;
314: pause() {;}
315: perror(s) char *s; {}
316: psignal(sig, s) unsigned sig; char *s; {}
317: qsort( b, n, w, c ) char *b; int (*c)(); {;}
318: int rand(){ return 1; }
319: long random() { return 1L; }
320: int rcmd(a, rp, lu, ru, c, f) char **a, *lu, *ru, *c; u_short rp; int *f; { return 0; }
321: char * re_comp(s) char *s ; { return s; }
322: int re_exec(s) char *s ; { return 1; }
323: struct direct * readdir( p ) DIR *p; { return (struct direct *)NULL; }
324: char * realloc(p, n) char *p; unsigned n; { static char c[1]; return(c);}
325: remque(elem) struct qelem *elem; { ; }
326: int rexec(a, rp, n, p, c, f) char **a, *n, *p, *c; u_short rp; int *f; { return 0; }
327: char * rindex(s, c) char *s, c; { return s; }
328: int rresvport(p) int *p; { return 0; }
329: int ruserok(rh, su, ru, lu) char *rh, *ru, *lu; { return 0; }
330: int scandir(d, n, s, c) char *d; struct direct *(*n[]); int (*s)(),(*c)();
331: { return 1; }
332: void seekdir( p, l) DIR *p; long l; {}
333: int setegid(egid) gid_t egid; { return 0; }
334: int seteuid(euid) uid_t euid; { return 0; }
335: int setfsent() { return 0; }
336: int setgrent() { return 0; }
337: int setgid(g) gid_t g; { return(0); }
338: sethostent(stayopen) { ; }
339: sethostfile(name) char *name; { ; }
340: int setjmp(e) jmp_buf e; { return(0); }
341: setkey(k) char *k; {}
342: int setlogmask(m) { return(0); }
343: setnetent(stayopen) { ; }
344: setprotoent(stayopen) { ; }
345: setpwent() {}
346: void setpwfile(file) char *file; {}
347: int setrgid(rgid) gid_t rgid; { return 0; }
348: int setruid(ruid) uid_t ruid; { return 0; }
349: setservent(stayopen) { ; }
350: char * setstate( st ) char *st; { return st; }
351: setttyent() { ; }
352: int setuid(u) uid_t u; { return(0); }
353: setusershell() { ; }
354: int siginterrupt(sig, flag) { return 0; }
355: sleep(i) unsigned i; {}
356: int srand(s){ return s; }
357: char * strcat(a, b) char *a, *b; { return a; }
358: char * strcatn(a, b, n) char *a, *b; { return a;}
359: char * strchr(s, c) char *s, c; { return s; }
360: int strcmp(a, b) char *a, *b; { return(1); }
361: int strcasecmp(a, b) char *a, *b; { return(1); }
362: int strcmpn(a, b, n) char *a, *b; { return(1); }
363: char * strcpy(a, b) char *a, *b; { return a; }
364: char * strcpyn(a, b, n) char *a, *b; { return a; }
365: int strcspn(s, set) char *s, *set; { return(0); }
366: int strlen(s) char *s; { return(1); }
367: char * strncat(a, b, n) char *a, *b; { return a;}
368: int strncmp(a, b, n) char *a, *b; { return(1); }
369: int strncasecmp(a, b, n) char *a, *b; { return(1); }
370: char * strncpy(a, b, n) char *a, *b; { return a; }
371: char * strpbrk(s, brk) char *s, *brk; { return s; }
372: char * strrchr(s, c) char *s, c; { return s; }
373: int strspn(s, set) char *s, *set; { return(0); }
374: char * strtok(s, sep) char *s, *sep; { return s; }
375: int stty(f, b) struct sgttyb *b; { return(0); }
376: swab( f, t, n) char *f, *t; {;}
377: /* VARARGS2 */
378: syslog(l, f) char *f; {}
379: char * sys_errlist[];
380: char * sys_siglist[];
381: int sys_nerr;
382: int system(s) char *s; { return(0); }
383: long tell(f) { return((long)0); }
384: long telldir( p ) DIR *p; { return 1L; }
385: long time(t) long *t; { return( 0L );}
386: int times(tmsp) struct tms *tmsp; { return 0; }
387: char * timezone( z, d ){ return (char *)0; }
388: char * tmpnam(s) char *s; { return s; }
389: char * ttyname(f) { return " "; }
390: int ttyslot() { return 1; }
391: unsigned ualarm(value, interval) unsigned value, interval; { return 0; }
392: usleep(useconds) unsigned useconds; { ; }
393: int utime(name, timep) char *name; time_t *timep; { return 0; }
394: char * valloc(s) unsigned s; { return malloc(s); }
395: int vlimit(limit, value) { return 0; }
396: int vtimes(par, ch) struct vtimes *par, *ch; { return 0; }
397:
398: /* standard I/O library */
399:
400: int fclose(f) FILE *f; {return(0);}
401: FILE * fdopen(fd, m) char *m; { return(stdin);}
402: int fflush(f) FILE *f; {return(0);}
403: int fgetc(f) FILE *f; {return 0; }
404: char * fgets( s, l, f ) char *s; FILE *f; { return(s); }
405: int _filbuf( f ) FILE *f; { return 0; }
406: int _flsbuf( c, f ) unsigned char c; FILE *f; { return 0; }
407: FILE * fopen(s,m) char *s, *m; { return(stdin); }
408: /* VARARGS2 */
409: fprintf( f, s ) FILE *f; char *s; {;}
410: int fputc(c, f) char c; FILE *f; {return 0; }
411: fputs(s,f) char *s; FILE *f; {;}
412: int fread( p, s, n, f ) char *p; FILE *f; {return(1);}
413: FILE * freopen(s, m, f) char *s, *m; FILE *f; { return(stdin); }
414: /* VARARGS2 */
415: fscanf( f, s ) FILE *f; char *s; {return(1);}
416: int fseek(f, o, p) FILE *f; long o; { return(0); }
417: long ftell(f) FILE *f; { return(0L); }
418: int fwrite( p, s, n, f ) char *p; FILE *f; {return(0);}
419: #ifndef getc
420: int getc(f) FILE *f; { return EOF; }
421: #endif getc
422: int getw(f) FILE *f; { return 0;}
423: char * gets( s ) char *s; { return(s); }
424: struct _iobuf _iob[];
425: int pclose( f ) FILE *f; { return 0; }
426: FILE * popen( c, t ) char *c, *t; { return(stdin); }
427: /* VARARGS1 */
428: printf( s ) char *s; {;}
429: puts(s) char *s;{;}
430: #ifndef putc
431: int putc(c, f) char c; FILE *f; { return 0; }
432: #endif putc
433: int putw(w, f) FILE *f; { return 0;}
434: rewind(f) FILE *f; {;}
435: /* VARARGS1 */
436: scanf( f ) char *f; {return(1); }
437: setbuf( f, b ) FILE *f; char *b; {;}
438: setbuffer( f, b, s ) FILE *f; char *b; {;}
439: setlinebuf( f ) FILE *f; {;}
440: /* VARARGS2 */
441: int sprintf( s, f ) char *s, *f; { return(1);}
442: /* VARARGS2 */
443: sscanf( s, f ) char *s, *f; { return(1); }
444: ungetc( c, f ) FILE *f; { return(c); }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.