summaryrefslogtreecommitdiffstats
path: root/Lib/plat-irix6/TERMIOS.py
blob: fa4a4756a2b4353c8a9b122f5b6dd46ac4238cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# Generated by h2py from /usr/include/sys/termios.h

# Included from standards.h

# Included from sys/ttydev.h
__NEW_INVALID_BAUD = 1800
__OLD_B0 = 0
__OLD_B50 = 0000001
__OLD_B75 = 0000002
__OLD_B110 = 0000003
__OLD_B134 = 0000004
__OLD_B150 = 0000005
__OLD_B200 = 0000006
__OLD_B300 = 0000007
__OLD_B600 = 0000010
__OLD_B1200 = 0000011
__OLD_B1800 = 0000012
__OLD_B2400 = 0000013
__OLD_B4800 = 0000014
__OLD_B9600 = 0000015
__OLD_B19200 = 0000016
__OLD_EXTA = 0000016
__OLD_B38400 = 0000017
__OLD_EXTB = 0000017
__OLD_INVALID_BAUD = __OLD_B1800
B0 = 0
B50 = 50
B75 = 75
B110 = 110
B134 = 134
B150 = 150
B200 = 200
B300 = 300
B600 = 600
B1200 = 1200
B1800 = 1800
B2400 = 2400
B4800 = 4800
B9600 = 9600
B19200 = 19200
EXTA = 19200
B38400 = 38400
EXTB = 38400
B57600 = 57600
B76800 = 76800
B115200 = 115200
__INVALID_BAUD = 1800
B0 = __OLD_B0
B50 = __OLD_B50
B75 = __OLD_B75
B110 = __OLD_B110
B134 = __OLD_B134
B150 = __OLD_B150
B200 = __OLD_B200
B300 = __OLD_B300
B600 = __OLD_B600
B1200 = __OLD_B1200
B1800 = __OLD_B1800
B2400 = __OLD_B2400
B4800 = __OLD_B4800
B9600 = __OLD_B9600
B19200 = __OLD_B19200
EXTA = __OLD_B19200
B38400 = __OLD_B38400
EXTB = __OLD_B38400
__INVALID_BAUD = __OLD_INVALID_BAUD

# Included from sys/types.h

# Included from sgidefs.h
_MIPS_ISA_MIPS1 = 1
_MIPS_ISA_MIPS2 = 2
_MIPS_ISA_MIPS3 = 3
_MIPS_ISA_MIPS4 = 4
_MIPS_SIM_ABI32 = 1
_MIPS_SIM_NABI32 = 2
_MIPS_SIM_ABI64 = 3
P_MYID = (-1)
P_MYHOSTID = (-1)

# Included from sys/bsd_types.h

# Included from sys/mkdev.h
ONBITSMAJOR = 7
ONBITSMINOR = 8
OMAXMAJ = 0x7f
OMAXMIN = 0xff
NBITSMAJOR = 14
NBITSMINOR = 18
MAXMAJ = 0x1ff
MAXMIN = 0x3ffff
OLDDEV = 0
NEWDEV = 1
MKDEV_VER = NEWDEV
def major(dev): return __major(MKDEV_VER, dev)

def minor(dev): return __minor(MKDEV_VER, dev)


# Included from sys/select.h
FD_SETSIZE = 1024
__NBBY = 8

# Included from string.h
NULL = 0L
NBBY = 8
_POSIX_VDISABLE = 0
def CTRL(c): return ((c)&037)

