1
0

termios.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #undef NCCS
  2. #define NCCS 19
  3. struct termios {
  4. tcflag_t c_iflag;
  5. tcflag_t c_oflag;
  6. tcflag_t c_cflag;
  7. tcflag_t c_lflag;
  8. cc_t c_cc[NCCS];
  9. cc_t c_line;
  10. speed_t __c_ispeed;
  11. speed_t __c_ospeed;
  12. };
  13. #define VINTR 0
  14. #define VQUIT 1
  15. #define VERASE 2
  16. #define VKILL 3
  17. #define VEOF 4
  18. #define VMIN 5
  19. #define VEOL 6
  20. #define VTIME 7
  21. #define VEOL2 8
  22. #define VSWTC 9
  23. #define VWERASE 10
  24. #define VREPRINT 11
  25. #define VSUSP 12
  26. #define VSTART 13
  27. #define VSTOP 14
  28. #define VLNEXT 15
  29. #define VDISCARD 16
  30. #define IGNBRK 0000001
  31. #define BRKINT 0000002
  32. #define IGNPAR 0000004
  33. #define PARMRK 0000010
  34. #define INPCK 0000020
  35. #define ISTRIP 0000040
  36. #define INLCR 0000100
  37. #define IGNCR 0000200
  38. #define ICRNL 0000400
  39. #define IXON 0001000
  40. #define IXOFF 0002000
  41. #define IXANY 0004000
  42. #define IUCLC 0010000
  43. #define IMAXBEL 0020000
  44. #define IUTF8 0040000
  45. #define OPOST 0000001
  46. #define ONLCR 0000002
  47. #define OLCUC 0000004
  48. #define OCRNL 0000010
  49. #define ONOCR 0000020
  50. #define ONLRET 0000040
  51. #define OFILL 0000100
  52. #define OFDEL 0000200
  53. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
  54. #define NLDLY 0001400
  55. #define NL0 0000000
  56. #define NL1 0000400
  57. #define NL2 0001000
  58. #define NL3 0001400
  59. #define TABDLY 0006000
  60. #define TAB0 0000000
  61. #define TAB1 0002000
  62. #define TAB2 0004000
  63. #define TAB3 0006000
  64. #define CRDLY 0030000
  65. #define CR0 0000000
  66. #define CR1 0010000
  67. #define CR2 0020000
  68. #define CR3 0030000
  69. #define FFDLY 0040000
  70. #define FF0 0000000
  71. #define FF1 0040000
  72. #define BSDLY 0100000
  73. #define BS0 0000000
  74. #define BS1 0100000
  75. #endif
  76. #define VTDLY 0200000
  77. #define VT0 0000000
  78. #define VT1 0200000
  79. #define B0 0000000
  80. #define B50 0000001
  81. #define B75 0000002
  82. #define B110 0000003
  83. #define B134 0000004
  84. #define B150 0000005
  85. #define B200 0000006
  86. #define B300 0000007
  87. #define B600 0000010
  88. #define B1200 0000011
  89. #define B1800 0000012
  90. #define B2400 0000013
  91. #define B4800 0000014
  92. #define B9600 0000015
  93. #define B19200 0000016
  94. #define B38400 0000017
  95. #define B57600 00020
  96. #define B115200 00021
  97. #define B230400 00022
  98. #define B460800 00023
  99. #define B500000 00024
  100. #define B576000 00025
  101. #define B921600 00026
  102. #define B1000000 00027
  103. #define B1152000 00030
  104. #define B1500000 00031
  105. #define B2000000 00032
  106. #define B2500000 00033
  107. #define B3000000 00034
  108. #define B3500000 00035
  109. #define B4000000 00036
  110. #define CSIZE 00001400
  111. #define CS5 00000000
  112. #define CS6 00000400
  113. #define CS7 00001000
  114. #define CS8 00001400
  115. #define CSTOPB 00002000
  116. #define CREAD 00004000
  117. #define PARENB 00010000
  118. #define PARODD 00020000
  119. #define HUPCL 00040000
  120. #define CLOCAL 00100000
  121. #define ECHOE 0x00000002
  122. #define ECHOK 0x00000004
  123. #define ECHO 0x00000008
  124. #define ECHONL 0x00000010
  125. #define ISIG 0x00000080
  126. #define ICANON 0x00000100
  127. #define IEXTEN 0x00000400
  128. #define TOSTOP 0x00400000
  129. #define NOFLSH 0x80000000
  130. #define TCOOFF 0
  131. #define TCOON 1
  132. #define TCIOFF 2
  133. #define TCION 3
  134. #define TCIFLUSH 0
  135. #define TCOFLUSH 1
  136. #define TCIOFLUSH 2
  137. #define TCSANOW 0
  138. #define TCSADRAIN 1
  139. #define TCSAFLUSH 2
  140. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  141. #define EXTA 0000016
  142. #define EXTB 0000017
  143. #define CBAUD 00377
  144. #define CBAUDEX 0000020
  145. #define CIBAUD 077600000
  146. #define CMSPAR 010000000000
  147. #define CRTSCTS 020000000000
  148. #define XCASE 0x00004000
  149. #define ECHOCTL 0x00000040
  150. #define ECHOPRT 0x00000020
  151. #define ECHOKE 0x00000001
  152. #define FLUSHO 0x00800000
  153. #define PENDIN 0x20000000
  154. #define EXTPROC 0x10000000
  155. #define XTABS 00006000
  156. #define TIOCSER_TEMT 1
  157. #endif