Pristine Ack-5.5
[Ack-5.5.git] / include / _tail_cc / sgtty.h
1 /* $Id: sgtty.h,v 1.10 1994/06/24 11:05:32 ceriel Exp $ */
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, sufficient for ACK libraries */
7
8 #ifndef _SGTTY_H
9 #define _SGTTY_H
10
11 struct sgttyb {
12   char sg_ispeed;               /* input speed (not used) */
13   char sg_ospeed;               /* output speed (not used) */
14   char sg_erase;                /* erase character */
15   char sg_kill;                 /* kill character */
16 #if defined(__USG) && !defined(_XENIX)
17   int sg_flags;                 /* mode flags */
18 #else
19   short sg_flags;               /* mode flags */
20 #endif
21 };
22
23 struct tchars {
24   char t_intrc;                 /* SIGINT char */
25   char t_quitc;                 /* SIGQUIT char */
26   char t_startc;                /* start output (initially CTRL-Q) */
27   char t_stopc;                 /* stop output  (initially CTRL-S) */
28   char t_eofc;                  /* EOF (initially CTRL-D) */
29   char t_brkc;                  /* input delimiter (like nl) */
30 };
31
32 /* Fields in t_flags. */
33 #define ALLDELAY     0177400
34
35 #define BSDELAY      0100000
36 #  define BS0        0000000
37 #  define BS1        0100000
38
39 #define VTDELAY      0040000
40 #  define FF0        0000000
41 #  define FF1        0040000
42
43 #define CRDELAY      0030000
44 #  define CR0        0000000
45 #  define CR1        0010000
46 #  define CR2        0020000
47 #  define CR3        0030000
48
49 #if     defined(__USG) && !defined(_XENIX)
50 #define XTABS        0000002    /* do tab expansion */
51 #else
52 #define XTABS        0006000    /* do tab expansion */
53 #endif
54
55 #define TBDELAY      0006000
56 #  define TAB0       0000000
57 #  define TAB1       0002000
58 #  define TAB2       0004000
59
60 #define NLDELAY      0001400
61 #  define NL0        0000000
62 #  define NL1        0000400
63 #  define NL2        0001000
64 #  define NL3        0001400
65
66 #define ANYP         0000300
67 #define EVENP        0000200
68 #define ODDP         0000100
69
70 #define RAW          0000040    /* enable raw mode */
71 #define CRMOD        0000020    /* map lf to cr + lf */
72 #define ECHO         0000010    /* echo input */
73 #define LCASE        0000004
74 #define CBREAK       0000002    /* enable cbreak mode */
75 #if     defined(__BSD4_2) || defined(_XENIX)
76 #define TANDEM       0000001
77 #else
78 #define HUPCL        0000001    /* unused ??? */
79 #endif
80 /*#define COOKED     0000000    /* neither CBREAK nor RAW */
81
82 #ifdef __BDS4_2
83 #define TIOCGETP (('t'<<8) | 8 | (6 << 16) | 0x40000000)
84 #define TIOCSETP (('t'<<8) | 9 | (6 << 16) | 0x80000000)
85 #define TIOCSETN (('t'<<8) | 10 | (6 << 16) | 0x80000000)
86 #define TIOCEXCL (('t'<<8) | 13 | 0x20000000)
87 #define TIOCNXCL (('t'<<8) | 14 | 0x20000000)
88 #define TIOCHPCL (('t'<<8) | 2 | 0x20000000)
89 #define TIOCGETC (('t'<<8) | 18 | (6 << 16) | 0x40000000)
90 #define TIOCSETC (('t'<<8) | 17 | (6 << 16) | 0x80000000)
91 #else
92 #define TIOCGETP (('t'<<8) | 8)
93 #define TIOCSETP (('t'<<8) | 9)
94 #define TIOCSETN (('t'<<8) | 10)
95 #define TIOCEXCL (('t'<<8) | 13)
96 #define TIOCNXCL (('t'<<8) | 14)
97 #define TIOCHPCL (('t'<<8) | 2)
98 #define TIOCGETC (('t'<<8) | 18)
99 #define TIOCSETC (('t'<<8) | 17)
100 #endif
101
102 #define B0      0
103 #define B50     1
104 #define B75     2
105 #define B110    3
106 #define B134    4
107 #define B150    5
108 #define B200    6
109 #define B300    7
110 #define B600    8
111 #define B1200   9
112 #define B1800   10
113 #define B2400   11
114 #define B4800   12
115 #define B9600   13
116 #define EXTA    14
117 #define EXTB    15
118
119 #endif /* _SGTTY_H */