| author | |
| committer | |
| log | e9232e16f02033a172fea77909657fb75e7be00d |
| tree | 29a53b899dca4d8ffd17add224980c3ee1278b4f |
| parent | 8fa1d3cfbd3434477eff1ee5cfd9fc0612bf1dc4 |
5 files changed, 15 insertions(+), 10 deletions(-)
scripts/_common.zig+3-3| ... | ... | @@ -12,7 +12,7 @@ pub fn Main(comptime T: type) type { |
| 12 | 12 | return struct { |
| 13 | 13 | pub fn do() !void { |
| 14 | 14 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; |
| 15 | const alloc = &gpa.allocator; | |
| 15 | const alloc = gpa.allocator(); | |
| 16 | 16 | defer _ = gpa.deinit(); |
| 17 | 17 | |
| 18 | 18 | const max_size = std.math.maxInt(usize); |
| ... | ... | @@ -41,7 +41,7 @@ pub fn Main(comptime T: type) type { |
| 41 | 41 | var line_num: usize = 1; |
| 42 | 42 | std.debug.print("\n", .{}); |
| 43 | 43 | |
| 44 | const arena = &std.heap.ArenaAllocator.init(alloc); | |
| 44 | var arena = std.heap.ArenaAllocator.init(alloc); | |
| 45 | 45 | defer arena.deinit(); |
| 46 | 46 | while (true) { |
| 47 | 47 | const line = r.readUntilDelimiterAlloc(alloc, '\n', max_size) catch |e| if (e == error.EndOfStream) break else return e; |
| ... | ... | @@ -54,7 +54,7 @@ pub fn Main(comptime T: type) type { |
| 54 | 54 | continue; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | if (!(try T.exec(&arena.allocator, line, w))) { | |
| 57 | if (!(try T.exec(arena.allocator(), line, w))) { | |
| 58 | 58 | break; |
| 59 | 59 | } |
| 60 | 60 |
scripts/arabic_shaping.zig+2-2| ... | ... | @@ -139,8 +139,8 @@ pub const default = common.Main(struct { |
| 139 | 139 | \\ |
| 140 | 140 | ; |
| 141 | 141 | |
| 142 | pub fn exec(alloc: *std.mem.Allocator, line: []const u8, writer: anytype) !bool { | |
| 143 | var it = std.mem.split(line, ";"); | |
| 142 | pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool { | |
| 143 | var it = std.mem.split(u8, line, ";"); | |
| 144 | 144 | const c = std.mem.trim(u8, it.next().?, " "); |
| 145 | 145 | const n = std.mem.trim(u8, it.next().?, " "); |
| 146 | 146 | const t = std.mem.trim(u8, it.next().?, " "); |
scripts/bidi_brackets.zig+4-2| ... | ... | @@ -28,8 +28,10 @@ pub const default = common.Main(struct { |
| 28 | 28 | \\ |
| 29 | 29 | ; |
| 30 | 30 | |
| 31 | pub fn exec(alloc: *std.mem.Allocator, line: []const u8, writer: anytype) !bool { | |
| 32 | var it = std.mem.split(line, ";"); | |
| 31 | pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool { | |
| 32 | _ = alloc; | |
| 33 | ||
| 34 | var it = std.mem.split(u8, line, ";"); | |
| 33 | 35 | const a = std.mem.trim(u8, it.next().?, " "); |
| 34 | 36 | const b = std.mem.trim(u8, it.next().?, " "); |
| 35 | 37 | const c = std.mem.trim(u8, it.next().?, " "); |
scripts/blocks.zig+5-3| ... | ... | @@ -22,9 +22,11 @@ pub const default = common.Main(struct { |
| 22 | 22 | \\ |
| 23 | 23 | ; |
| 24 | 24 | |
| 25 | pub fn exec(alloc: *std.mem.Allocator, line: []const u8, writer: anytype) !bool { | |
| 26 | var it1 = std.mem.split(line, "; "); | |
| 27 | var it2 = std.mem.split(it1.next().?, ".."); | |
| 25 | pub fn exec(alloc: std.mem.Allocator, line: []const u8, writer: anytype) !bool { | |
| 26 | _ = alloc; | |
| 27 | ||
| 28 | var it1 = std.mem.split(u8, line, "; "); | |
| 29 | var it2 = std.mem.split(u8, it1.next().?, ".."); | |
| 28 | 30 | const from = it2.next().?; |
| 29 | 31 | const to = it2.next().?; |
| 30 | 32 | const name = it1.next().?; |
zig.mod+1| ... | ... | @@ -4,6 +4,7 @@ main: src/lib.zig |
| 4 | 4 | license: MIT |
| 5 | 5 | description: Zig bindings for the Unicode Character Database |
| 6 | 6 | root_dependencies: |
| 7 | - src: git https://github.com/nektro/iguanaTLS | |
| 7 | 8 | - src: git https://github.com/truemedian/zfetch |
| 8 | 9 | - src: git https://github.com/nektro/zig-ansi |
| 9 | 10 | - src: git https://github.com/nektro/zig-fmt-valueliteral |