|
|
1.1 root 1: /*
2: * TTY line discipline processing
3: */
4: struct ttyld
5: {
6: short t_flags; /* mode, settable by ioctl call */
7: short t_state; /* internal state, not visible externally */
8: char t_delct; /* number of delimiters in input q */
9: char t_col; /* printing column of device */
10: char t_erase; /* erase character */
11: char t_kill; /* kill character */
12: struct tchars t_chr;
13: };
14:
15: union stmsg {
16: struct ioc1 {
17: int com;
18: struct sgttyb sb;
19: } ioc1;
20: struct ioc2 {
21: int com;
22: struct tchars sb;
23: } ioc2;
24: struct ioc0 {
25: int com;
26: } ioc0;
27: struct {
28: int com;
29: char xxx[16];
30: } iocx;
31: };
32:
33: #define CTRL(c) ('c'&037)
34:
35: /* default special characters */
36: #define CERASE '\010'
37: #define CEOT CTRL(d)
38: #define CKILL '@'
39: #define CQUIT 034 /* FS, cntl shift L */
40: #define CINTR 0177 /* DEL */
41: #define CSTOP CTRL(s)
42: #define CSTART CTRL(q)
43: #define CBRK 0377
44:
45: /* define partab character types */
46: #define ORDINARY 0
47: #define CONTROL 1
48: #define BACKSPACE 2
49: #define NEWLINE 3
50: #define TAB 4
51: #define VTAB 5
52: #define RETURN 6
53:
54: /* states */
55: #define TTSTOP 01 /* stopped by CTL S */
56: #define TTESC 02 /* have just seen \ */
57: #define TTCR 04 /* turning LF into CRLF */
58: #define TTUSE 010 /* this structure in use */
59: #define TTBLOCK 020 /* have sent tandem STOP */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.