home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / unix / unixlib_1 / !UnixLib37_src_clib_h_termio < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-09  |  4.6 KB  |  208 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/clib/h/RCS/termio,v $
  4.  * $Date: 1996/10/30 21:58:58 $
  5.  * $Revision: 1.3 $
  6.  * $State: Rel $
  7.  * $Author: unixlib $
  8.  *
  9.  * $Log: termio,v $
  10.  * Revision 1.3  1996/10/30 21:58:58  unixlib
  11.  * Massive changes made by Nick Burret and Peter Burwood.
  12.  *
  13.  * Revision 1.2  1996/09/16 21:23:51  unixlib
  14.  * CL_0002 Nick Burret
  15.  * Minor changes to file handling
  16.  * Change most error numbers, and use in assembler sources (SJC)
  17.  * Various minor bug fixes and compatability changes.
  18.  *
  19.  * Revision 1.1  1996/04/19 21:02:57  simon
  20.  * Initial revision
  21.  *
  22.  ***************************************************************************/
  23.  
  24. #ifndef __TERMIO_H
  25. #define __TERMIO_H
  26.  
  27. #ifndef __UNIXLIB_TYPES_H
  28. #include <unixlib/types.h>
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #define NCC    16
  36.  
  37. #define SSPEED    7
  38.  
  39. struct termio
  40.   {
  41.   __tcflag_t    c_iflag;    /* input modes */
  42.   __tcflag_t    c_oflag;    /* output modes */
  43.   __tcflag_t    c_cflag;    /* control modes */
  44.   __tcflag_t    c_lflag;    /* line discipline modes */
  45.   char        c_line;     /* line discipline */
  46.   __cc_t    c_cc[NCC];    /* control chars */
  47.   };
  48.  
  49. #define TCGETA        00001
  50. #define TCSETA        00002
  51. #define TCSETAW     00006
  52. #define TCSETAF     00006
  53. #define TCSBRK        00010
  54. #define TCFLSH        00004
  55. #define TCXONC        0
  56.  
  57. #define TCGETS        00001
  58. #define TCSETS        00002
  59. #define TCSETSW     00006
  60. #define TCSETSF     00006
  61. #define TCSNDBRK    00010
  62. #define TCDRAIN     00004
  63.  
  64. struct winsize
  65.   {
  66.   unsigned short    ws_row;     /* rows in characters */
  67.   unsigned short    ws_col;     /* columns in characters */
  68.   unsigned short    ws_xpixel;    /* horizontal size in pixels */
  69.   unsigned short    ws_ypixel;    /* vertical size in pixels */
  70.   };
  71.  
  72. #define TIOCGWINSZ    00100
  73. #define TIOCSWINSZ    00200
  74.  
  75. #define VINTR        0
  76. #define VQUIT        1    /* only generated from within read() */
  77. #define VERASE        2
  78. #define VKILL        3
  79. #define VEOF        4
  80. #define VEOT        4
  81. #define VMIN        4
  82. #define VEOL        5
  83. #define VTIME        5
  84. #define VEOL2        6
  85. #define VSWTCH        7
  86. #define VSTART        8    /* unimplemented */
  87. #define VSTOP        9    /* unimplemented */
  88. #define VSUSP        10    /* unimplemented */
  89. #define VREPRINT    12
  90. #define VDISCARD    13    /* unimplemented */
  91. #define VWERASE     14
  92. #define VLNEXT        15
  93.  
  94. #define CINTR        '\003'    /* ^C */
  95. #define CQUIT        '\034'    /* ^\ */
  96. #define CERASE        '\177'    /* ^? */
  97. #define CKILL        '\025'    /* ^U */
  98. #define CEOF        '\004'    /* ^D */
  99. #define CEOT        '\004'    /* ^D */
  100. #define CEOL        '\000'
  101. #define CEOL2        '\000'
  102. #define CSWTCH        '\000'
  103. #define CSTART        '\021'    /* ^Q */
  104. #define CSTOP        '\023'    /* ^S */
  105. #define CSUSP        '\032'    /* ^Z */
  106. #define CREPRINT    '\022'    /* ^R */
  107. #define CDISCARD    '\017'    /* ^O */
  108. #define CWERASE     '\027'    /* ^W */
  109. #define CLNEXT        '\026'    /* ^V */
  110.  
  111. #define IGNBRK    0x00000001
  112. #define BRKINT    0x00000002
  113. #define IGNPAR    0x00000004
  114. #define PARMRK    0x00000008
  115. #define INPCK    0x00000010
  116. #define ISTRIP    0x00000020
  117. #define INLCR    0x00000040
  118. #define IGNCR    0x00000080
  119. #define ICRNL    0x00000100
  120. #define IUCLC    0x00000200
  121. #define IXON    0x00000400
  122. #define IXANY    0x00000800
  123. #define IXOFF    0x00001000
  124. #define IMAXBEL 0x00002000
  125.  
  126. #define OPOST    0x00000001
  127. #define OLCUC    0x00000002
  128. #define ONLCR    0x00000004
  129. #define OCRNL    0x00000008
  130. #define ONOCR    0x00000010
  131. #define ONLRET    0x00000020
  132. #define OFILL    0x00000040
  133. #define OFDEL    0x00000080
  134. #define NLDLY    0x00000100
  135. #define NL0    0
  136. #define NL1    0x00000100
  137. #define CRDLY    0x00000600
  138. #define CR0    0
  139. #define CR1    0x00000200
  140. #define CR2    0x00000400
  141. #define CR3    0x00000600
  142. #define TABDLY    0x00001800
  143. #define TAB0    0
  144. #define TAB1    0x00000800
  145. #define TAB2    0x00001000
  146. #define TAB3    0x00001800
  147. #define XTABS    TAB3
  148. #define BSDLY    0x00002000
  149. #define BS0    0
  150. #define BS1    0x00002000
  151. #define VTDLY    0x00004000
  152. #define VT0    0
  153. #define VT1    0x00004000
  154. #define FFDLY    0x00008000
  155. #define FF0    0
  156. #define FF1    0x00008000
  157.  
  158. #define CBAUD    0x0000000f
  159. #define CIBAUD    0x000000f0
  160. #define IBSHIFT 4
  161.  
  162. /* impossible h/ware speed changes are ignored */
  163.  
  164. #define B0    0
  165. #define B50    0x00000001
  166. #define B75    0x00000002
  167. #define B110    0x00000003
  168. #define B134    0x00000004
  169. #define B150    0x00000005
  170. #define B200    0x00000006
  171. #define B300    0x00000007
  172. #define B600    0x00000008
  173. #define B1200    0x00000009
  174. #define B1800    0x0000000a
  175. #define B2400    0x0000000b
  176. #define B4800    0x0000000c
  177. #define B9600    0x0000000d
  178. #define B19200    0x0000000e
  179. #define B38400    0x0000000f
  180.  
  181. #define CSIZE    0x00000300
  182. #define CS5    0
  183. #define CS6    0x00000100
  184. #define CS7    0x00000200
  185. #define CS8    0x00000300
  186.  
  187. #define CSTOPB    0x00000400
  188. #define CREAD    0x00000800
  189. #define PARENB    0x00001000
  190. #define PARODD    0x00002000
  191. #define HUPCL    0x00004000
  192. #define CLOCAL    0x00008000
  193.  
  194. #define ISIG    0x00000001
  195. #define ICANON    0x00000002
  196. #define XCASE    0x00000004
  197. #define ECHO    0x00000008
  198. #define ECHOE    0x00000010
  199. #define ECHOK    0x00000020
  200. #define ECHONL    0x00000040
  201. #define NOFLSH    0x00000080
  202.  
  203. #ifdef __cplusplus
  204.     }
  205. #endif
  206.  
  207. #endif
  208.