Skip to content

Commit 14a3a11

Browse files
committed
Add more termios output flags
1 parent 299e3f6 commit 14a3a11

File tree

18 files changed

+165
-0
lines changed

18 files changed

+165
-0
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,10 @@ pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
517517
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
518518
pub const AT_REMOVEDIR: ::c_int = 0x800;
519519

520+
pub const TABDLY: ::tcflag_t = 0x00000004;
521+
pub const TAB0: ::tcflag_t = 0x00000000;
522+
pub const TAB3: ::tcflag_t = 0x00000004;
523+
520524
extern {
521525
pub fn __error() -> *mut ::c_int;
522526

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,9 @@ pub const EXTB: speed_t = 38400;
861861
pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
862862

863863
pub const CRTSCTS: ::tcflag_t = 0x00030000;
864+
pub const OCRNL: ::tcflag_t = 0x10;
865+
pub const ONOCR: ::tcflag_t = 0x20;
866+
pub const ONLRET: ::tcflag_t = 0x40;
864867

865868
f! {
866869
pub fn WIFCONTINUED(status: ::c_int) -> bool {

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,8 @@ pub const EXTB: speed_t = 38400;
538538

539539
pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
540540

541+
pub const OCRNL: ::tcflag_t = 0x10;
542+
541543
f! {
542544
pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
543545
status >> 8

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,9 @@ pub const P_PGID: idtype_t = 4;
644644
pub const B460800: ::speed_t = 460800;
645645
pub const B921600: ::speed_t = 921600;
646646

647+
pub const ONOCR: ::tcflag_t = 0x20;
648+
pub const ONLRET: ::tcflag_t = 0x40;
649+
647650
// dirfd() is a macro on netbsd to access
648651
// the first field of the struct where dirp points to:
649652
// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ pub const KI_WMESGLEN: ::c_int = 8;
460460
pub const KI_MAXLOGNAME: ::c_int = 32;
461461
pub const KI_EMULNAMELEN: ::c_int = 8;
462462

463+
pub const OLCUC: ::tcflag_t = 0x20;
464+
pub const ONOCR: ::tcflag_t = 0x40;
465+
pub const ONLRET: ::tcflag_t = 0x80;
466+
463467
extern {
464468
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
465469
pub fn getnameinfo(sa: *const ::sockaddr,

src/unix/haiku/mod.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,35 @@ pub const P_ALL: idtype_t = 0;
686686
pub const P_PID: idtype_t = 1;
687687
pub const P_PGID: idtype_t = 2;
688688

689+
pub const OLCUC: ::tcflag_t = 0o000002;
690+
pub const OCRNL: ::tcflag_t = 0o000010;
691+
pub const ONOCR: ::tcflag_t = 0o000020;
692+
pub const ONLRET: ::tcflag_t = 0o000040;
693+
pub const OFILL: ::tcflag_t = 0o000100;
694+
pub const OFDEL: ::tcflag_t = 0o000200;
695+
pub const NLDLY: ::tcflag_t = 0o000400;
696+
pub const NL0: ::tcflag_t = 0o000000;
697+
pub const NL1: ::tcflag_t = 0o000400;
698+
pub const CRDLY: ::tcflag_t = 0o003000;
699+
pub const CR0: ::tcflag_t = 0o000000;
700+
pub const CR1: ::tcflag_t = 0o001000;
701+
pub const CR2: ::tcflag_t = 0o002000;
702+
pub const CR3: ::tcflag_t = 0o003000;
703+
pub const TABDLY: ::tcflag_t = 0o014000;
704+
pub const TAB0: ::tcflag_t = 0o000000;
705+
pub const TAB1: ::tcflag_t = 0o004000;
706+
pub const TAB2: ::tcflag_t = 0o010000;
707+
pub const TAB3: ::tcflag_t = 0o014000;
708+
pub const BSDLY: ::tcflag_t = 0o020000;
709+
pub const BS0: ::tcflag_t = 0o000000;
710+
pub const BS1: ::tcflag_t = 0o020000;
711+
pub const FFDLY: ::tcflag_t = 0o100000;
712+
pub const FF0: ::tcflag_t = 0o000000;
713+
pub const FF1: ::tcflag_t = 0o100000;
714+
pub const VTDLY: ::tcflag_t = 0o040000;
715+
pub const VT0: ::tcflag_t = 0o000000;
716+
pub const VT1: ::tcflag_t = 0o040000;
717+
689718
f! {
690719
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
691720
let fd = fd as usize;

src/unix/notbsd/android/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,14 @@ pub const ISIG: ::tcflag_t = 0x00000001;
626626
pub const ICANON: ::tcflag_t = 0x00000002;
627627
pub const PENDIN: ::tcflag_t = 0x00004000;
628628
pub const NOFLSH: ::tcflag_t = 0x00000080;
629+
pub const OLCUC: ::tcflag_t = 0o000002;
630+
pub const NLDLY: ::tcflag_t = 0o000400;
631+
pub const CRDLY: ::tcflag_t = 0o003000;
632+
pub const TABDLY: ::tcflag_t = 0o014000;
633+
pub const BSDLY: ::tcflag_t = 0o020000;
634+
pub const FFDLY: ::tcflag_t = 0o100000;
635+
pub const VTDLY: ::tcflag_t = 0o040000;
636+
pub const XTABS: ::tcflag_t = 0o014000;
629637

630638
pub const B0: ::speed_t = 0o000000;
631639
pub const B50: ::speed_t = 0o000001;

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,16 @@ pub const ISIG: ::tcflag_t = 0x00000001;
490490
pub const ICANON: ::tcflag_t = 0x00000002;
491491
pub const PENDIN: ::tcflag_t = 0x00004000;
492492
pub const NOFLSH: ::tcflag_t = 0x00000080;
493+
pub const CIBAUD: ::tcflag_t = 0o02003600000;
494+
pub const CBAUDEX: ::tcflag_t = 0o010000;
495+
pub const OLCUC: ::tcflag_t = 0o000002;
496+
pub const NLDLY: ::tcflag_t = 0o000400;
497+
pub const CRDLY: ::tcflag_t = 0o003000;
498+
pub const TABDLY: ::tcflag_t = 0o014000;
499+
pub const BSDLY: ::tcflag_t = 0o020000;
500+
pub const FFDLY: ::tcflag_t = 0o100000;
501+
pub const VTDLY: ::tcflag_t = 0o040000;
502+
pub const XTABS: ::tcflag_t = 0o014000;
493503

494504
pub const B0: ::speed_t = 0o000000;
495505
pub const B50: ::speed_t = 0o000001;

src/unix/notbsd/linux/musl/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,17 @@ pub const ISIG: ::tcflag_t = 0x00000001;
280280
pub const ICANON: ::tcflag_t = 0x00000002;
281281
pub const PENDIN: ::tcflag_t = 0x00004000;
282282
pub const NOFLSH: ::tcflag_t = 0x00000080;
283+
pub const CMSPAR: ::tcflag_t = 0o10000000000;
284+
pub const CIBAUD: ::tcflag_t = 0o02003600000;
285+
pub const CBAUDEX: ::tcflag_t = 0o010000;
286+
pub const OLCUC: ::tcflag_t = 0o000002;
287+
pub const NLDLY: ::tcflag_t = 0o000400;
288+
pub const CRDLY: ::tcflag_t = 0o003000;
289+
pub const TABDLY: ::tcflag_t = 0o014000;
290+
pub const BSDLY: ::tcflag_t = 0o020000;
291+
pub const FFDLY: ::tcflag_t = 0o100000;
292+
pub const VTDLY: ::tcflag_t = 0o040000;
293+
pub const XTABS: ::tcflag_t = 0o014000;
283294

284295
pub const B0: ::speed_t = 0o000000;
285296
pub const B50: ::speed_t = 0o000001;

src/unix/notbsd/linux/other/b32/arm.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ pub const ISIG: ::tcflag_t = 0x00000001;
141141
pub const ICANON: ::tcflag_t = 0x00000002;
142142
pub const PENDIN: ::tcflag_t = 0x00004000;
143143
pub const NOFLSH: ::tcflag_t = 0x00000080;
144+
pub const CIBAUD: ::tcflag_t = 0o02003600000;
145+
pub const CBAUDEX: ::tcflag_t = 0o010000;
146+
pub const OLCUC: ::tcflag_t = 0o000002;
147+
pub const NLDLY: ::tcflag_t = 0o000400;
148+
pub const CRDLY: ::tcflag_t = 0o003000;
149+
pub const TABDLY: ::tcflag_t = 0o014000;
150+
pub const BSDLY: ::tcflag_t = 0o020000;
151+
pub const FFDLY: ::tcflag_t = 0o100000;
152+
pub const VTDLY: ::tcflag_t = 0o040000;
153+
pub const XTABS: ::tcflag_t = 0o014000;
144154

145155
pub const B0: ::speed_t = 0o000000;
146156
pub const B50: ::speed_t = 0o000001;

0 commit comments

Comments
 (0)