From d5d5f7f06397d73f497d352f2f38b1a53d932b0d Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Mon, 19 Feb 2024 23:38:33 +0200 Subject: Big update to modern zig --- src/RawMode.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/RawMode.zig') diff --git a/src/RawMode.zig b/src/RawMode.zig index 7298922..f657ac8 100644 --- a/src/RawMode.zig +++ b/src/RawMode.zig @@ -1,4 +1,4 @@ -const linux = std.os.linux; +const system = std.os.system; const std = @import("std"); const RawMode = @This(); @@ -14,16 +14,16 @@ pub fn init() !RawMode { var raw = orig; raw.iflag &= ~@as( - linux.tcflag_t, - linux.BRKINT | linux.ICRNL | linux.INPCK | linux.ISTRIP | linux.IXON, + system.tcflag_t, + system.BRKINT | system.ICRNL | system.INPCK | system.ISTRIP | system.IXON, ); - raw.lflag &= ~@as(linux.tcflag_t, linux.ECHO | linux.ICANON | linux.IEXTEN | linux.ISIG); - raw.oflag &= ~@as(linux.tcflag_t, linux.OPOST); + raw.lflag &= ~@as(system.tcflag_t, system.ECHO | system.ICANON | system.IEXTEN | system.ISIG); + raw.oflag &= ~@as(system.tcflag_t, system.OPOST); - raw.cflag |= linux.CS8; + raw.cflag |= system.CS8; - raw.cc[linux.V.MIN] = 0; - raw.cc[linux.V.TIME] = 1; + raw.cc[system.V.MIN] = 0; + raw.cc[system.V.TIME] = 1; try std.os.tcsetattr(std.os.STDIN_FILENO, .FLUSH, raw); -- cgit v1.2.3