home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / unixtools / unixlib / clib / h / termio < prev    next >
Encoding:
Text File  |  1992-07-21  |  3.4 KB  |  162 lines

  1. /* termio.h (c) Copyright 1990 H.Rogers */
  2.  
  3. #ifndef __TERMIO_H
  4. #define __TERMIO_H
  5.  
  6. #define NCC    16
  7.  
  8. #define SSPEED    7
  9.  
  10. struct termio
  11.   {
  12.   unsigned short    c_iflag;    /* input modes */
  13.   unsigned short    c_oflag;    /* output modes */
  14.   unsigned short    c_cflag;    /* control modes */
  15.   unsigned short    c_lflag;    /* line discipline modes */
  16.   char            c_line;     /* line discipline */
  17.   unsigned char     c_cc[NCC];    /* control chars */
  18.   };
  19.  
  20. #define TCGETA        00001
  21. #define TCSETA        00002
  22. #define TCSETAW     00006
  23. #define TCSETAF     00006
  24. #define TCSBRK        0
  25. #define TCFLSH        00004
  26. #define TCXONC        0
  27.  
  28. #define TCGETS        00001
  29. #define TCSETS        00002
  30. #define TCSETSW     00006
  31. #define TCSETSF     00006
  32. #define TCSNDBRK    0
  33. #define TCDRAIN     00004
  34.  
  35. #define VINTR        0
  36. #define VQUIT        1
  37. #define VERASE        2
  38. #define VKILL        3
  39. #define VEOF        4
  40. #define VEOT        4
  41. #define VMIN        4
  42. #define VEOL        5
  43. #define VTIME        5
  44. #define VEOL2        6
  45. #define VSWTCH        7
  46. #define VSTART        8
  47. #define VSTOP        9
  48. #define VSUSP        10
  49. #define VREPRINT    12
  50. #define VDISCARD    13
  51. #define VWERASE     14
  52. #define VLNEXT        15
  53.  
  54. #define CINTR        '\003'    /* ^C */
  55. #define CQUIT        '\034'    /* ^\ */
  56. #define CERASE        '\177'    /* ^? */
  57. #define CKILL        '\025'    /* ^U */
  58. #define CEOF        '\004'    /* ^D */
  59. #define CEOT        '\004'    /* ^D */
  60. #define CEOL        '\000'
  61. #define CEOL2        '\000'
  62. #define CSWTCH        '\000'
  63. #define CSTART        '\021'    /* ^Q */
  64. #define CSTOP        '\023'    /* ^S */
  65. #define CSUSP        '\032'    /* ^Z */
  66. #define CREPRINT    '\022'    /* ^R */
  67. #define CDISCARD    '\017'    /* ^O */
  68. #define CWERASE     '\027'    /* ^W */
  69. #define CLNEXT        '\026'    /* ^V */
  70.  
  71. #define IGNBRK    0x00000001
  72. #define BRKINT    0x00000002
  73. #define IGNPAR    0x00000004
  74. #define PARMRK    0x00000008
  75. #define INPCK    0x00000010
  76. #define ISTRIP    0x00000020
  77. #define INLCR    0x00000040
  78. #define IGNCR    0x00000080
  79. #define ICRNL    0x00000100
  80. #define IUCLC    0x00000200
  81. #define IXON    0x00000400
  82. #define IXANY    0x00000800
  83. #define IXOFF    0x00001000
  84. #define IMAXBEL 0x00002000
  85.  
  86. #define OPOST    0x00000001
  87. #define OLCUC    0x00000002
  88. #define ONLCR    0x00000004
  89. #define OCRNL    0x00000008
  90. #define ONOCR    0x00000010
  91. #define ONLRET    0x00000020
  92. #define OFILL    0x00000040
  93. #define OFDEL    0x00000080
  94. #define NLDLY    0x00000100
  95. #define NL0    0
  96. #define NL1    0x00000100
  97. #define CRDLY    0x00000600
  98. #define CR0    0
  99. #define CR1    0x00000200
  100. #define CR2    0x00000400
  101. #define CR3    0x00000600
  102. #define TABDLY    0x00001800
  103. #define TAB0    0
  104. #define TAB1    0x00000800
  105. #define TAB2    0x00001000
  106. #define TAB3    0x00001800
  107. #define XTABS    TAB3
  108. #define BSDLY    0x00002000
  109. #define BS0    0
  110. #define BS1    0x00002000
  111. #define VTDLY    0x00004000
  112. #define VT0    0
  113. #define VT1    0x00004000
  114. #define FFDLY    0x00008000
  115. #define FF0    0
  116. #define FF1    0x00008000
  117.  
  118. #define CBAUD    0x0000000f
  119. #define CIBAUD    0x000000f0
  120. #define IBSHIFT 4
  121.  
  122. #define B0    0
  123. #define B50    0x00000001
  124. #define B75    0x00000002
  125. #define B110    0x00000003
  126. #define B134    0x00000004
  127. #define B150    0x00000005
  128. #define B200    0x00000006
  129. #define B300    0x00000007
  130. #define B600    0x00000008
  131. #define B1200    0x00000009
  132. #define B1800    0x0000000a
  133. #define B2400    0x0000000b
  134. #define B4800    0x0000000c
  135. #define B9600    0x0000000d
  136. #define B19200    0x0000000e
  137. #define B38400    0x0000000f
  138.  
  139. #define CSIZE    0x00000300
  140. #define CS5    0
  141. #define CS6    0x00000100
  142. #define CS7    0x00000200
  143. #define CS8    0x00000300
  144.  
  145. #define CSTOPB    0x00000400
  146. #define CREAD    0x00000800
  147. #define PARENB    0x00001000
  148. #define PARODD    0x00002000
  149. #define HUPCL    0x00004000
  150. #define CLOCAL    0x00008000
  151.  
  152. #define ISIG    0x00000001
  153. #define ICANON    0x00000002
  154. #define XCASE    0x00000004
  155. #define ECHO    0x00000008
  156. #define ECHOE    0x00000010
  157. #define ECHOK    0x00000020
  158. #define ECHONL    0x00000040
  159. #define NOFLSH    0x00000080
  160.  
  161. #endif
  162.