diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-02-13 05:06:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-13 05:06:52 -0800 |
| commit | d7563a7753393d7f0d1af445276a64b8a55cb857 (patch) | |
| tree | add529c48653e4b4525fd2fe30e0ce2503c3d703 /lib/std/c | |
| parent | 0c725a354a801c84100011db5eb53ae6c58086c9 (diff) | |
| parent | ce3bd515973c45ef755da04bc83585b7ce6b87b8 (diff) | |
| download | zig-d7563a7753393d7f0d1af445276a64b8a55cb857.tar.gz zig-d7563a7753393d7f0d1af445276a64b8a55cb857.zip | |
Merge pull request #18910 from ziglang/std-termios
std.os.termios: consolidate, correct, and complete API definitions
Diffstat (limited to 'lib/std/c')
| -rw-r--r-- | lib/std/c/darwin.zig | 165 | ||||
| -rw-r--r-- | lib/std/c/emscripten.zig | 2 | ||||
| -rw-r--r-- | lib/std/c/haiku.zig | 17 | ||||
| -rw-r--r-- | lib/std/c/linux.zig | 2 | ||||
| -rw-r--r-- | lib/std/c/netbsd.zig | 121 | ||||
| -rw-r--r-- | lib/std/c/openbsd.zig | 112 | ||||
| -rw-r--r-- | lib/std/c/solaris.zig | 14 |
7 files changed, 0 insertions, 433 deletions
diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig index d598c7d7b8..947abe58c9 100644 --- a/lib/std/c/darwin.zig +++ b/lib/std/c/darwin.zig @@ -2692,127 +2692,6 @@ pub const SHUT = struct { pub const RDWR = 2; }; -// Term -pub const V = struct { - pub const EOF = 0; - pub const EOL = 1; - pub const EOL2 = 2; - pub const ERASE = 3; - pub const WERASE = 4; - pub const KILL = 5; - pub const REPRINT = 6; - pub const INTR = 8; - pub const QUIT = 9; - pub const SUSP = 10; - pub const DSUSP = 11; - pub const START = 12; - pub const STOP = 13; - pub const LNEXT = 14; - pub const DISCARD = 15; - pub const MIN = 16; - pub const TIME = 17; - pub const STATUS = 18; -}; - -pub const NCCS = 20; // 2 spares (7, 19) - -pub const cc_t = u8; -pub const speed_t = u64; -pub const tcflag_t = u64; - -pub const IGNBRK: tcflag_t = 0x00000001; // ignore BREAK condition -pub const BRKINT: tcflag_t = 0x00000002; // map BREAK to SIGINTR -pub const IGNPAR: tcflag_t = 0x00000004; // ignore (discard) parity errors -pub const PARMRK: tcflag_t = 0x00000008; // mark parity and framing errors -pub const INPCK: tcflag_t = 0x00000010; // enable checking of parity errors -pub const ISTRIP: tcflag_t = 0x00000020; // strip 8th bit off chars -pub const INLCR: tcflag_t = 0x00000040; // map NL into CR -pub const IGNCR: tcflag_t = 0x00000080; // ignore CR -pub const ICRNL: tcflag_t = 0x00000100; // map CR to NL (ala CRMOD) -pub const IXON: tcflag_t = 0x00000200; // enable output flow control -pub const IXOFF: tcflag_t = 0x00000400; // enable input flow control -pub const IXANY: tcflag_t = 0x00000800; // any char will restart after stop -pub const IMAXBEL: tcflag_t = 0x00002000; // ring bell on input queue full -pub const IUTF8: tcflag_t = 0x00004000; // maintain state for UTF-8 VERASE - -pub const OPOST: tcflag_t = 0x00000001; //enable following output processing -pub const ONLCR: tcflag_t = 0x00000002; // map NL to CR-NL (ala CRMOD) -pub const OXTABS: tcflag_t = 0x00000004; // expand tabs to spaces -pub const ONOEOT: tcflag_t = 0x00000008; // discard EOT's (^D) on output) - -pub const OCRNL: tcflag_t = 0x00000010; // map CR to NL on output -pub const ONOCR: tcflag_t = 0x00000020; // no CR output at column 0 -pub const ONLRET: tcflag_t = 0x00000040; // NL performs CR function -pub const OFILL: tcflag_t = 0x00000080; // use fill characters for delay -pub const NLDLY: tcflag_t = 0x00000300; // \n delay -pub const TABDLY: tcflag_t = 0x00000c04; // horizontal tab delay -pub const CRDLY: tcflag_t = 0x00003000; // \r delay -pub const FFDLY: tcflag_t = 0x00004000; // form feed delay -pub const BSDLY: tcflag_t = 0x00008000; // \b delay -pub const VTDLY: tcflag_t = 0x00010000; // vertical tab delay -pub const OFDEL: tcflag_t = 0x00020000; // fill is DEL, else NUL - -pub const NL0: tcflag_t = 0x00000000; -pub const NL1: tcflag_t = 0x00000100; -pub const NL2: tcflag_t = 0x00000200; -pub const NL3: tcflag_t = 0x00000300; -pub const TAB0: tcflag_t = 0x00000000; -pub const TAB1: tcflag_t = 0x00000400; -pub const TAB2: tcflag_t = 0x00000800; -pub const TAB3: tcflag_t = 0x00000004; -pub const CR0: tcflag_t = 0x00000000; -pub const CR1: tcflag_t = 0x00001000; -pub const CR2: tcflag_t = 0x00002000; -pub const CR3: tcflag_t = 0x00003000; -pub const FF0: tcflag_t = 0x00000000; -pub const FF1: tcflag_t = 0x00004000; -pub const BS0: tcflag_t = 0x00000000; -pub const BS1: tcflag_t = 0x00008000; -pub const VT0: tcflag_t = 0x00000000; -pub const VT1: tcflag_t = 0x00010000; - -pub const CIGNORE: tcflag_t = 0x00000001; // ignore control flags -pub const CSIZE: tcflag_t = 0x00000300; // character size mask -pub const CS5: tcflag_t = 0x00000000; // 5 bits (pseudo) -pub const CS6: tcflag_t = 0x00000100; // 6 bits -pub const CS7: tcflag_t = 0x00000200; // 7 bits -pub const CS8: tcflag_t = 0x00000300; // 8 bits -pub const CSTOPB: tcflag_t = 0x0000040; // send 2 stop bits -pub const CREAD: tcflag_t = 0x00000800; // enable receiver -pub const PARENB: tcflag_t = 0x00001000; // parity enable -pub const PARODD: tcflag_t = 0x00002000; // odd parity, else even -pub const HUPCL: tcflag_t = 0x00004000; // hang up on last close -pub const CLOCAL: tcflag_t = 0x00008000; // ignore modem status lines -pub const CCTS_OFLOW: tcflag_t = 0x00010000; // CTS flow control of output -pub const CRTSCTS: tcflag_t = (CCTS_OFLOW | CRTS_IFLOW); -pub const CRTS_IFLOW: tcflag_t = 0x00020000; // RTS flow control of input -pub const CDTR_IFLOW: tcflag_t = 0x00040000; // DTR flow control of input -pub const CDSR_OFLOW: tcflag_t = 0x00080000; // DSR flow control of output -pub const CCAR_OFLOW: tcflag_t = 0x00100000; // DCD flow control of output -pub const MDMBUF: tcflag_t = 0x00100000; // old name for CCAR_OFLOW - -pub const ECHOKE: tcflag_t = 0x00000001; // visual erase for line kill -pub const ECHOE: tcflag_t = 0x00000002; // visually erase chars -pub const ECHOK: tcflag_t = 0x00000004; // echo NL after line kill -pub const ECHO: tcflag_t = 0x00000008; // enable echoing -pub const ECHONL: tcflag_t = 0x00000010; // echo NL even if ECHO is off -pub const ECHOPRT: tcflag_t = 0x00000020; // visual erase mode for hardcopy -pub const ECHOCTL: tcflag_t = 0x00000040; // echo control chars as ^(Char) -pub const ISIG: tcflag_t = 0x00000080; // enable signals INTR, QUIT, [D]SUSP -pub const ICANON: tcflag_t = 0x00000100; // canonicalize input lines -pub const ALTWERASE: tcflag_t = 0x00000200; // use alternate WERASE algorithm -pub const IEXTEN: tcflag_t = 0x00000400; // enable DISCARD and LNEXT -pub const EXTPROC: tcflag_t = 0x00000800; // external processing -pub const TOSTOP: tcflag_t = 0x00400000; // stop background jobs from output -pub const FLUSHO: tcflag_t = 0x00800000; // output being flushed (state) -pub const NOKERNINFO: tcflag_t = 0x02000000; // no kernel output from VSTATUS -pub const PENDIN: tcflag_t = 0x20000000; // XXX retype pending input (state) -pub const NOFLSH: tcflag_t = 0x80000000; // don't flush after interrupt - -pub const TCSANOW: tcflag_t = 0; // make change immediate -pub const TCSADRAIN: tcflag_t = 1; // drain output, then change -pub const TCSAFLUSH: tcflag_t = 2; // drain output, flush input -pub const TCSASOFT: tcflag_t = 0x10; // flag - don't alter h.w. state pub const TCSA = enum(c_uint) { NOW, DRAIN, @@ -2820,50 +2699,6 @@ pub const TCSA = enum(c_uint) { _, }; -pub const B0: tcflag_t = 0; -pub const B50: tcflag_t = 50; -pub const B75: tcflag_t = 75; -pub const B110: tcflag_t = 110; -pub const B134: tcflag_t = 134; -pub const B150: tcflag_t = 150; -pub const B200: tcflag_t = 200; -pub const B300: tcflag_t = 300; -pub const B600: tcflag_t = 600; -pub const B1200: tcflag_t = 1200; -pub const B1800: tcflag_t = 1800; -pub const B2400: tcflag_t = 2400; -pub const B4800: tcflag_t = 4800; -pub const B9600: tcflag_t = 9600; -pub const B19200: tcflag_t = 19200; -pub const B38400: tcflag_t = 38400; -pub const B7200: tcflag_t = 7200; -pub const B14400: tcflag_t = 14400; -pub const B28800: tcflag_t = 28800; -pub const B57600: tcflag_t = 57600; -pub const B76800: tcflag_t = 76800; -pub const B115200: tcflag_t = 115200; -pub const B230400: tcflag_t = 230400; -pub const EXTA: tcflag_t = 19200; -pub const EXTB: tcflag_t = 38400; - -pub const TCIFLUSH: tcflag_t = 1; -pub const TCOFLUSH: tcflag_t = 2; -pub const TCIOFLUSH: tcflag_t = 3; -pub const TCOOFF: tcflag_t = 1; -pub const TCOON: tcflag_t = 2; -pub const TCIOFF: tcflag_t = 3; -pub const TCION: tcflag_t = 4; - -pub const termios = extern struct { - iflag: tcflag_t, // input flags - oflag: tcflag_t, // output flags - cflag: tcflag_t, // control flags - lflag: tcflag_t, // local flags - cc: [NCCS]cc_t, // control chars - ispeed: speed_t align(8), // input speed - ospeed: speed_t, // output speed -}; - pub const winsize = extern struct { ws_row: u16, ws_col: u16, diff --git a/lib/std/c/emscripten.zig b/lib/std/c/emscripten.zig index ae72928eb9..0031132855 100644 --- a/lib/std/c/emscripten.zig +++ b/lib/std/c/emscripten.zig @@ -72,8 +72,6 @@ pub const sigset_t = emscripten.sigset_t; pub const sockaddr = emscripten.sockaddr; pub const socklen_t = emscripten.socklen_t; pub const stack_t = emscripten.stack_t; -pub const tcflag_t = emscripten.tcflag_t; -pub const termios = emscripten.termios; pub const time_t = emscripten.time_t; pub const timespec = emscripten.timespec; pub const timeval = emscripten.timeval; diff --git a/lib/std/c/haiku.zig b/lib/std/c/haiku.zig index 63bfa6b82e..723d953d2d 100644 --- a/lib/std/c/haiku.zig +++ b/lib/std/c/haiku.zig @@ -950,21 +950,4 @@ pub const directory_which = enum(c_int) { _, }; -pub const cc_t = u8; -pub const speed_t = u8; -pub const tcflag_t = u32; - -pub const NCCS = 11; - -pub const termios = extern struct { - c_iflag: tcflag_t, - c_oflag: tcflag_t, - c_cflag: tcflag_t, - c_lflag: tcflag_t, - c_line: cc_t, - c_ispeed: speed_t, - c_ospeed: speed_t, - cc_t: [NCCS]cc_t, -}; - pub const MSG_NOSIGNAL = 0x0800; diff --git a/lib/std/c/linux.zig b/lib/std/c/linux.zig index dd26c9ccc3..45ced99e41 100644 --- a/lib/std/c/linux.zig +++ b/lib/std/c/linux.zig @@ -85,8 +85,6 @@ pub const sigset_t = linux.sigset_t; pub const sockaddr = linux.sockaddr; pub const socklen_t = linux.socklen_t; pub const stack_t = linux.stack_t; -pub const tcflag_t = linux.tcflag_t; -pub const termios = linux.termios; pub const time_t = linux.time_t; pub const timespec = linux.timespec; pub const timeval = linux.timeval; diff --git a/lib/std/c/netbsd.zig b/lib/std/c/netbsd.zig index b062090dd4..46997c5d75 100644 --- a/lib/std/c/netbsd.zig +++ b/lib/std/c/netbsd.zig @@ -806,90 +806,6 @@ pub const T = struct { pub const IOCXMTFRAME = 0x80087444; }; -// Term -const V = struct { - pub const EOF = 0; // ICANON - pub const EOL = 1; // ICANON - pub const EOL2 = 2; // ICANON - pub const ERASE = 3; // ICANON - pub const WERASE = 4; // ICANON - pub const KILL = 5; // ICANON - pub const REPRINT = 6; // ICANON - // 7 spare 1 - pub const INTR = 8; // ISIG - pub const QUIT = 9; // ISIG - pub const SUSP = 10; // ISIG - pub const DSUSP = 11; // ISIG - pub const START = 12; // IXON, IXOFF - pub const STOP = 13; // IXON, IXOFF - pub const LNEXT = 14; // IEXTEN - pub const DISCARD = 15; // IEXTEN - pub const MIN = 16; // !ICANON - pub const TIME = 17; // !ICANON - pub const STATUS = 18; // ICANON - // 19 spare 2 -}; - -// Input flags - software input processing -pub const IGNBRK: tcflag_t = 0x00000001; // ignore BREAK condition -pub const BRKINT: tcflag_t = 0x00000002; // map BREAK to SIGINT -pub const IGNPAR: tcflag_t = 0x00000004; // ignore (discard) parity errors -pub const PARMRK: tcflag_t = 0x00000008; // mark parity and framing errors -pub const INPCK: tcflag_t = 0x00000010; // enable checking of parity errors -pub const ISTRIP: tcflag_t = 0x00000020; // strip 8th bit off chars -pub const INLCR: tcflag_t = 0x00000040; // map NL into CR -pub const IGNCR: tcflag_t = 0x00000080; // ignore CR -pub const ICRNL: tcflag_t = 0x00000100; // map CR to NL (ala CRMOD) -pub const IXON: tcflag_t = 0x00000200; // enable output flow control -pub const IXOFF: tcflag_t = 0x00000400; // enable input flow control -pub const IXANY: tcflag_t = 0x00000800; // any char will restart after stop -pub const IMAXBEL: tcflag_t = 0x00002000; // ring bell on input queue full - -// Output flags - software output processing -pub const OPOST: tcflag_t = 0x00000001; // enable following output processing -pub const ONLCR: tcflag_t = 0x00000002; // map NL to CR-NL (ala CRMOD) -pub const OXTABS: tcflag_t = 0x00000004; // expand tabs to spaces -pub const ONOEOT: tcflag_t = 0x00000008; // discard EOT's (^D) on output -pub const OCRNL: tcflag_t = 0x00000010; // map CR to NL -pub const ONOCR: tcflag_t = 0x00000040; // discard CR's when on column 0 -pub const ONLRET: tcflag_t = 0x00000080; // move to column 0 on CR - -// Control flags - hardware control of terminal -pub const CIGNORE: tcflag_t = 0x00000001; // ignore control flags -pub const CSIZE: tcflag_t = 0x00000300; // character size mask -pub const CS5: tcflag_t = 0x00000000; // 5 bits (pseudo) -pub const CS6: tcflag_t = 0x00000100; // 6 bits -pub const CS7: tcflag_t = 0x00000200; // 7 bits -pub const CS8: tcflag_t = 0x00000300; // 8 bits -pub const CSTOPB: tcflag_t = 0x00000400; // send 2 stop bits -pub const CREAD: tcflag_t = 0x00000800; // enable receiver -pub const PARENB: tcflag_t = 0x00001000; // parity enable -pub const PARODD: tcflag_t = 0x00002000; // odd parity, else even -pub const HUPCL: tcflag_t = 0x00004000; // hang up on last close -pub const CLOCAL: tcflag_t = 0x00008000; // ignore modem status lines -pub const CRTSCTS: tcflag_t = 0x00010000; // RTS/CTS full-duplex flow control -pub const CRTS_IFLOW: tcflag_t = CRTSCTS; // XXX compat -pub const CCTS_OFLOW: tcflag_t = CRTSCTS; // XXX compat -pub const CDTRCTS: tcflag_t = 0x00020000; // DTR/CTS full-duplex flow control -pub const MDMBUF: tcflag_t = 0x00100000; // DTR/DCD hardware flow control -pub const CHWFLOW: tcflag_t = (MDMBUF | CRTSCTS | CDTRCTS); // all types of hw flow control - -pub const tcflag_t = c_uint; -pub const speed_t = c_uint; -pub const cc_t = u8; - -pub const NCCS = 20; - -pub const termios = extern struct { - iflag: tcflag_t, // input flags - oflag: tcflag_t, // output flags - cflag: tcflag_t, // control flags - lflag: tcflag_t, // local flags - cc: [NCCS]cc_t, // control chars - ispeed: c_int, // input speed - ospeed: c_int, // output speed -}; - // Commands passed to tcsetattr() for setting the termios structure. pub const TCSA = struct { pub const NOW = 0; // make change immediate @@ -898,43 +814,6 @@ pub const TCSA = struct { pub const SOFT = 0x10; // flag - don't alter h.w. state }; -// Standard speeds -pub const B0: c_uint = 0; -pub const B50: c_uint = 50; -pub const B75: c_uint = 75; -pub const B110: c_uint = 110; -pub const B134: c_uint = 134; -pub const B150: c_uint = 150; -pub const B200: c_uint = 200; -pub const B300: c_uint = 300; -pub const B600: c_uint = 600; -pub const B1200: c_uint = 1200; -pub const B1800: c_uint = 1800; -pub const B2400: c_uint = 2400; -pub const B4800: c_uint = 4800; -pub const B9600: c_uint = 9600; -pub const B19200: c_uint = 19200; -pub const B38400: c_uint = 38400; -pub const B7200: c_uint = 7200; -pub const B14400: c_uint = 14400; -pub const B28800: c_uint = 28800; -pub const B57600: c_uint = 57600; -pub const B76800: c_uint = 76800; -pub const B115200: c_uint = 115200; -pub const B230400: c_uint = 230400; -pub const B460800: c_uint = 460800; -pub const B500000: c_uint = 500000; -pub const B921600: c_uint = 921600; -pub const B1000000: c_uint = 1000000; -pub const B1500000: c_uint = 1500000; -pub const B2000000: c_uint = 2000000; -pub const B2500000: c_uint = 2500000; -pub const B3000000: c_uint = 3000000; -pub const B3500000: c_uint = 3500000; -pub const B4000000: c_uint = 4000000; -pub const EXTA: c_uint = 19200; -pub const EXTB: c_uint = 38400; - pub const TCIFLUSH = 1; pub const TCOFLUSH = 2; pub const TCIOFLUSH = 3; diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index adf37ce48e..9b37aef05a 100644 --- a/lib/std/c/openbsd.zig +++ b/lib/std/c/openbsd.zig @@ -768,91 +768,6 @@ pub const AUTH = struct { pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE); }; -// Term -pub const V = struct { - pub const EOF = 0; // ICANON - pub const EOL = 1; // ICANON - pub const EOL2 = 2; // ICANON - pub const ERASE = 3; // ICANON - pub const WERASE = 4; // ICANON - pub const KILL = 5; // ICANON - pub const REPRINT = 6; // ICANON - // 7 spare 1 - pub const INTR = 8; // ISIG - pub const QUIT = 9; // ISIG - pub const SUSP = 10; // ISIG - pub const DSUSP = 11; // ISIG - pub const START = 12; // IXON, IXOFF - pub const STOP = 13; // IXON, IXOFF - pub const LNEXT = 14; // IEXTEN - pub const DISCARD = 15; // IEXTEN - pub const MIN = 16; // !ICANON - pub const TIME = 17; // !ICANON - pub const STATUS = 18; // ICANON - // 19 spare 2 -}; - -pub const tcflag_t = c_uint; -pub const speed_t = c_uint; -pub const cc_t = u8; - -pub const NCCS = 20; - -// Input flags - software input processing -pub const IGNBRK: tcflag_t = 0x00000001; // ignore BREAK condition -pub const BRKINT: tcflag_t = 0x00000002; // map BREAK to SIGINT -pub const IGNPAR: tcflag_t = 0x00000004; // ignore (discard) parity errors -pub const PARMRK: tcflag_t = 0x00000008; // mark parity and framing errors -pub const INPCK: tcflag_t = 0x00000010; // enable checking of parity errors -pub const ISTRIP: tcflag_t = 0x00000020; // strip 8th bit off chars -pub const INLCR: tcflag_t = 0x00000040; // map NL into CR -pub const IGNCR: tcflag_t = 0x00000080; // ignore CR -pub const ICRNL: tcflag_t = 0x00000100; // map CR to NL (ala CRMOD) -pub const IXON: tcflag_t = 0x00000200; // enable output flow control -pub const IXOFF: tcflag_t = 0x00000400; // enable input flow control -pub const IXANY: tcflag_t = 0x00000800; // any char will restart after stop -pub const IUCLC: tcflag_t = 0x00001000; // translate upper to lower case -pub const IMAXBEL: tcflag_t = 0x00002000; // ring bell on input queue full - -// Output flags - software output processing -pub const OPOST: tcflag_t = 0x00000001; // enable following output processing -pub const ONLCR: tcflag_t = 0x00000002; // map NL to CR-NL (ala CRMOD) -pub const OXTABS: tcflag_t = 0x00000004; // expand tabs to spaces -pub const ONOEOT: tcflag_t = 0x00000008; // discard EOT's (^D) on output -pub const OCRNL: tcflag_t = 0x00000010; // map CR to NL -pub const OLCUC: tcflag_t = 0x00000020; // translate lower case to upper case -pub const ONOCR: tcflag_t = 0x00000040; // No CR output at column 0 -pub const ONLRET: tcflag_t = 0x00000080; // NL performs the CR function - -// Control flags - hardware control of terminal -pub const CIGNORE: tcflag_t = 0x00000001; // ignore control flags -pub const CSIZE: tcflag_t = 0x00000300; // character size mask -pub const CS5: tcflag_t = 0x00000000; // 5 bits (pseudo) -pub const CS6: tcflag_t = 0x00000100; // 6 bits -pub const CS7: tcflag_t = 0x00000200; // 7 bits -pub const CS8: tcflag_t = 0x00000300; // 8 bits -pub const CSTOPB: tcflag_t = 0x00000400; // send 2 stop bits -pub const CREAD: tcflag_t = 0x00000800; // enable receiver -pub const PARENB: tcflag_t = 0x00001000; // parity enable -pub const PARODD: tcflag_t = 0x00002000; // odd parity, else even -pub const HUPCL: tcflag_t = 0x00004000; // hang up on last close -pub const CLOCAL: tcflag_t = 0x00008000; // ignore modem status lines -pub const CRTSCTS: tcflag_t = 0x00010000; // RTS/CTS full-duplex flow control -pub const CRTS_IFLOW: tcflag_t = CRTSCTS; // XXX compat -pub const CCTS_OFLOW: tcflag_t = CRTSCTS; // XXX compat -pub const MDMBUF: tcflag_t = 0x00100000; // DTR/DCD hardware flow control -pub const CHWFLOW: tcflag_t = (MDMBUF | CRTSCTS); // all types of hw flow control - -pub const termios = extern struct { - iflag: tcflag_t, // input flags - oflag: tcflag_t, // output flags - cflag: tcflag_t, // control flags - lflag: tcflag_t, // local flags - cc: [NCCS]cc_t, // control chars - ispeed: c_int, // input speed - ospeed: c_int, // output speed -}; - // Commands passed to tcsetattr() for setting the termios structure. pub const TCSA = struct { pub const NOW = 0; // make change immediate @@ -861,33 +776,6 @@ pub const TCSA = struct { pub const SOFT = 0x10; // flag - don't alter h.w. state }; -// Standard speeds -pub const B0 = 0; -pub const B50 = 50; -pub const B75 = 75; -pub const B110 = 110; -pub const B134 = 134; -pub const B150 = 150; -pub const B200 = 200; -pub const B300 = 300; -pub const B600 = 600; -pub const B1200 = 1200; -pub const B1800 = 1800; -pub const B2400 = 2400; -pub const B4800 = 4800; -pub const B9600 = 9600; -pub const B19200 = 19200; -pub const B38400 = 38400; -pub const B7200 = 7200; -pub const B14400 = 14400; -pub const B28800 = 28800; -pub const B57600 = 57600; -pub const B76800 = 76800; -pub const B115200 = 115200; -pub const B230400 = 230400; -pub const EXTA = 19200; -pub const EXTB = 38400; - pub const TCIFLUSH = 1; pub const TCOFLUSH = 2; pub const TCIOFLUSH = 3; diff --git a/lib/std/c/solaris.zig b/lib/std/c/solaris.zig index db4afbcced..7cb35697d4 100644 --- a/lib/std/c/solaris.zig +++ b/lib/std/c/solaris.zig @@ -698,20 +698,6 @@ pub const SEEK = struct { pub const HOLE = 4; }; -pub const tcflag_t = c_uint; -pub const cc_t = u8; -pub const speed_t = c_uint; - -pub const NCCS = 19; - -pub const termios = extern struct { - c_iflag: tcflag_t, - c_oflag: tcflag_t, - c_cflag: tcflag_t, - c_lflag: tcflag_t, - c_cc: [NCCS]cc_t, -}; - fn tioc(t: u16, num: u8) u16 { return (t << 8) | num; } |
