[9] | 1 | /* The <sgtty.h> header contains data structures for ioctl(). */
|
---|
| 2 |
|
---|
| 3 | #ifndef _SGTTY_H
|
---|
| 4 | #define _SGTTY_H
|
---|
| 5 |
|
---|
| 6 | /* Should not be used, nor extended. Termios.h is the replacement for
|
---|
| 7 | * sgtty.h for tty functions, and ioctl replaced code should be moved to
|
---|
| 8 | * sys/ioctl.h and specific header files in the sys, or minix directory.
|
---|
| 9 | */
|
---|
| 10 | #include <sys/ioctl.h> /* Ouch. */
|
---|
| 11 |
|
---|
| 12 | struct sgttyb {
|
---|
| 13 | char sg_ispeed; /* input speed */
|
---|
| 14 | char sg_ospeed; /* output speed */
|
---|
| 15 | char sg_erase; /* erase character */
|
---|
| 16 | char sg_kill; /* kill character */
|
---|
| 17 | int sg_flags; /* mode flags */
|
---|
| 18 | };
|
---|
| 19 |
|
---|
| 20 | struct tchars {
|
---|
| 21 | char t_intrc; /* SIGINT char */
|
---|
| 22 | char t_quitc; /* SIGQUIT char */
|
---|
| 23 | char t_startc; /* start output (initially CTRL-Q) */
|
---|
| 24 | char t_stopc; /* stop output (initially CTRL-S) */
|
---|
| 25 | char t_eofc; /* EOF (initially CTRL-D) */
|
---|
| 26 | char t_brkc; /* input delimiter (like nl) */
|
---|
| 27 | };
|
---|
| 28 |
|
---|
| 29 | #if !_SYSTEM /* the kernel doesn't want to see the rest */
|
---|
| 30 |
|
---|
| 31 | /* Field names */
|
---|
| 32 | #define XTABS 0006000 /* do tab expansion */
|
---|
| 33 | #define BITS8 0001400 /* 8 bits/char */
|
---|
| 34 | #define BITS7 0001000 /* 7 bits/char */
|
---|
| 35 | #define BITS6 0000400 /* 6 bits/char */
|
---|
| 36 | #define BITS5 0000000 /* 5 bits/char */
|
---|
| 37 | #define EVENP 0000200 /* even parity */
|
---|
| 38 | #define ODDP 0000100 /* odd parity */
|
---|
| 39 | #define RAW 0000040 /* enable raw mode */
|
---|
| 40 | #define CRMOD 0000020 /* map lf to cr + lf */
|
---|
| 41 | #define ECHO 0000010 /* echo input */
|
---|
| 42 | #define CBREAK 0000002 /* enable cbreak mode */
|
---|
| 43 | #define COOKED 0000000 /* neither CBREAK nor RAW */
|
---|
| 44 |
|
---|
| 45 | #define DCD 0100000 /* Data Carrier Detect */
|
---|
| 46 |
|
---|
| 47 | /* Line speeds */
|
---|
| 48 | #define B0 0 /* code for line-hangup */
|
---|
| 49 | #define B110 1
|
---|
| 50 | #define B300 3
|
---|
| 51 | #define B1200 12
|
---|
| 52 | #define B2400 24
|
---|
| 53 | #define B4800 48
|
---|
| 54 | #define B9600 96
|
---|
| 55 | #define B19200 192
|
---|
| 56 | #define B38400 195
|
---|
| 57 | #define B57600 194
|
---|
| 58 | #define B115200 193
|
---|
| 59 |
|
---|
| 60 | /* Things Minix supports but not properly */
|
---|
| 61 | /* the divide-by-100 encoding ain't too hot */
|
---|
| 62 | #define ANYP 0000300
|
---|
| 63 | #define B50 0
|
---|
| 64 | #define B75 0
|
---|
| 65 | #define B134 0
|
---|
| 66 | #define B150 0
|
---|
| 67 | #define B200 2
|
---|
| 68 | #define B600 6
|
---|
| 69 | #define B1800 18
|
---|
| 70 | #define B3600 36
|
---|
| 71 | #define B7200 72
|
---|
| 72 | #define EXTA 192
|
---|
| 73 | #define EXTB 0
|
---|
| 74 |
|
---|
| 75 | /* Things Minix doesn't support but are fairly harmless if used */
|
---|
| 76 | #define NLDELAY 0001400
|
---|
| 77 | #define TBDELAY 0006000
|
---|
| 78 | #define CRDELAY 0030000
|
---|
| 79 | #define VTDELAY 0040000
|
---|
| 80 | #define BSDELAY 0100000
|
---|
| 81 | #define ALLDELAY 0177400
|
---|
| 82 |
|
---|
| 83 | /* Copied from termios.h: */
|
---|
| 84 | struct winsize
|
---|
| 85 | {
|
---|
| 86 | unsigned short ws_row; /* rows, in characters */
|
---|
| 87 | unsigned short ws_col; /* columns, in characters */
|
---|
| 88 | unsigned short ws_xpixel; /* horizontal size, pixels */
|
---|
| 89 | unsigned short ws_ypixel; /* vertical size, pixels */
|
---|
| 90 | };
|
---|
| 91 | #endif /* !_SYSTEM */
|
---|
| 92 | #endif /* _SGTTY_H */
|
---|