std.os.termios: add/fix std.c.TCSA for BSDs

This commit is contained in:
Michael Dusan 2024-02-15 02:38:20 -05:00
parent 50cdb75034
commit 2ff64c7cb2
No known key found for this signature in database
GPG Key ID: ED4C5BA849FA1B74
4 changed files with 24 additions and 12 deletions

View File

@ -557,6 +557,13 @@ pub const NOTE_FFCTRLMASK = 3221225472;
pub const NOTE_FFCOPY = 3221225472;
pub const NOTE_PCTRLMASK = 4026531840;
pub const TCSA = enum(c_uint) {
NOW,
DRAIN,
FLUSH,
_,
};
pub const stack_t = extern struct {
sp: [*]u8,
size: isize,

View File

@ -1153,6 +1153,13 @@ pub const T = struct {
pub const IOCSIG = 0x2004745f;
};
pub const TCSA = enum(c_uint) {
NOW,
DRAIN,
FLUSH,
_,
};
pub const winsize = extern struct {
ws_row: u16,
ws_col: u16,

View File

@ -806,12 +806,11 @@ pub const T = struct {
pub const IOCXMTFRAME = 0x80087444;
};
// Commands passed to tcsetattr() for setting the termios structure.
pub const TCSA = struct {
pub const NOW = 0; // make change immediate
pub const DRAIN = 1; // drain output, then chage
pub const FLUSH = 2; // drain output, flush input
pub const SOFT = 0x10; // flag - don't alter h.w. state
pub const TCSA = enum(c_uint) {
NOW,
DRAIN,
FLUSH,
_,
};
pub const TCIFLUSH = 1;

View File

@ -768,12 +768,11 @@ pub const AUTH = struct {
pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE);
};
// Commands passed to tcsetattr() for setting the termios structure.
pub const TCSA = struct {
pub const NOW = 0; // make change immediate
pub const DRAIN = 1; // drain output, then change
pub const FLUSH = 2; // drain output, flush input
pub const SOFT = 0x10; // flag - don't alter h.w. state
pub const TCSA = enum(c_uint) {
NOW,
DRAIN,
FLUSH,
_,
};
pub const TCIFLUSH = 1;