Research V7 development
[unix-history] / usr / include / sgtty.h
CommitLineData
a25b3764
KT
1/*
2 * Structure for stty and gtty system calls.
3 */
4
5struct sgttyb {
6 char sg_ispeed; /* input speed */
7 char sg_ospeed; /* output speed */
8 char sg_erase; /* erase character */
9 char sg_kill; /* kill character */
10 int sg_flags; /* mode flags */
11};
12
13/*
14 * List of special characters
15 */
16struct tchars {
17 char t_intrc; /* interrupt */
18 char t_quitc; /* quit */
19 char t_startc; /* start output */
20 char t_stopc; /* stop output */
21 char t_eofc; /* end-of-file */
22 char t_brkc; /* input delimiter (like nl) */
23};
24
25/*
26 * Modes
27 */
28#define TANDEM 01
29#define CBREAK 02
30#define LCASE 04
31#define ECHO 010
32#define CRMOD 020
33#define RAW 040
34#define ODDP 0100
35#define EVENP 0200
36#define ANYP 0300
37#define NLDELAY 001400
38#define TBDELAY 006000
39#define XTABS 06000
40#define CRDELAY 030000
41#define VTDELAY 040000
42#define BSDELAY 0100000
43#define ALLDELAY 0177400
44
45/*
46 * Delay algorithms
47 */
48#define CR0 0
49#define CR1 010000
50#define CR2 020000
51#define CR3 030000
52#define NL0 0
53#define NL1 000400
54#define NL2 001000
55#define NL3 001400
56#define TAB0 0
57#define TAB1 002000
58#define TAB2 004000
59#define FF0 0
60#define FF1 040000
61#define BS0 0
62#define BS1 0100000
63
64/*
65 * Speeds
66 */
67#define B0 0
68#define B50 1
69#define B75 2
70#define B110 3
71#define B134 4
72#define B150 5
73#define B200 6
74#define B300 7
75#define B600 8
76#define B1200 9
77#define B1800 10
78#define B2400 11
79#define B4800 12
80#define B9600 13
81#define EXTA 14
82#define EXTB 15
83
84/*
85 * tty ioctl commands
86 */
87#define TIOCGETD (('t'<<8)|0)
88#define TIOCSETD (('t'<<8)|1)
89#define TIOCHPCL (('t'<<8)|2)
90#define TIOCMODG (('t'<<8)|3)
91#define TIOCMODS (('t'<<8)|4)
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 TIOHMODE (('t'<<8)|15)
98#define TIOCTSTP (('t'<<8)|16)
99#define TIOCSETC (('t'<<8)|17)
100#define TIOCGETC (('t'<<8)|18)
101#define DIOCLSTN (('d'<<8)|1)
102#define DIOCNTRL (('d'<<8)|2)
103#define DIOCMPX (('d'<<8)|3)
104#define DIOCNMPX (('d'<<8)|4)
105#define DIOCSCALL (('d'<<8)|5)
106#define DIOCRCALL (('d'<<8)|6)
107#define DIOCPGRP (('d'<<8)|7)
108#define DIOCGETP (('d'<<8)|8)
109#define DIOCSETP (('d'<<8)|9)
110#define DIOCLOSE (('d'<<8)|10)
111#define DIOCTIME (('d'<<8)|11)
112#define DIOCRESET (('d'<<8)|12)
113#define FIOCLEX (('f'<<8)|1)
114#define FIONCLEX (('f'<<8)|2)
115#define MXLSTN (('x'<<8)|1)
116#define MXNBLK (('x'<<8)|2)