termbits.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. #ifndef _ALPHA_TERMBITS_H
  2. #define _ALPHA_TERMBITS_H
  3. #include <linux/posix_types.h>
  4. typedef unsigned char cc_t;
  5. typedef unsigned int speed_t;
  6. typedef unsigned int tcflag_t;
  7. /*
  8. * termios type and macro definitions. Be careful about adding stuff
  9. * to this file since it's used in GNU libc and there are strict rules
  10. * concerning namespace pollution.
  11. */
  12. #define NCCS 19
  13. struct termios {
  14. tcflag_t c_iflag; /* input mode flags */
  15. tcflag_t c_oflag; /* output mode flags */
  16. tcflag_t c_cflag; /* control mode flags */
  17. tcflag_t c_lflag; /* local mode flags */
  18. cc_t c_cc[NCCS]; /* control characters */
  19. cc_t c_line; /* line discipline (== c_cc[19]) */
  20. speed_t c_ispeed; /* input speed */
  21. speed_t c_ospeed; /* output speed */
  22. };
  23. /* Alpha has identical termios and termios2 */
  24. struct termios2 {
  25. tcflag_t c_iflag; /* input mode flags */
  26. tcflag_t c_oflag; /* output mode flags */
  27. tcflag_t c_cflag; /* control mode flags */
  28. tcflag_t c_lflag; /* local mode flags */
  29. cc_t c_cc[NCCS]; /* control characters */
  30. cc_t c_line; /* line discipline (== c_cc[19]) */
  31. speed_t c_ispeed; /* input speed */
  32. speed_t c_ospeed; /* output speed */
  33. };
  34. /* Alpha has matching termios and ktermios */
  35. struct ktermios {
  36. tcflag_t c_iflag; /* input mode flags */
  37. tcflag_t c_oflag; /* output mode flags */
  38. tcflag_t c_cflag; /* control mode flags */
  39. tcflag_t c_lflag; /* local mode flags */
  40. cc_t c_cc[NCCS]; /* control characters */
  41. cc_t c_line; /* line discipline (== c_cc[19]) */
  42. speed_t c_ispeed; /* input speed */
  43. speed_t c_ospeed; /* output speed */
  44. };
  45. /* c_cc characters */
  46. #define VEOF 0
  47. #define VEOL 1
  48. #define VEOL2 2
  49. #define VERASE 3
  50. #define VWERASE 4
  51. #define VKILL 5
  52. #define VREPRINT 6
  53. #define VSWTC 7
  54. #define VINTR 8
  55. #define VQUIT 9
  56. #define VSUSP 10
  57. #define VSTART 12
  58. #define VSTOP 13
  59. #define VLNEXT 14
  60. #define VDISCARD 15
  61. #define VMIN 16
  62. #define VTIME 17
  63. /* c_iflag bits */
  64. #define IGNBRK 0000001
  65. #define BRKINT 0000002
  66. #define IGNPAR 0000004
  67. #define PARMRK 0000010
  68. #define INPCK 0000020
  69. #define ISTRIP 0000040
  70. #define INLCR 0000100
  71. #define IGNCR 0000200
  72. #define ICRNL 0000400
  73. #define IXON 0001000
  74. #define IXOFF 0002000
  75. #define IXANY 0004000
  76. #define IUCLC 0010000
  77. #define IMAXBEL 0020000
  78. #define IUTF8 0040000
  79. /* c_oflag bits */
  80. #define OPOST 0000001
  81. #define ONLCR 0000002
  82. #define OLCUC 0000004
  83. #define OCRNL 0000010
  84. #define ONOCR 0000020
  85. #define ONLRET 0000040
  86. #define OFILL 00000100
  87. #define OFDEL 00000200
  88. #define NLDLY 00001400
  89. #define NL0 00000000
  90. #define NL1 00000400
  91. #define NL2 00001000
  92. #define NL3 00001400
  93. #define TABDLY 00006000
  94. #define TAB0 00000000
  95. #define TAB1 00002000
  96. #define TAB2 00004000
  97. #define TAB3 00006000
  98. #define CRDLY 00030000
  99. #define CR0 00000000
  100. #define CR1 00010000
  101. #define CR2 00020000
  102. #define CR3 00030000
  103. #define FFDLY 00040000
  104. #define FF0 00000000
  105. #define FF1 00040000
  106. #define BSDLY 00100000
  107. #define BS0 00000000
  108. #define BS1 00100000
  109. #define VTDLY 00200000
  110. #define VT0 00000000
  111. #define VT1 00200000
  112. #define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
  113. /* c_cflag bit meaning */
  114. #define CBAUD 0000037
  115. #define B0 0000000 /* hang up */
  116. #define B50 0000001
  117. #define B75 0000002
  118. #define B110 0000003
  119. #define B134 0000004
  120. #define B150 0000005
  121. #define B200 0000006
  122. #define B300 0000007
  123. #define B600 0000010
  124. #define B1200 0000011
  125. #define B1800 0000012
  126. #define B2400 0000013
  127. #define B4800 0000014
  128. #define B9600 0000015
  129. #define B19200 0000016
  130. #define B38400 0000017
  131. #define EXTA B19200
  132. #define EXTB B38400
  133. #define CBAUDEX 0000000
  134. #define B57600 00020
  135. #define B115200 00021
  136. #define B230400 00022
  137. #define B460800 00023
  138. #define B500000 00024
  139. #define B576000 00025
  140. #define B921600 00026
  141. #define B1000000 00027
  142. #define B1152000 00030
  143. #define B1500000 00031
  144. #define B2000000 00032
  145. #define B2500000 00033
  146. #define B3000000 00034
  147. #define B3500000 00035
  148. #define B4000000 00036
  149. #define BOTHER 00037
  150. #define CSIZE 00001400
  151. #define CS5 00000000
  152. #define CS6 00000400
  153. #define CS7 00001000
  154. #define CS8 00001400
  155. #define CSTOPB 00002000
  156. #define CREAD 00004000
  157. #define PARENB 00010000
  158. #define PARODD 00020000
  159. #define HUPCL 00040000
  160. #define CLOCAL 00100000
  161. #define CMSPAR 010000000000 /* mark or space (stick) parity */
  162. #define CRTSCTS 020000000000 /* flow control */
  163. #define CIBAUD 07600000
  164. #define IBSHIFT 16
  165. /* c_lflag bits */
  166. #define ISIG 0x00000080
  167. #define ICANON 0x00000100
  168. #define XCASE 0x00004000
  169. #define ECHO 0x00000008
  170. #define ECHOE 0x00000002
  171. #define ECHOK 0x00000004
  172. #define ECHONL 0x00000010
  173. #define NOFLSH 0x80000000
  174. #define TOSTOP 0x00400000
  175. #define ECHOCTL 0x00000040
  176. #define ECHOPRT 0x00000020
  177. #define ECHOKE 0x00000001
  178. #define FLUSHO 0x00800000
  179. #define PENDIN 0x20000000
  180. #define IEXTEN 0x00000400
  181. #define EXTPROC 0x10000000
  182. /* Values for the ACTION argument to `tcflow'. */
  183. #define TCOOFF 0
  184. #define TCOON 1
  185. #define TCIOFF 2
  186. #define TCION 3
  187. /* Values for the QUEUE_SELECTOR argument to `tcflush'. */
  188. #define TCIFLUSH 0
  189. #define TCOFLUSH 1
  190. #define TCIOFLUSH 2
  191. /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
  192. #define TCSANOW 0
  193. #define TCSADRAIN 1
  194. #define TCSAFLUSH 2
  195. #endif /* _ALPHA_TERMBITS_H */