Skip to content

Commit

Permalink
begin windows port
Browse files Browse the repository at this point in the history
  • Loading branch information
ymndoseijin committed Nov 17, 2022
1 parent 42e0607 commit 24a509c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const std = @import("std");
const unicode = @import("std").unicode;
const builtin = @import("builtin");

const defs = @import("defs.zig");

Expand All @@ -18,7 +19,10 @@ const ArgState = enum {
};

pub fn main() !void {
var arg_iterator = std.process.args();
var arg_iterator = switch (builtin.os.tag) {
.windows => try std.process.ArgIterator.initWithAllocator(allocator),
else => std.process.args(),
};

var state = ArgState.Arg;
var command: ?[]const u8 = null;
Expand Down

0 comments on commit 24a509c

Please sign in to comment.