Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / lint / llib / unix7.c
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: unix7.c,v 1.6 1994/06/24 12:24:11 ceriel Exp $ */
6
7 /* File containing definitions of the UNIX system calls and some other
8  * functions.
9  * Used to fine-tune the -lc library.
10  */
11
12         /* LINTLIBRARY */
13
14 #include <stdio.h>
15 #include <sgtty.h>
16 #include <signal.h>
17 #include <sys/types.h>
18 #include <sys/stat.h>
19 #include <sys/ioctl.h>
20 #include <sys/timeb.h>
21 #include <time.h>
22
23 int     access(s, m) char *s; { return(0); }
24 int     acct(s) char *s; { return(0); }
25 int     alarm(s) unsigned s; { return(0); }
26 char    *brk(a) char *a; { return(a); }
27 char    *sbrk(i) { return((char *)0); }
28 int     chdir(s) char *s; { return(0); }
29 int     chroot(s) char *s; { return(0); }
30 int     chmod(s, m) char *s; { return(0); }
31 int     chown(s, u, g) char *s; { return(0); }
32 int     close(f) { return(0); }
33 int     creat(s, m) char *s; { return(0); }
34 int     dup(f) { return(0); }
35 int     dup2(f1, f2) { return(0); }
36         /*VARARGS2*/
37         execl(f, a) char *f, *a; { ; }
38         execv(s, a) char *s, *a[]; { ; }
39         /*VARARGS3*/
40         execle(f, a, s) char *f, *a, *s; { ; }
41         execve(s, a, e) char *s, *a[], *e[]; { ; }
42         _exit(s) { ; }
43 int     fork() { return(0); }
44 int     getpid() { return(0); }
45 int     getuid() { return(0); }
46 int     getgid() { return(0); }
47 int     geteuid() { return(0); }
48 int     getegid() { return(0); }
49         /*VARARGS2*/
50 int     ioctl(d, r) int d; unsigned int r; { return(0); }
51 int     kill(p, s) { return(0); }
52 int     link(a, b) char *a, *b; { return(0); }
53 long    lseek(f, o, d) long o; { return(0); }
54 int     mknod(n, m, a) char *n; { return(0); }
55 int     mount(s, n, f) char *s, *n; { return(0); }
56 int     umount(s) char *s; { return(0); }
57 int     nice(p) { return(0); }
58 int     open(f, m) char *f; { return(0); }
59         pause() { ; }
60 int     pipe(f) int f[2]; { return(0); }
61         profil(b, s, o, i) char *b; { ; }
62 int     ptrace(r, p, a, d) int *a;{ return(0); }
63 int     read(f, b, l) char *b; { return(0); }
64 int     setuid(u) { return(0); }
65 int     setgid(g) { return(0); }
66 #ifndef __STDC__
67 int     (*signal(c, f))() int (*f)(); { return(f); }
68 #endif
69 int     stat(s, b) char *s; struct stat *b; { return(0); }
70 int     fstat(f, b) struct stat *b; { return(0); }
71 int     stime(t) time_t *t; { return(0); }
72         sync() { ; }
73 time_t  time(t) time_t *t; { return( 0 ); }
74         ftime(t) struct timeb *t; { ; }
75         times(b) struct tbuf *b; { ; }
76 int     umask(c) { return(0); }
77 int     unlink(s) char *s; { return(0); }
78 int     utime(f, t) char *f; time_t t[2]; { return(0); }
79 int     wait(s) int *s; { return(0); }
80 int     write(f, b, l) char *b; { return(0); }
81 int     abort() {/*NOTREACHED*/ }
82
83 /* Some definitions of format functions */
84 /* FORMAT0 $
85         %[dox] = int            %l[dox] = long          %[DOX] = long
86         %u = unsigned int       %lu = unsigned long     %U = unsigned long
87         %[feg] = double
88         %c = int                %s = char *
89 $ */
90 #ifdef __STDC__
91 int     printf(const char *_format, ...) { return(0); }
92 #else
93 printf(fmt) char *fmt; { ; }
94 #endif
95
96 /* FORMAT1 */
97 #ifdef __STDC__
98 int     fprintf(FILE *_stream, const char *_format, ...) { return(0); }
99 #else
100 fprintf(fp, fmt) FILE *fp; char *fmt; { ; }
101 #endif
102 /* FORMAT1 */
103 #ifdef __STDC__
104 int     sprintf(char *_s, const char *_format, ...) { return(0); }
105 #else
106 sprintf(s, fmt) char *s; char *fmt; { ; }
107 #endif
108
109 /* FORMAT0 $
110         %[dox] = int *          %l[dox] = long *        %[DOX] = long *
111         %h[dox] = short *
112         %u = unsigned int *     %lu = unsigned long *   %U = unsigned long *
113         %[fe] = float *         %l[fe] = double *       %[FE] = double *
114         %c = char *             %s = char *             %[[] = char *
115 $ */
116 #ifdef __STDC__
117 int     scanf(const char *_format, ...) { return(0); }
118 #else
119 int scanf(fmt) char *fmt; { return(0); }
120 #endif
121 /* FORMAT1 */
122 #ifdef __STDC__
123 int     fscanf(FILE *_stream, const char *_format, ...) { return(0); }
124 #else
125 int fscanf(fp, fmt) FILE *fp; char *fmt; { return(0); }
126 #endif
127 /* FORMAT1 */
128 #ifdef __STDC__
129 int     sscanf(const char *_s, const char *_format, ...) { return(0); }
130 #else
131 int sscanf(s, fmt) char *s; char *fmt; { return(0); }
132 #endif
133 int _flsbuf(i, fp) unsigned int i; FILE *fp; { return(0); }
134
135 /* System variables */
136 char **environ;
137 int errno;
138 char *sys_errlist[1];