|
|
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 ioc0 { ! 17: int com; ! 18: } ioc0; ! 19: struct ioc1 { ! 20: int com; ! 21: struct sgttyb sb; ! 22: } ioc1; ! 23: struct ioc2 { ! 24: int com; ! 25: struct tchars sb; ! 26: } ioc2; ! 27: struct ioc3 { ! 28: int com; ! 29: struct ttydevb sb; ! 30: } ioc3; ! 31: struct { ! 32: int com; ! 33: char xxx[16]; ! 34: } iocx; ! 35: }; ! 36: ! 37: #define CTRL(c) ('c'&037) ! 38: ! 39: /* default special characters */ ! 40: #define CERASE '\010' ! 41: #define CEOT CTRL(d) ! 42: #define CKILL '@' ! 43: #define CQUIT 034 /* FS, cntl shift L */ ! 44: #define CINTR 0177 /* DEL */ ! 45: #define CSTOP CTRL(s) ! 46: #define CSTART CTRL(q) ! 47: #define CBRK 0377 ! 48: ! 49: /* define partab character types */ ! 50: #define ORDINARY 0 ! 51: #define CONTROL 1 ! 52: #define BACKSPACE 2 ! 53: #define NEWLINE 3 ! 54: #define TAB 4 ! 55: #define VTAB 5 ! 56: #define RETURN 6 ! 57: ! 58: /* states */ ! 59: #define TTSTOP 01 /* stopped by CTL S */ ! 60: #define TTESC 02 /* have just seen \ */ ! 61: #define TTCR 04 /* turning LF into CRLF */ ! 62: #define TTUSE 010 /* this structure in use */ ! 63: #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.