IBSHIFT = 16
NCC = 8
NCCS = 23
__NEW_MAX_BAUD = 500000
VINTR = 0
VQUIT = 1
VERASE = 2
VKILL = 3
VEOF = 4
VEOL = 5
VEOL2 = 6
VMIN = 4
VTIME = 5
VSWTCH = 7
VSTART = 8
VSTOP = 9
VSUSP = 10
VDSUSP = 11
VREPRINT = 12
VDISCARD = 13
VWERASE = 14
VLNEXT = 15
VRPRNT = VREPRINT
VFLUSHO = VDISCARD
VCEOF = NCC
VCEOL = (NCC + 1)
CNUL = 0
CDEL = 0377
CESC = ord('\\')
CINTR = 0177
CQUIT = 034
CERASE = CTRL(ord('H'))
CKILL = CTRL(ord('U'))
CEOL = 0
CEOL2 = 0
CEOF = CTRL(ord('d'))
CEOT = CEOF
CSTART = CTRL(ord('q'))
CSTOP = CTRL(ord('s'))
CSWTCH = CTRL(ord('z'))
CNSWTCH = 0
CSUSP = CSWTCH
CLNEXT = CTRL(ord('v'))
CWERASE = CTRL(ord('w'))
CFLUSHO = CTRL(ord('o'))
CFLUSH = CFLUSHO
CRPRNT = CTRL(ord('r'))
CDSUSP = CTRL(ord('y'))
CBRK = 0377
IGNBRK = 0000001
BRKINT = 0000002
IGNPAR = 0000004
PARMRK = 0000010
INPCK = 0000020
ISTRIP = 0000040
INLCR = 0000100
IGNCR = 0000200
ICRNL = 0000400
IUCLC = 0001000
IXON = 0002000
IXANY = 0004000
IXOFF = 0010000
IMAXBEL = 0020000
IBLKMD = 0040000
OPOST = 0000001
OLCUC = 0000002
ONLCR = 0000004
OCRNL = 0000010
ONOCR = 0000020
ONLRET = 0000040
OFILL = 0000100
OFDEL = 0000200
NLDLY = 0000400
NL0 = 0
NL1 = 0000400
CRDLY = 0003000
CR0 = 0
CR1 = 0001000
CR2 = 0002000
CR3 = 0003000
TABDLY = 0014000
TAB0 = 0
TAB1 = 0004000
TAB2 = 0010000
TAB3 = 0014000
XTABS = 0014000
BSDLY = 0020000
BS0 = 0
BS1 = 0020000
VTDLY = 0040000
VT0 = 0
VT1 = 0040000
FFDLY = 0100000
FF0 = 0
FF1 = 0100000
PAGEOUT = 0200000
WRAP = 0400000
CBAUD = 000000017
CSIZE = 000000060
CS5 = 0
CS6 = 000000020
CS7 = 000000040
CS8 = 000000060
CSTOPB = 000000100
CREAD = 000000200
PARENB = 000000400
PARODD = 000001000
HUPCL = 000002000
CLOCAL = 000004000
RCV1EN = 000010000
XMT1EN = 000020000
LOBLK = 000040000
XCLUDE = 000100000
CIBAUD = 003600000
PAREXT = 004000000
CNEW_RTSCTS = 010000000
ISIG = 0000001
ICANON = 0000002
XCASE = 0000004
ECHO = 0000010
ECHOE = 0000020
ECHOK = 0000040
ECHONL = 0000100
NOFLSH = 0000200
IEXTEN = 0000400
ITOSTOP = 0100000
TOSTOP = ITOSTOP
ECHOCTL = 0001000
ECHOPRT = 0002000
ECHOKE = 0004000
DEFECHO = 0010000
FLUSHO = 0020000
PENDIN = 0040000
TIOC = (ord('T')<<8)
__NEW_TCGETA = (TIOC|201)
__NEW_TCSETA = (TIOC|202)
__NEW_TCSETAW = (TIOC|203)
__NEW_TCSETAF = (TIOC|204)
__OLD_TCGETA = (TIOC|1)
__OLD_TCSETA = (TIOC|2)
__OLD_TCSETAW = (TIOC|3)
__OLD_TCSETAF = (TIOC|4)
TCGETA = __NEW_TCGETA
TCSETA = __NEW_TCSETA
TCSETAW = __NEW_TCSETAW
TCSETAF = __NEW_TCSETAF
TCGETA = __OLD_TCGETA
TCSETA = __OLD_TCSETA
TCSETAW = __OLD_TCSETAW
TCSETAF = __OLD_TCSETAF
TCSBRK = (TIOC|5)
TCXONC = (TIOC|6)
TCFLSH = (TIOC|7)

