summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosias <justjosias@tutanota.com>2020-04-17 17:53:59 +0300
committerJosias <justjosias@tutanota.com>2020-04-17 17:53:59 +0300
commitd38173f8b862b47cef5e6b192f61ced7c1d6fee6 (patch)
treea8d863cd931a0929c0786b2782ade5e9ed8238b2
parent6ab79c2cfba261d495f2b6aebfb4fba5a8ba2de9 (diff)
Use @as for multiple numbers
-rw-r--r--curses.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/curses.zig b/curses.zig
index cc700c5..7ea0c46 100644
--- a/curses.zig
+++ b/curses.zig
@@ -18,12 +18,10 @@ const Window = struct {
var original_termios = try os.tcgetattr(STDIN_FILENO);
var raw = original_termios;
- raw.iflag &= ~(@as(u8, os.BRKINT) | @as(u16, os.ICRNL) |
- @as(u8, os.INPCK) | @as(u8, os.ISTRIP) | @as(u16, os.IXON));
+ raw.iflag &= ~(@as(u16, os.BRKINT | os.ICRNL | os.INPCK | os.ISTRIP | os.IXON));
raw.oflag &= ~(@as(u8, os.OPOST));
raw.cflag |= (os.CS8);
- raw.lflag &= ~(@as(u8, os.ECHO) | @as(u8, os.ICANON) |
- @as(u16, os.IEXTEN) | @as(u8, os.ISIG));
+ raw.lflag &= ~(@as(u16, os.ECHO | os.ICANON | os.IEXTEN | os.ISIG));
// My attempt at VTIME and VMIN
raw.cc[5] = 0;