Sync usage with man page.
[netbsd-mini2440.git] / gnu / usr.bin / fgrep / unix.h
blob3ac8cbd0dfdd8b35d286835abb483bae4dbbb0a7
1 /* unix.h - prototype UNIX system calls and a few library routines.
2 In the Public Domain; written by Mike Haertel. */
4 #define size_t unix_size_t
5 #include <sys/types.h>
6 #undef size_t
7 #include <sys/stat.h>
8 #include <sys/dir.h>
10 /* Optionally get the directory routines. The Makefile needs to
11 define which version. */
12 #ifdef DIRENT
13 #include <dirent.h>
14 #else
15 #ifdef SYSDIR
16 #include <sys/dir.h>
17 #else
18 #ifdef NDIR
19 #include <ndir.h>
20 #endif /* NDIR */
21 #endif /* SYSDIR */
22 #endif /* DIRENT */
24 /* Prototype certain UNIX system calls. */
25 extern int EXFUN(access, (const char *, int));
26 extern unsigned int EXFUN(alarm, (unsigned int));
27 extern PTR EXFUN(sbrk, (size_t));
28 extern int EXFUN(chdir, (const char *));
29 /* extern int EXFUN(chmod, (const char *, int)); /* */
30 extern int EXFUN(chown, (const char *, int, int));
31 extern int EXFUN(close, (int));
32 extern int EXFUN(creat, (const char *, int));
33 extern int EXFUN(dup, (int));
34 extern int EXFUN(execl, (const char *, ...));
35 extern int EXFUN(execv, (const char *, char **));
36 extern int EXFUN(execle, (const char *, ...));
37 extern int EXFUN(execve, (const char *, char **, char **));
38 extern int EXFUN(execlp, (const char *, ...));
39 extern int EXFUN(execvp, (const char *, char **));
40 extern void EXFUN(_exit, (int));
41 extern int EXFUN(fcntl, (int, int, int));
42 extern int EXFUN(fork, (void));
43 extern int EXFUN(getpid, (void));
44 extern int EXFUN(getppid, (void));
45 extern int EXFUN(ioctl, (int, int, PTR));
46 extern int EXFUN(kill, (int, int));
47 extern int EXFUN(link, (const char *, const char *));
48 extern long int EXFUN(lseek, (int, long int, int));
49 extern int EXFUN(open, (const char *, int, ...));
50 extern void EXFUN(pause, (void));
51 extern int EXFUN(pipe, (int *));
52 extern int EXFUN(read, (int, char *, size_t));
53 extern int EXFUN(stat, (const char *, struct stat *));
54 extern int EXFUN(fstat, (int, struct stat *));
55 /* extern int EXFUN(umask, (int)); /* */
56 extern int EXFUN(unlink, (const char *));
57 extern int EXFUN(wait, (int *));
58 extern int EXFUN(write, (int, const char *, size_t));
60 /* Prototype certain UNIX library routines. */
61 extern char *EXFUN(crypt, (const char *, const char *));
62 extern int EXFUN(getopt, (int, char **, const char *));
63 extern char EXFUN(getpass, (const char *));
64 extern unsigned int EXFUN(sleep, (unsigned int));
65 extern int EXFUN(isatty, (int));
66 extern const char *EXFUN(ttyname, (int));
67 extern int EXFUN(tgetent, (char *, const char *));
68 extern int EXFUN(tgetnum, (const char *));
69 extern int EXFUN(tgetflag, (const char *));
70 extern char *EXFUN(tgetstr, (const char *, char **));
71 extern char *EXFUN(tgoto, (const char *, int, int));
72 extern int EXFUN(tputs, (const char *, int, int EXFUN((*), (int))));
73 extern char *EXFUN(tparam, (const char *, char *, size_t, ...));
75 /* Declare a few UNIX-specific external objects. */
76 extern char PC, *BC, *UP;
77 extern short int ospeed;
78 extern char *optarg;
79 extern int optind;