# Included from sys/ioctl.h
IOCTYPE = 0xff00
LIOC = (ord('l')<<8)
LIOCGETP = (LIOC|1)
LIOCSETP = (LIOC|2)
LIOCGETS = (LIOC|5)
LIOCSETS = (LIOC|6)
DIOC = (ord('d')<<8)
DIOCGETC = (DIOC|1)
DIOCGETB = (DIOC|2)
DIOCSETE = (DIOC|3)

# Included from sys/ioccom.h
IOCPARM_MASK = 0xff
IOC_VOID = 0x20000000
IOC_OUT = 0x40000000
IOC_IN = 0x80000000
IOC_INOUT = (IOC_IN|IOC_OUT)

# Included from net/soioctl.h

# Included from sys/termio.h

# Included from sys/termios.h
_POSIX_VDISABLE = 0
def CTRL(c): return ((c)&037)

IBSHIFT = 16
NCC = 8
NCCS = 23
__NEW_MAX_BAUD = 500000
VINTR = 0
VQUIT = 1
VERASE = 2
VKILL = 3
VEOF = 4
VEOL = 5
VEOL2 = 6
VMIN = 4
VTIME = 5
VSWTCH = 7
VSTART = 8
VSTOP = 9
VSUSP = 10
VDSUSP = 11
VREPRINT = 12
VDISCARD = 13
VWERASE = 14
VLNEXT = 15
VRPRNT = VREPRINT
VFLUSHO = VDISCARD
VCEOF = NCC
VCEOL = (NCC + 1)
CNUL = 0
CDEL = 0377
CESC = ord('\\')
CINTR = 0177
CQUIT = 034
CERASE = CTRL(ord('H'))
CKILL = CTRL(ord('U'))
CEOL = 0
CEOL2 = 0
CEOF = CTRL(ord('d'))
CEOT = CEOF
CSTART = CTRL(ord('q'))
CSTOP = CTRL(ord('s'))
CSWTCH = CTRL(ord('z'))
CNSWTCH = 0
CSUSP = CSWTCH
CLNEXT = CTRL(ord('v'))
CWERASE = CTRL(ord('w'))
CFLUSHO = CTRL(ord('o'))
CFLUSH = CFLUSHO
CRPRNT = CTRL(ord('r'))
CDSUSP = CTRL(ord('y'))
CBRK = 0377
IGNBRK = 0000001
BRKINT = 0000002
IGNPAR = 0000004
PARMRK = 0000010
INPCK = 0000020
ISTRIP = 0000040
INLCR = 0000100
IGNCR = 0000200
ICRNL = 0000400
IUCLC = 0001000
IXON = 0002000
IXANY = 0004000
IXOFF = 0010000
IMAXBEL = 0020000
IBLKMD = 0040000
OPOST = 0000001
OLCUC = 0000002
ONLCR = 0000004
OCRNL = 0000010
ONOCR = 0000020
ONLRET = 0000040
OFILL = 0000100
OFDEL = 0000200
NLDLY = 0000400
NL0 = 0
NL1 = 0000400
CRDLY = 0003000
CR0 = 0
CR1 = 0001000
CR2 = 0002000
CR3 = 0003000
TABDLY = 0014000
TAB0 = 0
TAB1 = 0004000
TAB2 = 0010000
TAB3 = 0014000
XTABS = 0014000
BSDLY = 0020000
BS0 = 0
BS1 = 0020000
VTDLY = 0040000
VT0 = 0
VT1 = 0040000
FFDLY = 0100000
FF0 = 0
FF1 = 0100000
PAGEOUT = 0200000
WRAP = 0400000
CBAUD = 000000017
CSIZE = 000000060
CS5 = 0
CS6 = 000000020
CS7 = 000000040
CS8 = 000000060
CSTOPB = 000000100
CREAD = 000000200
PARENB = 000000400
PARODD = 000001000
HUPCL = 000002000
CLOCAL = 000004000
RCV1EN = 000010000
XMT1EN = 000020000
LOBLK = 000040000
XCLUDE = 000100000
CIBAUD = 003600000
PAREXT = 004000000
CNEW_RTSCTS = 010000000
ISIG = 0000001
ICANON = 0000002
XCASE = 0000004
ECHO = 0000010
ECHOE = 0000020
ECHOK = 0000040
ECHONL = 0000100
NOFLSH = 0000200
IEXTEN = 0000400
ITOSTOP = 0100000
TOSTOP = ITOSTOP
ECHOCTL = 0001000
ECHOPRT = 0002000
ECHOKE = 0004000
DEFECHO = 0010000
FLUSHO = 0020000
PENDIN = 0040000
TIOC = (ord('T')<<8)
__NEW_TCGETA = (TIOC|201)
__NEW_TCSETA = (TIOC|202)
__NEW_TCSETAW = (TIOC|203)
__NEW_TCSETAF = (TIOC|204)
__OLD_TCGETA = (TIOC|1)
__OLD_TCSETA = (TIOC|2)
__OLD_TCSETAW = (TIOC|3)
__OLD_TCSETAF = (TIOC|4)
TCGETA = __NEW_TCGETA
TCSETA = __NEW_TCSETA
TCSETAW = __NEW_TCSETAW
TCSETAF = __NEW_TCSETAF
TCGETA = __OLD_TCGETA
TCSETA = __OLD_TCSETA
TCSETAW = __OLD_TCSETAW
TCSETAF = __OLD_TCSETAF
TCSBRK = (TIOC|5)
TCXONC = (TIOC|6)
TCFLSH = (TIOC|7)
LDISC0 = 0
LDISC1 = 1
NTTYDISC = LDISC1
TIOCFLUSH = (TIOC|12)
TCSETLABEL = (TIOC|31)
TCDSET = (TIOC|32)
TCBLKMD = (TIOC|33)
TIOCPKT = (TIOC|112)
TIOCPKT_DATA = 0x00
TIOCPKT_FLUSHREAD = 0x01
TIOCPKT_FLUSHWRITE = 0x02
TIOCPKT_NOSTOP = 0x10
TIOCPKT_DOSTOP = 0x20
TIOCPKT_IOCTL = 0x40
TIOCNOTTY = (TIOC|113)
TIOCSTI = (TIOC|114)
TFIOC = (ord('F')<<8)
oFIONREAD = (TFIOC|127)
TO_STOP = LOBLK
IOCTYPE = 0xff00
__NEW_TCGETS = (TIOC|213)
__NEW_TCSETS = (TIOC|214)
__NEW_TCSETSW = (TIOC|215)
__NEW_TCSETSF = (TIOC|216)
__OLD_TCGETS = (TIOC|13)
__OLD_TCSETS = (TIOC|14)
__OLD_TCSETSW = (TIOC|15)
__OLD_TCSETSF = (TIOC|16)
TCGETS = __NEW_TCGETS
TCSETS = __NEW_TCSETS
TCSETSW = __NEW_TCSETSW
TCSETSF = __NEW_TCSETSF
TCGETS = __OLD_TCGETS
TCSETS = __OLD_TCSETS
TCSETSW = __OLD_TCSETSW
TCSETSF = __OLD_TCSETSF
TCSANOW = ((ord('T')<<8)|14)
TCSADRAIN = ((ord('T')<<8)|15)
TCSAFLUSH = ((ord('T')<<8)|16)
TCIFLUSH = 0
TCOFLUSH = 1
TCIOFLUSH = 2
TCOOFF = 0
TCOON = 1
TCIOFF = 2
TCION = 3
tIOC = (ord('t')<<8)
TIOCGETD = (tIOC|0)
TIOCSETD = (tIOC|1)
TIOCHPCL = (tIOC|2)
TIOCGETP = (tIOC|8)
TIOCSETP = (tIOC|9)
TIOCSETN = (tIOC|10)
TIOCEXCL = (tIOC|13)
TIOCNXCL = (tIOC|14)
TIOCSETC = (tIOC|17)
TIOCGETC = (tIOC|18)
TIOCLBIS = (tIOC|127)
TIOCLBIC = (tIOC|126)
TIOCLSET = (tIOC|125)
TIOCLGET = (tIOC|124)
TIOCSBRK = (tIOC|123)
TIOCCBRK = (tIOC|122)
TIOCSDTR = (tIOC|121)
TIOCCDTR = (tIOC|120)
TIOCSLTC = (tIOC|117)
TIOCGLTC = (tIOC|116)
TIOCOUTQ = (tIOC|115)
TIOCSTOP = (tIOC|111)
TIOCSTART = (tIOC|110)
TIOCGSID = (tIOC|22)
TIOCSSID = (tIOC|24)
TIOCMSET = (tIOC|26)
TIOCMBIS = (tIOC|27)
TIOCMBIC = (tIOC|28)
TIOCMGET = (tIOC|29)
TIOCM_LE = 0001
TIOCM_DTR = 0002
TIOCM_RTS = 0004
TIOCM_ST = 0010
TIOCM_SR = 0020
TIOCM_CTS = 0040
TIOCM_CAR = 0100
TIOCM_CD = TIOCM_CAR
TIOCM_RNG = 0200
TIOCM_RI = TIOCM_RNG
TIOCM_DSR = 0400
TIOCREMOTE = (tIOC|30)
TIOCSIGNAL = (tIOC|31)
ISPTM = ((ord('P')<<8)|1)
UNLKPT = ((ord('P')<<8)|2)
SVR4SOPEN = ((ord('P')<<8)|100)
LDIOC = (ord('D')<<8)
LDOPEN = (LDIOC|0)
LDCLOSE = (LDIOC|1)
LDCHG = (LDIOC|2)
LDGETT = (LDIOC|8)
LDSETT = (LDIOC|9)
LDSMAP = (LDIOC|10)
LDGMAP = (LDIOC|11)
LDNMAP = (LDIOC|12)
DIOC = (ord('d')<<8)
DIOCGETP = (DIOC|8)
DIOCSETP = (DIOC|9)
FIORDCHK = ((ord('f')<<8)|3)
CLNEXT = CTRL(ord('v'))
CWERASE = CTRL(ord('w'))
CFLUSHO = CTRL(ord('o'))
CFLUSH = CFLUSHO
CRPRNT = CTRL(ord('r'))
CDSUSP = CTRL(ord('y'))
__OLD_SSPEED = __OLD_B9600
SSPEED = B9600
TERM_NONE = 0
TERM_TEC = 1
TERM_V61 = 2
TERM_V10 = 3
TERM_TEX = 4
TERM_D40 = 5
TERM_H45 = 6
TERM_D42 = 7
TM_NONE = 0000
TM_SNL = 0001
TM_ANL = 0002
TM_LCF = 0004
TM_CECHO = 0010
TM_CINVIS = 0020
TM_SET = 0200
LDISC0 = 0
LDISC1 = 1
NTTYDISC = LDISC1
TIOCFLUSH = (TIOC|12)
TCSETLABEL = (TIOC|31)
TCDSET = (TIOC|32)
TCBLKMD = (TIOC|33)
TIOCPKT = (TIOC|112)
TIOCPKT_DATA = 0x00
TIOCPKT_FLUSHREAD = 0x01
TIOCPKT_FLUSHWRITE = 0x02
TIOCPKT_NOSTOP = 0x10
TIOCPKT_DOSTOP = 0x20
TIOCPKT_IOCTL = 0x40
TIOCNOTTY = (TIOC|113)
TIOCSTI = (TIOC|114)
TFIOC = (ord('F')<<8)
oFIONREAD = (TFIOC|127)
TO_STOP = LOBLK
IOCTYPE = 0xff00
__NEW_TCGETS = (TIOC|213)
__NEW_TCSETS = (TIOC|214)
__NEW_TCSETSW = (TIOC|215)
__NEW_TCSETSF = (TIOC|216)
__OLD_TCGETS = (TIOC|13)
__OLD_TCSETS = (TIOC|14)
__OLD_TCSETSW = (TIOC|15)
__OLD_TCSETSF = (TIOC|16)
TCGETS = __NEW_TCGETS
TCSETS = __NEW_TCSETS
TCSETSW = __NEW_TCSETSW
TCSETSF = __NEW_TCSETSF
TCGETS = __OLD_TCGETS
TCSETS = __OLD_TCSETS
TCSETSW = __OLD_TCSETSW
TCSETSF = __OLD_TCSETSF
TCSANOW = ((ord('T')<<8)|14)
TCSADRAIN = ((ord('T')<<8)|15)
TCSAFLUSH = ((ord('T')<<8)|16)
TCIFLUSH = 0
TCOFLUSH = 1
TCIOFLUSH = 2
TCOOFF = 0
TCOON = 1
TCIOFF = 2
TCION = 3
tIOC = (ord('t')<<8)
TIOCGETD = (tIOC|0)
TIOCSETD = (tIOC|1)
TIOCHPCL = (tIOC|2)
TIOCGETP = (tIOC|8)
TIOCSETP = (tIOC|9)
TIOCSETN = (tIOC|10)
TIOCEXCL = (tIOC|13)
TIOCNXCL = (tIOC|14)
TIOCSETC = (tIOC|17)
TIOCGETC = (tIOC|18)
TIOCLBIS = (tIOC|127)
TIOCLBIC = (tIOC|126)
TIOCLSET = (tIOC|125)
TIOCLGET = (tIOC|124)
TIOCSBRK = (tIOC|123)
TIOCCBRK = (tIOC|122)
TIOCSDTR = (tIOC|121)
TIOCCDTR = (tIOC|120)
TIOCSLTC = (tIOC|117)
TIOCGLTC = (tIOC|116)
TIOCOUTQ = (tIOC|115)
TIOCSTOP = (tIOC|111)
TIOCSTART = (tIOC|110)
TIOCGSID = (tIOC|22)
TIOCSSID = (tIOC|24)
TIOCMSET = (tIOC|26)
TIOCMBIS = (tIOC|27)
TIOCMBIC = (tIOC|28)
TIOCMGET = (tIOC|29)
TIOCM_LE = 0001
TIOCM_DTR = 0002
TIOCM_RTS = 0004
TIOCM_ST = 0010
TIOCM_SR = 0020
TIOCM_CTS = 0040
TIOCM_CAR = 0100
TIOCM_CD = TIOCM_CAR
TIOCM_RNG = 0200
TIOCM_RI = TIOCM_RNG
TIOCM_DSR = 0400
TIOCREMOTE = (tIOC|30)
TIOCSIGNAL = (tIOC|31)
ISPTM = ((ord('P')<<8)|1)
UNLKPT = ((ord('P')<<8)|2)
SVR4SOPEN = ((ord('P')<<8)|100)
LDIOC = (ord('D')<<8)
LDOPEN = (LDIOC|0)
LDCLOSE = (LDIOC|1)
LDCHG = (LDIOC|2)
LDGETT = (LDIOC|8)
LDSETT = (LDIOC|9)
LDSMAP = (LDIOC|10)
LDGMAP = (LDIOC|11)
LDNMAP = (LDIOC|12)
DIOC = (ord('d')<<8)
DIOCGETP = (DIOC|8)
DIOCSETP = (DIOC|9)
FIORDCHK = ((ord('f')<<8)|3)