termios.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. #define NLDLY 0000400
  53. #define NL0 0000000
  54. #define NL1 0000400
  55. #define CRDLY 0003000
  56. #define CR0 0000000
  57. #define CR1 0001000
  58. #define CR2 0002000
  59. #define CR3 0003000
  60. #define TABDLY 0014000
  61. #define TAB0 0000000
  62. #define TAB1 0004000
  63. #define TAB2 0010000
  64. #define TAB3 0014000
  65. #define BSDLY 0020000
  66. #define BS0 0000000
  67. #define BS1 0020000
  68. #define FFDLY 0100000
  69. #define FF0 0000000
  70. #define FF1 0100000
  71. #define VTDLY 0040000
  72. #define VT0 0000000
  73. #define VT1 0040000
  74. #define B0 0000000
  75. #define B50 0000001
  76. #define B75 0000002
  77. #define B110 0000003
  78. #define B134 0000004
  79. #define B150 0000005
  80. #define B200 0000006
  81. #define B300 0000007
  82. #define B600 0000010
  83. #define B1200 0000011
  84. #define B1800 0000012
  85. #define B2400 0000013
  86. #define B4800 0000014
  87. #define B9600 0000015
  88. #define B19200 0000016
  89. #define B38400 0000017
  90. #define B57600 0010001
  91. #define B115200 0010002
  92. #define B230400 0010003
  93. #define B460800 0010004
  94. #define B500000 0010005
  95. #define B576000 0010006
  96. #define B921600 0010007
  97. #define B1000000 0010010
  98. #define B1152000 0010011
  99. #define B1500000 0010012
  100. #define B2000000 0010013
  101. #define B2500000 0010014
  102. #define B3000000 0010015
  103. #define B3500000 0010016
  104. #define B4000000 0010017
  105. #define CSIZE 0000060
  106. #define CS5 0000000
  107. #define CS6 0000020
  108. #define CS7 0000040
  109. #define CS8 0000060
  110. #define CSTOPB 0000100
  111. #define CREAD 0000200
  112. #define PARENB 0000400
  113. #define PARODD 0001000
  114. #define HUPCL 0002000
  115. #define CLOCAL 0004000
  116. #define ISIG 0000001
  117. #define ICANON 0000002
  118. #define ECHO 0000010
  119. #define ECHOE 0000020
  120. #define ECHOK 0000040
  121. #define ECHONL 0000100
  122. #define NOFLSH 0000200
  123. #define IEXTEN 0000400
  124. #define TOSTOP 0100000
  125. #define ITOSTOP 0100000
  126. #define TCOOFF 0
  127. #define TCOON 1
  128. #define TCIOFF 2
  129. #define TCION 3
  130. #define TCIFLUSH 0
  131. #define TCOFLUSH 1
  132. #define TCIOFLUSH 2
  133. #define TCSANOW 0
  134. #define TCSADRAIN 1
  135. #define TCSAFLUSH 2
  136. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  137. #define EXTA 0000016
  138. #define EXTB 0000017
  139. #define CBAUD 0010017
  140. #define CBAUDEX 0010000
  141. #define CIBAUD 002003600000
  142. #define CMSPAR 010000000000
  143. #define CRTSCTS 020000000000
  144. #define XCASE 0000004
  145. #define ECHOCTL 0001000
  146. #define ECHOPRT 0002000
  147. #define ECHOKE 0004000
  148. #define FLUSHO 0020000
  149. #define PENDIN 0040000
  150. #define EXTPROC 0200000
  151. #define XTABS 0014000
  152. #define TIOCSER_TEMT 1
  153. #endif