home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / FGREP11.ZIP / UNIX.H < prev   
C/C++ Source or Header  |  1990-08-27  |  3KB  |  80 lines

  1. /* unix.h - prototype UNIX system calls and a few library routines.
  2.    In the Public Domain; written by Mike Haertel. */
  3.  
  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>
  9.  
  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 */
  23.  
  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));
  59.  
  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, ...));
  74.  
  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;
  80.