termbits.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:4k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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