Reduce libc usage & move more stuff to interop

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2025-08-28 01:39:19 +02:00
parent 336847d418
commit 7cfb947187
10 changed files with 256 additions and 165 deletions

View File

@@ -1,5 +1,4 @@
const std = @import("std");
const builtin = @import("builtin");
const interop = @import("../interop.zig");
const Cell = @import("Cell.zig");
@@ -82,7 +81,7 @@ pub fn init(options: InitOptions, labels_max_length: usize, random: Random) Term
.fg = options.fg,
.bg = options.bg,
.border_fg = options.border_fg,
.box_chars = if (builtin.os.tag == .linux or builtin.os.tag.isBSD()) .{
.box_chars = if (interop.supportsUnicode()) .{
.left_up = 0x250C,
.left_down = 0x2514,
.right_up = 0x2510,

View File

@@ -23,7 +23,6 @@ pub fn init(allocator: Allocator, buffer: *TerminalBuffer) Session {
pub fn deinit(self: *Session) void {
for (self.label.list.items) |*environment| {
if (environment.entry_ini) |*entry_ini| entry_ini.deinit();
if (environment.xdg_session_desktop) |session_desktop| self.label.allocator.free(session_desktop);
}
self.label.deinit();