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