sgtty.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* Data structures for ioctl/stty/gtty */
  7. struct sgttyb {
  8. char sg_ispeed; /* input speed (not used) */
  9. char sg_ospeed; /* output speed (not used) */
  10. char sg_erase; /* erase character */
  11. char sg_kill; /* kill character */
  12. short sg_flags; /* mode flags */
  13. };
  14. struct tchars {
  15. char t_intrc; /* SIGINT char */
  16. char t_quitc; /* SIGQUIT char */
  17. char t_startc; /* start output (initially CTRL-Q) */
  18. char t_stopc; /* stop output (initially CTRL-S) */
  19. char t_eofc; /* EOF (initially CTRL-D) */
  20. char t_brkc; /* input delimiter (like nl) */
  21. };
  22. /* Fields in t_flags. */
  23. #define ALLDELAY 0177400
  24. #define BSDELAY 0100000
  25. # define BS0 0000000
  26. # define BS1 0100000
  27. #define VTDELAY 0040000
  28. # define FF0 0000000
  29. # define FF1 0040000
  30. #define CRDELAY 0030000
  31. # define CR0 0000000
  32. # define CR1 0010000
  33. # define CR2 0020000
  34. # define CR3 0030000
  35. #define XTABS 0006000 /* do tab expansion */
  36. #define TBDELAY 0006000
  37. # define TAB0 0000000
  38. # define TAB1 0002000
  39. # define TAB2 0004000
  40. #define NLDELAY 0001400
  41. # define NL0 0000000
  42. # define NL1 0000400
  43. # define NL2 0001000
  44. # define NL3 0001400
  45. #define ANYP 0000300
  46. #define EVENP 0000200
  47. #define ODDP 0000100
  48. #define RAW 0000040 /* enable raw mode */
  49. #define CRMOD 0000020 /* map lf to cr + lf */
  50. #define ECHO 0000010 /* echo input */
  51. #define LCASE 0000004
  52. #define CBREAK 0000002 /* enable cbreak mode */
  53. #define TANDEM 0000001
  54. /*#define COOKED 0000000 /* neither CBREAK nor RAW */
  55. #define TIOCGETP (('t'<<8) | 8)
  56. #define TIOCSETP (('t'<<8) | 9)
  57. #define TIOCSETN (('t'<<8) | 10)
  58. #define TIOCEXCL (('t'<<8) | 13)
  59. #define TIOCNXCL (('t'<<8) | 14)
  60. #define TIOCHPCL (('t'<<8) | 2)
  61. #define TIOCGETC (('t'<<8) | 18)
  62. #define TIOCSETC (('t'<<8) | 17)
  63. #define B0 0
  64. #define B50 1
  65. #define B75 2
  66. #define B110 3
  67. #define B134 4
  68. #define B150 5
  69. #define B200 6
  70. #define B300 7
  71. #define B600 8
  72. #define B1200 9
  73. #define B1800 10
  74. #define B2400 11
  75. #define B4800 12
  76. #define B9600 13
  77. #define EXTA 14
  78. #define EXTB 15