Commit | Line | Data |
---|---|---|
68660e87 BJ |
1 | /* |
2 | * Structure for stty and gtty system calls. | |
3 | */ | |
4 | ||
5 | struct 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 | * Modes | |
15 | */ | |
16 | #define TANDEM 01 | |
17 | #define CBREAK 02 | |
18 | #define LCASE 04 | |
19 | #define ECHO 010 | |
20 | #define CRMOD 020 | |
21 | #define RAW 040 | |
22 | #define ODDP 0100 | |
23 | #define EVENP 0200 | |
24 | #define ANYP 0300 | |
25 | #define NLDELAY 001400 | |
26 | #define TBDELAY 006000 | |
27 | #define XTABS 06000 | |
28 | #define CRDELAY 030000 | |
29 | #define VTDELAY 040000 | |
30 | #define BSDELAY 0100000 | |
31 | #define ALLDELAY 0177400 | |
32 | ||
33 | /* | |
34 | * Delay algorithms | |
35 | */ | |
36 | #define CR0 0 | |
37 | #define CR1 010000 | |
38 | #define CR2 020000 | |
39 | #define CR3 030000 | |
40 | #define NL0 0 | |
41 | #define NL1 000400 | |
42 | #define NL2 001000 | |
43 | #define NL3 001400 | |
44 | #define TAB0 0 | |
45 | #define TAB1 002000 | |
46 | #define TAB2 004000 | |
47 | #define FF0 0 | |
48 | #define FF1 040000 | |
49 | #define BS0 0 | |
50 | #define BS1 0100000 | |
51 | ||
52 | /* | |
53 | * Speeds | |
54 | */ | |
55 | #define B0 0 | |
56 | #define B50 1 | |
57 | #define B75 2 | |
58 | #define B110 3 | |
59 | #define B134 4 | |
60 | #define B150 5 | |
61 | #define B200 6 | |
62 | #define B300 7 | |
63 | #define B600 8 | |
64 | #define B1200 9 | |
65 | #define B1800 10 | |
66 | #define B2400 11 | |
67 | #define B4800 12 | |
68 | #define B9600 13 | |
69 | #define EXTA 14 | |
70 | #define EXTB 15 | |
71 | ||
72 | /* | |
73 | * tty ioctl commands | |
74 | */ | |
75 | #define TIOCGETD (('t'<<8)|0) | |
76 | #define TIOCSETD (('t'<<8)|1) | |
77 | #define TIOCHPCL (('t'<<8)|2) | |
78 | #define TIOCMODG (('t'<<8)|3) | |
79 | #define TIOCMODS (('t'<<8)|4) | |
80 | #define TIOCGETP (('t'<<8)|8) | |
81 | #define TIOCSETP (('t'<<8)|9) | |
82 | #define TIOCSETN (('t'<<8)|10) | |
83 | #define TIOCEXCL (('t'<<8)|13) | |
84 | #define TIOCNXCL (('t'<<8)|14) | |
85 | #define TIOCTSTP (('t'<<8)|16) | |
86 | #define DIOCGETP (('d'<<8)|8) | |
87 | #define DIOCSETP (('d'<<8)|9) | |
88 | #define FIOCLEX (('f'<<8)|1) | |
89 | #define FIONCLEX (('f'<<8)|2) |