termbits.h 4.1 KB

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