summaryrefslogtreecommitdiff
path: root/src/ninep/cols.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 14:35:15 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commitbc3d18d27f9fc1155db7fac3946c4d38774f9e65 (patch)
tree9178ce95952797f8a78b16c2b805e53368efb35a /src/ninep/cols.zig
parent1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2 (diff)
downloadpardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.tar.gz
pardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.zip
Build with Zig 0.17
ghostty, libvaxis and uucode move to ghostty's 0.17 pins, cloud9 to its 0.17 main, SDL to castholm's release-3.4.x (3.4.18), zstbi and tree-sitter to forks with 0.17 build files (see build.zig.zon). A bare zig build copies the binaries into ~/.local/bin (-Dhome-install=false leaves it out): 0.17 keeps the prefix from build scripts. A terminal's edited copy goes when the program clears the screen. tinywin.snap is gone; perf baselines are re-recorded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/cols.zig')
-rw-r--r--src/ninep/cols.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig
index e3b456ba..59f6ae42 100644
--- a/src/ninep/cols.zig
+++ b/src/ninep/cols.zig
@@ -288,18 +288,18 @@ test "exactly 4096 bytes written with echo's newline after a truncation fit ever
const p = try th.withFile(testing.allocator, "x\n");
defer p.deinit();
const serial = th.serialOf(p);
- const text = "w" ** 4096 ++ "\n";
+ const text = &@as([4096]u8, @splat('w')) ++ "\n";
for ([_]u64{ tree.Node.of(serial, .tag), tree.Node.ofCol(layout.columnSerial(p, 0), .tag), @intFromEnum(tree.TopFile.tag) }) |node| {
_ = th.call(p, .{ .tag = 1, .op = .setattr, .node = node, .truncate = true });
const h = th.call(p, .{ .tag = 2, .op = .open, .node = node, .omode = 1 }).reply.handle;
const r = th.call(p, .{ .tag = 3, .op = .write, .node = node, .handle = h, .data = text });
try testing.expectEqual(tree.Status.ok, r.reply.status);
_ = th.call(p, .{ .tag = 4, .op = .release, .node = node, .handle = h, .opened = true });
- try testing.expect(std.mem.endsWith(u8, th.rd(p, node, 0, 1 << 16).bytes, "w" ** 4096));
+ try testing.expect(std.mem.endsWith(u8, th.rd(p, node, 0, 1 << 16).bytes, &@as([4096]u8, @splat('w'))));
// One more byte is over.
_ = th.call(p, .{ .tag = 5, .op = .setattr, .node = node, .truncate = true });
const h2 = th.call(p, .{ .tag = 6, .op = .open, .node = node, .omode = 1 }).reply.handle;
- try testing.expectEqual(E.NOSPC, th.call(p, .{ .tag = 7, .op = .write, .node = node, .handle = h2, .data = "w" ** 4097 ++ "\n" }).errno());
+ try testing.expectEqual(E.NOSPC, th.call(p, .{ .tag = 7, .op = .write, .node = node, .handle = h2, .data = &@as([4097]u8, @splat('w')) ++ "\n" }).errno());
_ = th.call(p, .{ .tag = 8, .op = .release, .node = node, .handle = h2, .opened = true });
}
}
@@ -316,7 +316,7 @@ test "a Newcol refused because the tags would not fit logs its err alone and spe
for (p.col_panes[col][0..p.col_n[col]]) |k| {
const each = p.panes[k].?;
if (each.tag.own) |old| p.gpa.free(old);
- each.tag.own = try p.gpa.dupe(u8, "word " ** 60);
+ each.tag.own = try p.gpa.dupe(u8, std.mem.asBytes(&@as([60][5]u8, @splat("word ".*))));
}
try testing.expect(p.col_n[col] >= 2);
p.sync();
@@ -588,7 +588,7 @@ test "a refused write after a truncation leaves every kind of tag as it was, and
defer p.deinit();
const serial = th.serialOf(p);
const col = layout.columnSerial(p, 0);
- const big = "w" ** (limits.max_tag_tail + 1);
+ const big = &@as([limits.max_tag_tail + 1]u8, @splat('w'));
// Each tag: a truncating open, then a write too long: nothing changes.
for ([_]u64{ Node.of(serial, .tag), Node.ofCol(col, .tag), @intFromEnum(tree.TopFile.tag) }) |node| {
_ = th.wr(p, node, " Mine");