termbits.h 4.1 KB

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