home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / perkinelmeridris / pe7sys.h < prev    next >
C/C++ Source or Header  |  2020-01-01  |  3KB  |  142 lines

  1. /*  THE SYSTEM HEADER
  2.  *  copyright (c) 1978 by Whitesmiths, Ltd.
  3.  */
  4.  
  5. /*  the system error codes
  6.  */
  7. #define EPERM   1
  8. #define ENOENT  2
  9. #define ESRCH   3
  10. #define EINTR   4
  11. #define EIO     5
  12. #define ENXIO   6
  13. #define E2BIG   7
  14. #define ENOEXEC 8
  15. #define EBADF   9
  16. #define ECHILD  10
  17. #define EAGAIN  11
  18. #define ENOMEM  12
  19. #define EACCES  13
  20. #define EFAULT  14
  21. #define ENOTBLK 15
  22. #define EBUSY   16
  23. #define EEXIST  17
  24. #define EXDEV   18
  25. #define ENODEV  19
  26. #define ENOTDIR 20
  27. #define EISDIR  21
  28. #define EINVAL  22
  29. #define ENFILE  23
  30. #define EMFILE  24
  31. #define ENOTTY  25
  32. #define ETXTBSY 26
  33. #define EFBIG   27
  34. #define ENOSPC  28
  35. #define ESPIPE  29
  36. #define EROFS   30
  37. #define EMLINK  31
  38. #define EPIPE   32
  39. #define EDOM    33
  40. #define ERANGE  34
  41.  
  42. /*  the signals
  43.  */
  44. #define NOSIG   1
  45. #define SIGHUP  1
  46. #define SIGINT  2
  47. #define SIGQUIT 3
  48. #define SIGILIN 4
  49. #define SIGTRC  5
  50. #define SIGRNG  6
  51. #define SIGDOM  7
  52. #define SIGFPT  8
  53. #define SIGKILL 9
  54. #define SIGBUS  10
  55. #define SIGSEG  11
  56. #define SIGSYS  12
  57. #define SIGPIPE 13
  58. #define SIGALRM 14
  59. #define SIGTERM 15
  60. #define NSIG    16
  61.  
  62. /*  i/o parameters
  63.  */
  64. #define DIRSIZE 14
  65. #define NAMSIZE 64
  66.  
  67. /*  macros
  68.  */
  69. #define isblk(mod)  (((mod) & 060000) == 060000)
  70. #define ischr(mod)  (((mod) & 060000) == 020000)
  71. #define isdir(mod)  (((mod) & 060000) == 040000)
  72.  
  73. /*  error returns
  74.  */
  75. typedef COUNT ERROR;
  76.  
  77. /*  directory structure
  78.  */
  79. typedef struct {
  80.     UCOUNT d_ino;
  81.     TEXT d_name[DIRSIZE];
  82.     } DIR;
  83.  
  84. /*  stat and fstat structure
  85.  */
  86. typedef struct {
  87.     UCOUNT s_dev;
  88.     UCOUNT s_ino;
  89.     BITS s_mode;
  90.     UTINY s_link;
  91.     UTINY s_uid, s_gid;
  92.     UTINY s_size0;
  93.     UCOUNT s_size1;
  94.     UCOUNT s_addr[8];
  95.     LONG s_actime, s_uptime;
  96.     } STAT;
  97.  
  98. /*  stty and gtty structure
  99.  */
  100. #define TTY struct tty
  101. struct tty {
  102.     TEXT t_ispeed, t_ospeed;
  103.     TEXT t_erase, t_kill;
  104.     BITS t_mode;
  105.     TEXT t_cgo, t_cstop;
  106.     UTINY t_min, t_time;
  107.     };
  108.  
  109. /*  codes for t_mode
  110.  */
  111. #define M_HUP   0x0001
  112. #define M_XTABS 0x0002
  113. #define M_LCASE 0x0004
  114. #define M_ECHO  0x0008
  115. #define M_CRTLF 0x0010
  116. #define M_RAW   0x0020
  117. #define M_ODD   0x0040
  118. #define M_EVEN  0x0080
  119. #define M_DECHO 0x0100
  120. #define M_DCD   0x0200
  121. #define M_CNTL  0x0400
  122. #define M_SBRK  0x0800
  123. #define M_RBRK  0x3000
  124. #define M_2STOP 0x4000
  125. #define M_ALL   0x8000
  126.  
  127. /*  define individual recieve break modes */
  128. #define M_NBRK  0x0000
  129. #define M_KBRK  0x1000
  130. #define M_0BRK  0x2000
  131. #define M_FBRK  0x3000
  132.  
  133. /*  special modes for raw only */
  134. #define MR_PRI  0x0006  /* initial priority of RS-232 input */
  135. #define MR_DTR  0x0008  /* use DTR in hardware handshake mode */
  136. #define MR_XON  0x0010
  137. #define MR_TERM 0x0100  /* enable terminator characters */
  138. /*  initial raw mode input priority */
  139. #define MR_PLOW 0x0000  /* start out at rock bottom */
  140. #define MR_P0   0x0002  /* start out at zero priority */
  141. #define MR_PHI  0x0004  /* start out with high priority */
  142.