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)
24 IOC_INOUT
= (IOC_IN|IOC_OUT
)
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)
42 NCCS
= (NCC
+NCC_PAD
+NCC_EXT
)
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)
65 def CTRL(c
): return ord(c
) & 0x0f
180 TIOCFLUSH
= (TIOC|
12)
185 TIOCPKT_FLUSHREAD
= 0x01
186 TIOCPKT_FLUSHWRITE
= 0x02
187 TIOCPKT_NOSTOP
= 0x10
188 TIOCPKT_DOSTOP
= 0x20
189 TIOCNOTTY
= (TIOC|
113)
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)