Commit | Line | Data |
---|---|---|
4588b907 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 | short sg_flags; /* mode flags */ | |
11 | }; | |
12 | ||
13 | struct tchars { | |
14 | char t_intrc; /* interrupt */ | |
15 | char t_quitc; /* quit */ | |
16 | char t_startc; /* start output */ | |
17 | char t_stopc; /* stop output */ | |
18 | char t_eofc; /* end-of-file */ | |
19 | char t_brkc; /* input delimiter (like nl) */ | |
20 | }; | |
21 | /* | |
22 | * Modes | |
23 | */ | |
24 | #define TANDEM 01 | |
25 | #define CBREAK 02 | |
26 | #define LCASE 04 | |
27 | #define ECHO 010 | |
28 | #define CRMOD 020 | |
29 | #define RAW 040 | |
30 | #define ODDP 0100 | |
31 | #define EVENP 0200 | |
32 | #define ANYP 0300 | |
33 | #define NLDELAY 001400 | |
34 | #define TBDELAY 006000 | |
35 | #define XTABS 06000 | |
36 | #define CRDELAY 030000 | |
37 | #define VTDELAY 040000 | |
38 | #define BSDELAY 0100000 | |
39 | #define ALLDELAY 0177400 | |
40 | ||
41 | /* | |
42 | * Delay algorithms | |
43 | */ | |
44 | #define CR0 0 | |
45 | #define CR1 010000 | |
46 | #define CR2 020000 | |
47 | #define CR3 030000 | |
48 | #define NL0 0 | |
49 | #define NL1 000400 | |
50 | #define NL2 001000 | |
51 | #define NL3 001400 | |
52 | #define TAB0 0 | |
53 | #define TAB1 002000 | |
54 | #define TAB2 004000 | |
55 | #define FF0 0 | |
56 | #define FF1 040000 | |
57 | #define BS0 0 | |
58 | #define BS1 0100000 | |
59 | ||
60 | /* | |
61 | * Speeds | |
62 | */ | |
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 | |
79 | ||
80 | /* | |
81 | * tty ioctl commands | |
82 | */ | |
83 | #define TIOCGETD (('t'<<8)|0) | |
84 | #define TIOCSETD (('t'<<8)|1) | |
85 | #define TIOCHPCL (('t'<<8)|2) | |
86 | #define TIOCMODG (('t'<<8)|3) | |
87 | #define TIOCMODS (('t'<<8)|4) | |
88 | #define TIOCGETP (('t'<<8)|8) | |
89 | #define TIOCSETP (('t'<<8)|9) | |
90 | #define TIOCSETN (('t'<<8)|10) | |
91 | #define TIOCEXCL (('t'<<8)|13) | |
92 | #define TIOCNXCL (('t'<<8)|14) | |
93 | #define TIOCFLUSH (('t'<<8)|16) | |
94 | #define TIOCSETC (('t'<<8)|17) | |
95 | #define TIOCGETC (('t'<<8)|18) | |
96 | #define TIOCSBRK (('t'<<8)|19) | |
97 | #define DIOCLSTN (('d'<<8)|1) | |
98 | #define DIOCNTRL (('d'<<8)|2) | |
99 | #define DIOCMPX (('d'<<8)|3) | |
100 | #define DIOCNMPX (('d'<<8)|4) | |
101 | #define DIOCSCALL (('d'<<8)|5) | |
102 | #define DIOCRCALL (('d'<<8)|6) | |
103 | #define DIOCPGRP (('d'<<8)|7) | |
104 | #define DIOCGETP (('d'<<8)|8) | |
105 | #define DIOCSETP (('d'<<8)|9) | |
106 | #define DIOCLOSE (('d'<<8)|10) | |
107 | #define DIOCTIME (('d'<<8)|11) | |
108 | #define DIOCRESET (('d'<<8)|12) | |
109 | #define FIOCLEX (('f'<<8)|1) | |
110 | #define FIONCLEX (('f'<<8)|2) | |
111 | #define MXLSTN (('x'<<8)|1) | |
112 | #define MXNBLK (('x'<<8)|2) |