xref: /original-bsd/sys/hp/hpux/hpux_termio.h (revision 8431ec24)
1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1990 The Regents of the University of California.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  * from: Utah $Hdr: hpux.h 1.15 89/09/25$
13  *
14  *	@(#)hpux_termio.h	7.1 (Berkeley) 05/08/90
15  */
16 
17 /* HP-UX termio stuff */
18 
19 #define	HPUXNCC	8
20 
21 /* control characters */
22 #define	HPUXVINTR	0
23 #define	HPUXVQUIT	1
24 #define	HPUXVERASE	2
25 #define	HPUXVKILL	3
26 #define	HPUXVEOF	4
27 #define	HPUXVEOL	5
28 #define	HPUXVMIN	4
29 #define	HPUXVTIME	5
30 
31 /* input modes */
32 #define	TIO_IGNBRK	0000001
33 #define	TIO_BRKINT	0000002
34 #define	TIO_IGNPAR	0000004
35 #define	TIO_PARMRK	0000010
36 #define	TIO_INPCK	0000020
37 #define	TIO_ISTRIP	0000040
38 #define	TIO_INLCR	0000100
39 #define	TIO_IGNCR	0000200
40 #define	TIO_ICRNL	0000400
41 #define	TIO_IUCLC	0001000
42 #define	TIO_IXON	0002000
43 #define	TIO_IXANY	0004000
44 #define	TIO_IXOFF	0010000
45 #define	TIO_IENQAK	0020000
46 
47 /* output modes */
48 #define	TIO_OPOST	0000001
49 #define	TIO_OLCUC	0000002
50 #define	TIO_ONLCR	0000004
51 #define	TIO_OCRNL	0000010
52 #define	TIO_ONOCR	0000020
53 #define	TIO_ONLRET	0000040
54 #define	TIO_OFILL	0000100
55 #define	TIO_OFDEL	0000200
56 #define	TIO_NLDLY	0000400
57 #define	TIO_NL0		0
58 #define	TIO_NL1		0000400
59 #define	TIO_CRDLY	0003000
60 #define	TIO_CR0		0
61 #define	TIO_CR1		0001000
62 #define	TIO_CR2		0002000
63 #define	TIO_CR3		0003000
64 #define	TIO_TABDLY	0014000
65 #define	TIO_TAB0	0
66 #define	TIO_TAB1	0004000
67 #define	TIO_TAB2	0010000
68 #define	TIO_TAB3	0014000
69 #define	TIO_BSDLY	0020000
70 #define	TIO_BS0		0
71 #define	TIO_BS1		0020000
72 #define	TIO_VTDLY	0040000
73 #define	TIO_VT0		0
74 #define	TIO_VT1		0040000
75 #define	TIO_FFDLY	0100000
76 #define	TIO_FF0		0
77 #define	TIO_FF1		0100000
78 
79 /* control modes */
80 #define	TIO_CBAUD	0000037
81 #define	TIO_B0		0
82 #define	TIO_B50		0000001
83 #define	TIO_B75		0000002
84 #define	TIO_B110	0000003
85 #define	TIO_B134	0000004
86 #define	TIO_B150	0000005
87 #define	TIO_B200	0000006
88 #define	TIO_B300	0000007
89 #define	TIO_B600	0000010
90 #define	TIO_B900	0000011
91 #define	TIO_B1200	0000012
92 #define	TIO_B1800	0000013
93 #define	TIO_B2400	0000014
94 #define	TIO_B3600	0000015
95 #define	TIO_B4800	0000016
96 #define	TIO_B7200	0000017
97 #define	TIO_B9600	0000020
98 #define	TIO_B19200	0000021
99 #define	TIO_B38400	0000022
100 #define	TIO_EXTA	0000036
101 #define	TIO_EXTB	0000037
102 #define	TIO_CSIZE	0000140
103 #define	TIO_CS5		0
104 #define	TIO_CS6		0000040
105 #define	TIO_CS7		0000100
106 #define	TIO_CS8		0000140
107 #define	TIO_CSTOPB	0000200
108 #define	TIO_CREAD	0000400
109 #define	TIO_PARENB	0001000
110 #define	TIO_PARODD	0002000
111 #define	TIO_HUPCL	0004000
112 #define	TIO_CLOCAL	0010000
113 #define TIO_CRTS   	0020000 /* Obsolete */
114 
115 /* line discipline 0 modes */
116 #define	TIO_ISIG	0000001
117 #define	TIO_ICANON	0000002
118 #define	TIO_XCASE	0000004
119 #define	TIO_ECHO	0000010
120 #define	TIO_ECHOE	0000020
121 #define	TIO_ECHOK	0000040
122 #define	TIO_ECHONL	0000100
123 #define	TIO_NOFLSH	0000200
124 
125 struct hpuxtermio {
126 	u_short	c_iflag;	/* input modes */
127 	u_short	c_oflag;	/* output modes */
128 	u_short	c_cflag;	/* control modes */
129 	u_short	c_lflag;	/* line discipline modes */
130 	char    c_line;		/* line discipline */
131 	u_char	c_cc[HPUXNCC];	/* control chars */
132 };
133 
134 #define	HPUXTCGETA	_IOR('T', 1, struct hpuxtermio)
135 #define	HPUXTCSETA	_IOW('T', 2, struct hpuxtermio)
136 #define	HPUXTCSETAW	_IOW('T', 3, struct hpuxtermio)
137 #define	HPUXTCSETAF	_IOW('T', 4, struct hpuxtermio)
138