diff options
author | Julien Dessaux | 2024-11-22 09:27:23 +0100 |
---|---|---|
committer | Julien Dessaux | 2024-11-22 09:28:09 +0100 |
commit | 06468c1272035fcacf6d46a80b5738b55cffae38 (patch) | |
tree | 55ae36dc5c9d25cbf73da49c6bd6c887fe79605f /src/main.zig | |
parent | Removed useless testing boilerplate (diff) | |
download | zigfunge98-06468c1272035fcacf6d46a80b5738b55cffae38.tar.gz zigfunge98-06468c1272035fcacf6d46a80b5738b55cffae38.tar.bz2 zigfunge98-06468c1272035fcacf6d46a80b5738b55cffae38.zip |
Diffstat (limited to 'src/main.zig')
-rw-r--r-- | src/main.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig index 381a6cb..5872724 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5,11 +5,11 @@ const io = @import("io.zig"); pub fn main() anyerror!void { var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; const gpa = general_purpose_allocator.allocator(); - var args = try std.process.argsAlloc(gpa); + const args = try std.process.argsAlloc(gpa); defer std.process.argsFree(gpa, args); if (args.len < 2) { std.debug.print("Usage: {s} <b98_file_to_run>\n", .{args[0]}); - std.os.exit(1); + std.posix.exit(1); } var file = try std.fs.cwd().openFile(args[1], .{}); @@ -20,7 +20,7 @@ pub fn main() anyerror!void { defer i.deinit(); var ioContext = io.context(std.io.getStdIn().reader(), std.io.getStdOut().writer()); - std.os.exit(@intCast(try i.run(&ioContext))); + std.posix.exit(@intCast(try i.run(&ioContext))); } const testTimestamp: i64 = 1660681247; |