1
0

termios.h 3.5 KB

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