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