PageRenderTime 50ms CodeModel.GetById 34ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/plat-irix5/IOCTL.py

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