sgtty.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* The <sgtty.h> header contains data structures for ioctl(). */
  2. #ifndef _SGTTY_H
  3. #define _SGTTY_H
  4. struct sgttyb {
  5. char sg_ispeed; /* input speed */
  6. char sg_ospeed; /* output speed */
  7. char sg_erase; /* erase character */
  8. char sg_kill; /* kill character */
  9. int sg_flags; /* mode flags */
  10. };
  11. struct tchars {
  12. char t_intrc; /* SIGINT char */
  13. char t_quitc; /* SIGQUIT char */
  14. char t_startc; /* start output (initially CTRL-Q) */
  15. char t_stopc; /* stop output (initially CTRL-S) */
  16. char t_eofc; /* EOF (initially CTRL-D) */
  17. char t_brkc; /* input delimiter (like nl) */
  18. };
  19. /* Field names */
  20. #define XTABS 0006000 /* do tab expansion */
  21. #define BITS8 0001400 /* 8 bits/char */
  22. #define BITS7 0001000 /* 7 bits/char */
  23. #define BITS6 0000400 /* 6 bits/char */
  24. #define BITS5 0000000 /* 5 bits/char */
  25. #define EVENP 0000200 /* even parity */
  26. #define ODDP 0000100 /* odd parity */
  27. #define RAW 0000040 /* enable raw mode */
  28. #define CRMOD 0000020 /* map lf to cr + lf */
  29. #define ECHO 0000010 /* echo input */
  30. #define CBREAK 0000002 /* enable cbreak mode */
  31. #define COOKED 0000000 /* neither CBREAK nor RAW */
  32. #define DCD 0100000 /* Data Carrier Detect */
  33. /* Line speeds */
  34. #define B0 0 /* code for line-hangup */
  35. #define B110 1
  36. #define B300 3
  37. #define B1200 12
  38. #define B2400 24
  39. #define B4800 48
  40. #define B9600 96
  41. #define TIOCGETP (('t'<<8) | 8)
  42. #define TIOCSETP (('t'<<8) | 9)
  43. #define TIOCGETC (('t'<<8) | 18)
  44. #define TIOCSETC (('t'<<8) | 17)
  45. #define TIOCFLUSH (('t'<<8) | 16)
  46. /* Things Minix supports but not properly */
  47. /* the divide-by-100 encoding ain't too hot */
  48. #define ANYP 0000300
  49. #define B50 0
  50. #define B75 0
  51. #define B134 0
  52. #define B150 0
  53. #define B200 2
  54. #define B600 6
  55. #define B1800 18
  56. #define B3600 36
  57. #define B7200 72
  58. #define EXTA 192
  59. #define EXTB 0
  60. /* Things Minix doesn't support but are fairly harmless if used */
  61. #define NLDELAY 0001400
  62. #define TBDELAY 0006000
  63. #define CRDELAY 0030000
  64. #define VTDELAY 0040000
  65. #define BSDELAY 0100000
  66. #define ALLDELAY 0177400
  67. #if MACHINE == ATARI
  68. /* ST specific clock stuff */
  69. #define DCLOCK ('D'<<8)
  70. #define DC_RBMS100 (DCLOCK|1)
  71. #define DC_RBMS200 (DCLOCK|2)
  72. #define DC_RSUPRA (DCLOCK|3)
  73. #define DC_RICD (DCLOCK|4)
  74. #define DC_WBMS100 (DCLOCK|8)
  75. #define DC_WBMS200 (DCLOCK|9)
  76. #endif
  77. #include <ansi.h>
  78. _PROTOTYPE( int gtty, (int _fd, struct sgttyb *_argp) );
  79. _PROTOTYPE( int ioctl, (int _fd, int _request, struct sgttyb *_argp) );
  80. _PROTOTYPE( int stty, (int _fd, struct sgttyb *_argp) );
  81. #endif /* _SGTTY_H */