Bump version
[pytest.git] / Lib / plat-irix6 / IOCTL.py
blobcec3c3f6a934b9acc848059d096bd11d75ede41a
1 # These lines were mostly generated by h2py.py (see demo/scripts)
2 # from <sys/ioctl.h>, <sys/termio.h> and <termios.h> on Irix 4.0.2
3 # with some manual changes to cope with imperfections in h2py.py.
4 # The applicability on other systems is not clear; especially non-SYSV
5 # systems may have a totally different set of ioctls.
7 IOCTYPE = 0xff00
8 LIOC = (ord('l')<<8)
9 LIOCGETP = (LIOC|1)
10 LIOCSETP = (LIOC|2)
11 LIOCGETS = (LIOC|5)
12 LIOCSETS = (LIOC|6)
13 DIOC = (ord('d')<<8)
14 DIOCGETC = (DIOC|1)
15 DIOCGETB = (DIOC|2)
16 DIOCSETE = (DIOC|3)
17 IOCPARM_MASK = 0x7f
18 IOC_VOID = 0x20000000
19 IOC_OUT = 0x40000000
20 IOC_IN = 0x80000000
21 IOC_INOUT = (IOC_IN|IOC_OUT)
22 int = 'i'
23 short = 'h'
24 long = 'l'
25 def sizeof(t): import struct; return struct.calcsize(t)
26 def _IO(x,y): return (IOC_VOID|((x)<<8)|y)
27 def _IOR(x,y,t): return (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|y)
28 def _IOW(x,y,t): return (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|y)
29 # this should be _IORW, but stdio got there first
30 def _IOWR(x,y,t): return (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|y)
31 FIONREAD = _IOR(ord('f'), 127, int)
32 FIONBIO = _IOW(ord('f'), 126, int)
33 FIOASYNC = _IOW(ord('f'), 125, int)
34 FIOSETOWN = _IOW(ord('f'), 124, int)
35 FIOGETOWN = _IOR(ord('f'), 123, int)
36 NCC = 8
37 NCC_PAD = 7
38 NCC_EXT = 16
39 NCCS = (NCC+NCC_PAD+NCC_EXT)
40 VINTR = 0
41 VQUIT = 1
42 VERASE = 2
43 VKILL = 3
44 VEOF = 4
45 VEOL = 5
46 VEOL2 = 6
47 VMIN = VEOF
48 VTIME = VEOL
49 VSWTCH = 7
50 VLNEXT = (NCC+NCC_PAD+0)
51 VWERASE = (NCC+NCC_PAD+1)
52 VRPRNT = (NCC+NCC_PAD+2)
53 VFLUSHO = (NCC+NCC_PAD+3)
54 VSTOP = (NCC+NCC_PAD+4)
55 VSTART = (NCC+NCC_PAD+5)
56 CNUL = '\0'
57 CDEL = '\377'
58 CESC = '\\'
59 CINTR = '\177'
60 CQUIT = '\34'
61 CBRK = '\377'
62 def CTRL(c): return ord(c) & 0x0f
63 CERASE = CTRL('H')
64 CKILL = CTRL('U')
65 CEOF = CTRL('d')
66 CEOT = CEOF
67 CSTART = CTRL('q')
68 CSTOP = CTRL('s')
69 CSWTCH = CTRL('z')
70 CSUSP = CSWTCH
71 CNSWTCH = 0
72 CLNEXT = CTRL('v')
73 CWERASE = CTRL('w')
74 CFLUSHO = CTRL('o')
75 CFLUSH = CFLUSHO
76 CRPRNT = CTRL('r')
77 CDSUSP = CTRL('y')
78 IGNBRK = 0000001
79 BRKINT = 0000002
80 IGNPAR = 0000004
81 PARMRK = 0000010
82 INPCK = 0000020
83 ISTRIP = 0000040
84 INLCR = 0000100
85 IGNCR = 0000200
86 ICRNL = 0000400
87 IUCLC = 0001000
88 IXON = 0002000
89 IXANY = 0004000
90 IXOFF = 0010000
91 IBLKMD = 0020000
92 OPOST = 0000001
93 OLCUC = 0000002
94 ONLCR = 0000004
95 OCRNL = 0000010
96 ONOCR = 0000020
97 ONLRET = 0000040
98 OFILL = 0000100
99 OFDEL = 0000200
100 NLDLY = 0000400
101 NL0 = 0
102 NL1 = 0000400
103 CRDLY = 0003000
104 CR0 = 0
105 CR1 = 0001000
106 CR2 = 0002000
107 CR3 = 0003000
108 TABDLY = 0014000
109 TAB0 = 0
110 TAB1 = 0004000
111 TAB2 = 0010000
112 TAB3 = 0014000
113 BSDLY = 0020000
114 BS0 = 0
115 BS1 = 0020000
116 VTDLY = 0040000
117 VT0 = 0
118 VT1 = 0040000
119 FFDLY = 0100000
120 FF0 = 0
121 FF1 = 0100000
122 CBAUD = 0000017
123 B0 = 0
124 B50 = 0000001
125 B75 = 0000002
126 B110 = 0000003
127 B134 = 0000004
128 B150 = 0000005
129 B200 = 0000006
130 B300 = 0000007
131 B600 = 0000010
132 B1200 = 0000011
133 B1800 = 0000012
134 B2400 = 0000013
135 B4800 = 0000014
136 B9600 = 0000015
137 B19200 = 0000016
138 EXTA = 0000016
139 B38400 = 0000017
140 EXTB = 0000017
141 CSIZE = 0000060
142 CS5 = 0
143 CS6 = 0000020
144 CS7 = 0000040
145 CS8 = 0000060
146 CSTOPB = 0000100
147 CREAD = 0000200
148 PARENB = 0000400
149 PARODD = 0001000
150 HUPCL = 0002000
151 CLOCAL = 0004000
152 LOBLK = 0040000
153 ISIG = 0000001
154 ICANON = 0000002
155 XCASE = 0000004
156 ECHO = 0000010
157 ECHOE = 0000020
158 ECHOK = 0000040
159 ECHONL = 0000100
160 NOFLSH = 0000200
161 IIEXTEN = 0000400
162 ITOSTOP = 0001000
163 SSPEED = B9600
164 IOCTYPE = 0xff00
165 TIOC = (ord('T')<<8)
166 oTCGETA = (TIOC|1)
167 oTCSETA = (TIOC|2)
168 oTCSETAW = (TIOC|3)
169 oTCSETAF = (TIOC|4)
170 TCSBRK = (TIOC|5)
171 TCXONC = (TIOC|6)
172 TCFLSH = (TIOC|7)
173 TCGETA = (TIOC|8)
174 TCSETA = (TIOC|9)
175 TCSETAW = (TIOC|10)
176 TCSETAF = (TIOC|11)
177 TIOCFLUSH = (TIOC|12)
178 TCDSET = (TIOC|32)
179 TCBLKMD = (TIOC|33)
180 TIOCPKT = (TIOC|112)
181 TIOCPKT_DATA = 0x00
182 TIOCPKT_FLUSHREAD = 0x01
183 TIOCPKT_FLUSHWRITE = 0x02
184 TIOCPKT_NOSTOP = 0x10
185 TIOCPKT_DOSTOP = 0x20
186 TIOCNOTTY = (TIOC|113)
187 TIOCSTI = (TIOC|114)
188 TIOCSPGRP = _IOW(ord('t'), 118, int)
189 TIOCGPGRP = _IOR(ord('t'), 119, int)
190 TIOCCONS = _IOW(ord('t'), 120, int)
191 struct_winsize = 'hhhh'
192 TIOCGWINSZ = _IOR(ord('t'), 104, struct_winsize)
193 TIOCSWINSZ = _IOW(ord('t'), 103, struct_winsize)
194 TFIOC = (ord('F')<<8)
195 oFIONREAD = (TFIOC|127)
196 LDIOC = (ord('D')<<8)
197 LDOPEN = (LDIOC|0)
198 LDCLOSE = (LDIOC|1)
199 LDCHG = (LDIOC|2)
200 LDGETT = (LDIOC|8)
201 LDSETT = (LDIOC|9)
202 TERM_NONE = 0
203 TERM_TEC = 1
204 TERM_V61 = 2
205 TERM_V10 = 3
206 TERM_TEX = 4
207 TERM_D40 = 5
208 TERM_H45 = 6
209 TERM_D42 = 7
210 TM_NONE = 0000
211 TM_SNL = 0001
212 TM_ANL = 0002
213 TM_LCF = 0004
214 TM_CECHO = 0010
215 TM_CINVIS = 0020
216 TM_SET = 0200
217 LDISC0 = 0
218 LDISC1 = 1
219 NTTYDISC = LDISC1
220 VSUSP = VSWTCH
221 TCSANOW = 0
222 TCSADRAIN = 1
223 TCSAFLUSH = 2
224 TCIFLUSH = 0
225 TCOFLUSH = 1
226 TCIOFLUSH = 2
227 TCOOFF = 0
228 TCOON = 1
229 TCIOFF = 2
230 TCION = 3
231 TO_STOP = LOBLK
232 IEXTEN = IIEXTEN
233 TOSTOP = ITOSTOP