aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-12 16:43:51 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-02-12 16:43:51 -0700
commit47643cc5cc4db4c0fb2aaa7f37cedb049fce7def (patch)
treeb1028914cc897c70278973d47239dfb41efb57c1 /lib/std/c
parent0c88f927f161224f5c5ce2b12a76133a421af081 (diff)
downloadzig-47643cc5cc4db4c0fb2aaa7f37cedb049fce7def.tar.gz
zig-47643cc5cc4db4c0fb2aaa7f37cedb049fce7def.zip
std.os.termios: add type safety to iflag field
This creates `tc_iflag_t` even though such a type is not defined by libc. I also collected the missing flag bits from all the operating systems.
Diffstat (limited to 'lib/std/c')
-rw-r--r--lib/std/c/darwin.zig15
-rw-r--r--lib/std/c/netbsd.zig14
-rw-r--r--lib/std/c/openbsd.zig15
3 files changed, 0 insertions, 44 deletions
diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig
index 715678de22..d9e456921e 100644
--- a/lib/std/c/darwin.zig
+++ b/lib/std/c/darwin.zig
@@ -2692,21 +2692,6 @@ pub const SHUT = struct {
pub const RDWR = 2;
};
-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
diff --git a/lib/std/c/netbsd.zig b/lib/std/c/netbsd.zig
index 8f668beb63..cdb0564973 100644
--- a/lib/std/c/netbsd.zig
+++ b/lib/std/c/netbsd.zig
@@ -806,20 +806,6 @@ pub const T = struct {
pub const IOCXMTFRAME = 0x80087444;
};
-// 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
diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig
index a8dc6e615d..1a0d788fb3 100644
--- a/lib/std/c/openbsd.zig
+++ b/lib/std/c/openbsd.zig
@@ -768,21 +768,6 @@ pub const AUTH = struct {
pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE);
};
-// 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