home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / OS9_Unix.lzh / DEFS / termio.h < prev    next >
Text File  |  1992-09-10  |  3KB  |  138 lines

  1. /*
  2.  * UNIX termio.h
  3.  */
  4.  
  5. #define TIOC        ('T'<<8)
  6. #define TCGETA      (TIOC|1)
  7. #define TCSETA      (TIOC|2)
  8. #define TCSETAW     (TIOC|3)
  9. #define TCSETAF     (TIOC|4)
  10. #define TCSBRK      (TIOC|5)
  11. #define TCXONC      (TIOC|6)
  12. #define TCFLSH      (TIOC|7)
  13.  
  14.  
  15. /*
  16.  * control characters
  17.  */
  18.  
  19. #define VINTR       0
  20. #define VQUIT       1
  21. #define VERASE      2
  22. #define VKILL       3
  23. #define VEOF        4
  24. #define VMIN        4
  25. #define VEOL        5
  26. #define VTIME       5
  27. #define VEOL2       6
  28. #define VSWTCH      7
  29. #define VSUSP       8
  30.  
  31. #define NCC         9    /* # of control chars */
  32.  
  33. /*
  34.  * Baud rates
  35.  */
  36.  
  37. #ifndef B50
  38. #define B0          0000000
  39. #define B50         0000001
  40. #define B75         0000002
  41. #define B110        0000003
  42. #define B134        0000004
  43. #define B150        0000005
  44. #define B200        0000006
  45. #define B300        0000007
  46. #define B600        0000010
  47. #define B1200       0000011
  48. #define B1800       0000012
  49. #define B2400       0000013
  50. #define B4800       0000014
  51. #define B9600       0000015
  52. #define B19200      0000016
  53. #define B38400      0000017
  54. #define EXTA        0000016
  55. #define EXTB        0000017
  56. #define CBAUD       0000017
  57. #endif
  58.  
  59. /*
  60.  * character size (bits)
  61.  */
  62.  
  63. #define CSIZE       0000060
  64. #define CS5         0000000
  65. #define CS6         0000020
  66. #define CS7         0000040
  67. #define CS8         0000060
  68.  
  69. /*
  70.  * stop bits
  71.  */
  72.  
  73. #define CSTOPB      0000100
  74. #define CREAD       0000200
  75.  
  76. /*
  77.  * parity
  78.  */
  79.  
  80. #define PARENB      0000400
  81. #define PARODD      0001000
  82.  
  83. /*
  84.  * line discipline 0 modes
  85.  */
  86.  
  87. #define ISIG        0000001
  88. #define ICANON      0000002
  89. #define XCASE       0000004
  90. #define ECHO        0000010
  91. #define ECHOE       0000020
  92. #define ECHOK       0000040
  93. #define ECHONL      0000100
  94. #define NOFLSH      0000200
  95.  
  96. /*
  97.  * input modes
  98.  */
  99.  
  100. #define IGNBRK      0000001
  101. #define BRKINT      0000002
  102. #define IGNPAR      0000004
  103. #define PARMRK      0000010
  104. #define INPCK       0000020
  105. #define ISTRIP      0000040
  106. #define INLCR       0000100
  107. #define IGNCR       0000200
  108. #define ICRNL       0000400
  109. #define IUCLC       0001000
  110. #define IXON        0002000
  111. #define IXANY       0004000
  112. #define IXOFF       0010000
  113.  
  114. /*
  115.  * output modes
  116.  */
  117.  
  118. #define OPOST       0000001
  119. #define OLCUC       0000002
  120. #define ONLCR       0000004
  121. #define OCRNL       0000010
  122. #define ONOCR       0000020
  123.  
  124. /*
  125.  * Ioctl control packet
  126.  */
  127.  
  128. struct termio
  129.      {
  130.      unsigned short  c_iflag;      /* input modes           */
  131.      unsigned short  c_oflag;      /* output modes          */
  132.      unsigned short  c_cflag;      /* control modes         */
  133.      unsigned short  c_lflag;      /* line discipline modes */
  134.      char            c_line;       /* line discipline       */
  135.      unsigned char   c_cc[NCC];    /* control chars         */
  136.      } ;
  137.  
  138.