srctree

Gregory Mullen parent ca4915bc 2e141f76
stage one of removing hsh from draw.zig

src/draw.zig added: 9, removed: 9, total 0
@@ -88,16 +88,16 @@ const Direction = enum {
 
pub const Drawable = @This();
 
pub fn init(hsh: *HSH) Error!Drawable {
pub fn init(a: Allocator, hsh: *HSH) Error!Drawable {
colorize = hsh.enabled(Features.Colorize);
return .{
.alloc = hsh.alloc,
.alloc = a,
.tty = &hsh.tty,
.hsh = hsh,
.before = DrawBuf.init(hsh.alloc),
.b = DrawBuf.init(hsh.alloc),
.right = DrawBuf.init(hsh.alloc),
.after = DrawBuf.init(hsh.alloc),
.before = DrawBuf.init(a),
.b = DrawBuf.init(a),
.right = DrawBuf.init(a),
.after = DrawBuf.init(a),
};
}
 
 
src/main.zig added: 9, removed: 9, total 0
@@ -135,7 +135,7 @@ pub fn main() !void {
// Look at me, I'm the captain now!
hsh.tty.pwnTTY();
 
hsh.draw = Drawable.init(&hsh) catch unreachable;
hsh.draw = Drawable.init(a, &hsh) catch unreachable;
defer hsh.draw.raze();
hsh.draw.term_size = hsh.tty.geom() catch unreachable;