diff --git a/build.zig.version b/build.zig.version index a7b1b48..2feaf3b 100644 --- a/build.zig.version +++ b/build.zig.version @@ -1 +1 @@ -0.12.0-dev.3059+27f589dea +0.12.0-dev.3405+31791ae15 diff --git a/build.zig.zon b/build.zig.zon index 093cb9e..711298b 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -8,8 +8,8 @@ .hash = "1220882e05fd3aad5cfdcf13b988b0ecb26a7009870379a1e7aa7fad9e2486b3a8fa", }, .clap = .{ - .url = "https://github.com/Hejsil/zig-clap/archive/9c23bcb5aebe0c2542b4de4472f60959974e2222.tar.gz", - .hash = "12209e829da9d7d0bc089e4e0cbc07bb882f6192cd583277277da34df53cd05b8f2a", + .url = "https://github.com/Hejsil/zig-clap/archive/209ba4da76e46412acfe18f711cb0b041ff37f10.tar.gz", + .hash = "12200103e7b4a0cb162f2912df4fe97914024a25b5c9fcce6ea4119744f3f2a7f24e", }, .tracy = .{ .url = "https://github.com/neurocyte/zig-tracy/archive/d2113e7d778ebe7a063e95b5182ff145343aac38.tar.gz", diff --git a/src/main.zig b/src/main.zig index bfa6756..e011c67 100644 --- a/src/main.zig +++ b/src/main.zig @@ -36,7 +36,7 @@ pub fn main() anyerror!void { if (builtin.os.tag == .linux) { // drain stdin so we don't pickup junk from previous application/shell - _ = std.os.linux.syscall3(.ioctl, @as(usize, @bitCast(@as(isize, std.os.STDIN_FILENO))), std.os.linux.T.CFLSH, 0); + _ = std.os.linux.syscall3(.ioctl, @as(usize, @bitCast(@as(isize, std.posix.STDIN_FILENO))), std.os.linux.T.CFLSH, 0); } const a = std.heap.c_allocator; @@ -56,7 +56,7 @@ pub fn main() anyerror!void { if (res.args.help != 0) return clap.help(std.io.getStdErr().writer(), clap.Help, ¶ms, .{}); - if (std.os.getenv("JITDEBUG")) |_| thespian.install_debugger(); + if (std.posix.getenv("JITDEBUG")) |_| thespian.install_debugger(); if (res.args.@"debug-wait" != 0) { std.debug.print("press return to start", .{}); @@ -196,9 +196,9 @@ extern fn ___tracy_emit_message(txt: [*]const u8, size: usize, callstack: c_int) fn exit(status: u8) noreturn { if (builtin.os.tag == .linux) { // drain stdin so we don't leave junk at the next prompt - _ = std.os.linux.syscall3(.ioctl, @as(usize, @bitCast(@as(isize, std.os.STDIN_FILENO))), std.os.linux.T.CFLSH, 0); + _ = std.os.linux.syscall3(.ioctl, @as(usize, @bitCast(@as(isize, std.posix.STDIN_FILENO))), std.os.linux.T.CFLSH, 0); } - std.os.exit(status); + std.posix.exit(status); } const config = @import("config"); @@ -261,14 +261,14 @@ pub fn get_config_dir() ![]const u8 { fn get_app_config_dir(appname: []const u8) ![]const u8 { const local = struct { - var config_dir_buffer: [std.os.PATH_MAX]u8 = undefined; + var config_dir_buffer: [std.posix.PATH_MAX]u8 = undefined; var config_dir: ?[]const u8 = null; }; const config_dir = if (local.config_dir) |dir| dir - else if (std.os.getenv("XDG_CONFIG_HOME")) |xdg| + else if (std.posix.getenv("XDG_CONFIG_HOME")) |xdg| try std.fmt.bufPrint(&local.config_dir_buffer, "{s}/{s}", .{ xdg, appname }) - else if (std.os.getenv("HOME")) |home| + else if (std.posix.getenv("HOME")) |home| try std.fmt.bufPrint(&local.config_dir_buffer, "{s}/.config/{s}", .{ home, appname }) else return error.AppConfigDirUnavailable; @@ -282,7 +282,7 @@ fn get_app_config_dir(appname: []const u8) ![]const u8 { fn get_app_config_file_name(appname: []const u8) ![]const u8 { const local = struct { - var config_file_buffer: [std.os.PATH_MAX]u8 = undefined; + var config_file_buffer: [std.posix.PATH_MAX]u8 = undefined; var config_file: ?[]const u8 = null; }; const config_file_name = "config.json"; @@ -300,7 +300,7 @@ pub fn get_config_file_name() ![]const u8 { pub fn get_restore_file_name() ![]const u8 { const local = struct { - var restore_file_buffer: [std.os.PATH_MAX]u8 = undefined; + var restore_file_buffer: [std.posix.PATH_MAX]u8 = undefined; var restore_file: ?[]const u8 = null; }; const restore_file_name = "restore"; diff --git a/src/tui/command.zig b/src/tui/command.zig index ce9d702..a24d8db 100644 --- a/src/tui/command.zig +++ b/src/tui/command.zig @@ -167,7 +167,7 @@ pub fn Collection(comptime Namespace: type) type { const Fields = @Type(.{ .Struct = .{ .is_tuple = false, - .layout = .Auto, + .layout = .auto, .decls = &.{}, .fields = &fields, }, diff --git a/src/tui/home.zig b/src/tui/home.zig index c576a3e..025251d 100644 --- a/src/tui/home.zig +++ b/src/tui/home.zig @@ -247,7 +247,7 @@ const Fire = struct { .plane = plane, .prng = std.rand.DefaultPrng.init(blk: { var seed: u64 = undefined; - try std.os.getrandom(std.mem.asBytes(&seed)); + try std.posix.getrandom(std.mem.asBytes(&seed)); break :blk seed; }), .FIRE_H = FIRE_H, diff --git a/src/tui/status/filestate.zig b/src/tui/status/filestate.zig index 7c22f74..0318ce7 100644 --- a/src/tui/status/filestate.zig +++ b/src/tui/status/filestate.zig @@ -203,7 +203,7 @@ fn show_project(self: *Self) void { fn abbrv_home(self: *Self) void { if (std.fs.path.isAbsolute(self.name)) { - if (std.os.getenv("HOME")) |homedir| { + if (std.posix.getenv("HOME")) |homedir| { const homerelpath = std.fs.path.relative(self.a, homedir, self.name) catch return; if (homerelpath.len == 0) { self.name = "~"; diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 6b22cef..dcb400e 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -189,7 +189,7 @@ fn deinit(self: *Self) void { fn listen_sigwinch(self: *Self) tp.result { if (self.sigwinch_signal) |old| old.deinit(); - self.sigwinch_signal = tp.signal.init(std.os.SIG.WINCH, tp.message.fmt(.{"sigwinch"})) catch |e| return tp.exit_error(e); + self.sigwinch_signal = tp.signal.init(std.posix.SIG.WINCH, tp.message.fmt(.{"sigwinch"})) catch |e| return tp.exit_error(e); } fn receive(self: *Self, from: tp.pid_ref, m: tp.message) tp.result { @@ -854,7 +854,7 @@ const OSC22_cursor_reply = OSC ++ "22:"; pub fn set_terminal_title(text: []const u8) void { var writer = std.io.getStdOut().writer(); - var buf: [std.os.PATH_MAX]u8 = undefined; + var buf: [std.posix.PATH_MAX]u8 = undefined; const term_cmd = std.fmt.bufPrint(&buf, OSC0_title ++ "{s}" ++ BEL, .{text}) catch return; _ = writer.write(term_cmd) catch return; }