@@ -397,10 +397,7 @@ pub const O_NDELAY: ::c_int = 0x800;
397
397
pub const NI_MAXHOST : :: size_t = 1025 ;
398
398
399
399
pub const NCCS : usize = 19 ;
400
- pub const TCXONC : :: c_int = 0x540A ;
401
- pub const TCFLSH : :: c_int = 0x540B ;
402
400
pub const TCSBRKP : :: c_int = 0x5425 ;
403
- pub const TCGETS : :: c_int = 0x5401 ;
404
401
pub const TCSANOW : :: c_int = 0 ;
405
402
pub const TCSADRAIN : :: c_int = 0x1 ;
406
403
pub const TCSAFLUSH : :: c_int = 0x2 ;
@@ -475,6 +472,38 @@ pub const F_GETLK: ::c_int = 5;
475
472
pub const F_GETOWN : :: c_int = 9 ;
476
473
pub const F_SETOWN : :: c_int = 8 ;
477
474
475
+ pub const TCGETS : :: c_int = 0x5401 ;
476
+ pub const TCSETS : :: c_int = 0x5402 ;
477
+ pub const TCSETSW : :: c_int = 0x5403 ;
478
+ pub const TCSETSF : :: c_int = 0x5404 ;
479
+ pub const TCGETA : :: c_int = 0x5405 ;
480
+ pub const TCSETA : :: c_int = 0x5406 ;
481
+ pub const TCSETAW : :: c_int = 0x5407 ;
482
+ pub const TCSETAF : :: c_int = 0x5408 ;
483
+ pub const TCSBRK : :: c_int = 0x5409 ;
484
+ pub const TCXONC : :: c_int = 0x540A ;
485
+ pub const TCFLSH : :: c_int = 0x540B ;
486
+ pub const TIOCGSOFTCAR : :: c_int = 0x5419 ;
487
+ pub const TIOCSSOFTCAR : :: c_int = 0x541A ;
488
+ pub const TIOCINQ : :: c_int = 0x541B ;
489
+ pub const TIOCLINUX : :: c_int = 0x541C ;
490
+ pub const TIOCGSERIAL : :: c_int = 0x541E ;
491
+ pub const TIOCEXCL : :: c_int = 0x540C ;
492
+ pub const TIOCNXCL : :: c_int = 0x540D ;
493
+ pub const TIOCSCTTY : :: c_int = 0x540E ;
494
+ pub const TIOCGPGRP : :: c_int = 0x540F ;
495
+ pub const TIOCSPGRP : :: c_int = 0x5410 ;
496
+ pub const TIOCOUTQ : :: c_int = 0x5411 ;
497
+ pub const TIOCSTI : :: c_int = 0x5412 ;
498
+ pub const TIOCGWINSZ : :: c_int = 0x5413 ;
499
+ pub const TIOCSWINSZ : :: c_int = 0x5414 ;
500
+ pub const TIOCMGET : :: c_int = 0x5415 ;
501
+ pub const TIOCMBIS : :: c_int = 0x5416 ;
502
+ pub const TIOCMBIC : :: c_int = 0x5417 ;
503
+ pub const TIOCMSET : :: c_int = 0x5418 ;
504
+ pub const FIONREAD : :: c_int = 0x541B ;
505
+ pub const TIOCCONS : :: c_int = 0x541D ;
506
+
478
507
f ! {
479
508
pub fn sigemptyset( set: * mut sigset_t) -> :: c_int {
480
509
* set = 0 ;
@@ -510,18 +539,18 @@ f! {
510
539
return 0
511
540
}
512
541
pub fn tcgetattr( fd: :: c_int, termios: * mut :: termios) -> :: c_int {
513
- ioctl( fd, TCGETS , termios)
542
+ ioctl( fd, :: TCGETS , termios)
514
543
}
515
544
pub fn tcsetattr( fd: :: c_int,
516
545
optional_actions: :: c_int,
517
546
termios: * const :: termios) -> :: c_int {
518
547
ioctl( fd, optional_actions, termios)
519
548
}
520
549
pub fn tcflow( fd: :: c_int, action: :: c_int) -> :: c_int {
521
- ioctl( fd, TCXONC , action as * mut :: c_void)
550
+ ioctl( fd, :: TCXONC , action as * mut :: c_void)
522
551
}
523
552
pub fn tcflush( fd: :: c_int, action: :: c_int) -> :: c_int {
524
- ioctl( fd, TCFLSH , action as * mut :: c_void)
553
+ ioctl( fd, :: TCFLSH , action as * mut :: c_void)
525
554
}
526
555
pub fn tcsendbreak( fd: :: c_int, duration: :: c_int) -> :: c_int {
527
556
ioctl( fd, TCSBRKP , duration as * mut :: c_void)
0 commit comments