termbits.h 4.6 KB

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