home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / LIB / unix.zoo / termio.h < prev    next >
Text File  |  2009-11-06  |  3KB  |  136 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. #define B0          0000000
  38. #define B50         0000001
  39. #define B75         0000002
  40. #define B110        0000003
  41. #define B134        0000004
  42. #define B150        0000005
  43. #define B200        0000006
  44. #define B300        0000007
  45. #define B600        0000010
  46. #define B1200       0000011
  47. #define B1800       0000012
  48. #define B2400       0000013
  49. #define B4800       0000014
  50. #define B9600       0000015
  51. #define B19200      0000016
  52. #define B38400      0000017
  53. #define EXTA        0000016
  54. #define EXTB        0000017
  55. #define CBAUD       0000017
  56.  
  57. /*
  58.  * character size (bits)
  59.  */
  60.  
  61. #define CSIZE       0000060
  62. #define CS5         0000000
  63. #define CS6         0000020
  64. #define CS7         0000040
  65. #define CS8         0000060
  66.  
  67. /*
  68.  * stop bits
  69.  */
  70.  
  71. #define CSTOPB      0000100
  72. #define CREAD       0000200
  73.  
  74. /*
  75.  * parity
  76.  */
  77.  
  78. #define PARENB      0000400
  79. #define PARODD      0001000
  80.  
  81. /*
  82.  * line discipline 0 modes
  83.  */
  84.  
  85. #define ISIG        0000001
  86. #define ICANON      0000002
  87. #define XCASE       0000004
  88. #define ECHO        0000010
  89. #define ECHOE       0000020
  90. #define ECHOK       0000040
  91. #define ECHONL      0000100
  92. #define NOFLSH      0000200
  93.  
  94. /*
  95.  * input modes
  96.  */
  97.  
  98. #define IGNBRK      0000001
  99. #define BRKINT      0000002
  100. #define IGNPAR      0000004
  101. #define PARMRK      0000010
  102. #define INPCK       0000020
  103. #define ISTRIP      0000040
  104. #define INLCR       0000100
  105. #define IGNCR       0000200
  106. #define ICRNL       0000400
  107. #define IUCLC       0001000
  108. #define IXON        0002000
  109. #define IXANY       0004000
  110. #define IXOFF       0010000
  111.  
  112. /*
  113.  * output modes
  114.  */
  115.  
  116. #define OPOST       0000001
  117. #define OLCUC       0000002
  118. #define ONLCR       0000004
  119. #define OCRNL       0000010
  120. #define ONOCR       0000020
  121.  
  122. /*
  123.  * Ioctl control packet
  124.  */
  125.  
  126. struct termio
  127.      {
  128.      unsigned short  c_iflag;      /* input modes           */
  129.      unsigned short  c_oflag;      /* output modes          */
  130.      unsigned short  c_cflag;      /* control modes         */
  131.      unsigned short  c_lflag;      /* line discipline modes */
  132.      char            c_line;       /* line discipline       */
  133.      unsigned char   c_cc[NCC];    /* control chars         */
  134.      } ;
  135.  
  136.