From f5c48e98b80ad6517c756e8fd15c976d4a2d1894 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 09:55:21 -0300 Subject: Inline the one-line helpers in src/ninep at their call sites reads, paneFileNamed, topFileNamed, serialNamed, attrReply, makePane, events.pending, mtimeOf, versionOf, dirOf, cellOf, shiftBy, flagOf, stageIndexLine, ctlLen, listenersLen, activeSerial, fontName and Serials.has each wrapped a line or two used once or twice; the logic now reads where it is used. Helpers that do several things or are shared widely (bodyOf, fileOf, dirtyOf, nameOf, kindOf, clip, readRange, readFlag, pty's answer and waitingRun, nextSerialAfter) stay. Co-Authored-By: Claude Opus 5.5 --- src/ninep/pty.zig | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/ninep/pty.zig') diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig index 49f52c82..eda6e9d0 100644 --- a/src/ninep/pty.zig +++ b/src/ninep/pty.zig @@ -84,11 +84,6 @@ pub fn readCtl(p: *Pardes, req: Req, pane: *Pane) Reply { return tree.stagedReply(p, req); } -pub fn ctlLen(pane: *const Pane) u64 { - var buf: [32]u8 = undefined; - return (std.fmt.bufPrint(&buf, "winsize {d} {d}\n", .{ pane.cols, pane.rows }) catch unreachable).len; -} - /// Three right-aligned fields: cols, rows and whether the host holds the tty. pub const status_len: u64 = 36; -- cgit v1.3