diff --git a/src/util/funcs.zig b/src/util/funcs.zig index 4c69db0a9b15911a0ebbd8591d61090451500ea6..6f8d5891b6504ca18759df73a802f3cc83274f73 100644 --- a/src/util/funcs.zig +++ b/src/util/funcs.zig @@ -6,6 +6,10 @@ const u = @import("index.zig"); // // +pub const b = 1; +pub const kb = b * 1024; +pub const mb = kb * 1024; + pub fn print(comptime fmt: []const u8, args: anytype) void { std.debug.print(fmt++"\n", args); } diff --git a/src/util/module.zig b/src/util/module.zig index 4ada8eb30780538c4c37f5f871c89c63b6442f4f..dbc8ca1518f498687103799881cbb1b41f5f3072 100644 --- a/src/util/module.zig +++ b/src/util/module.zig @@ -7,10 +7,6 @@ const u = @import("index.zig"); // // -const b = 1; -const kb = b * 1024; -const mb = kb * 1024; - pub const Module = struct { is_sys_lib: bool, name: []const u8, @@ -66,7 +62,7 @@ pub const Module = struct { const abs_path = try u.concat(&[_][]const u8{cdpath, "/", self.clean_path, "/", item}); const file = try std.fs.openFileAbsolute(abs_path, .{}); defer file.close(); - const input = try file.reader().readAllAlloc(gpa, mb); + const input = try file.reader().readAllAlloc(gpa, u.mb); h.update(input); } var out: [32]u8 = undefined;