build: update to zig 0.14.0-dev.3039

This commit is contained in:
CJ van den Berg 2025-02-04 22:59:18 +01:00
parent 1764b3259c
commit 53045123c6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
41 changed files with 648 additions and 623 deletions

View file

@ -37,7 +37,7 @@ pub const option = enum {
};
pub fn init(nopts: *const Options, parent_: Plane) !Plane {
const opts = .{
const opts: vaxis.Window.ChildOptions = .{
.x_off = @as(i17, @intCast(nopts.x)),
.y_off = @as(i17, @intCast(nopts.y)),
.width = @as(u16, @intCast(nopts.cols)),

View file

@ -8,7 +8,7 @@ pub const key = vaxis.Key;
pub const Key = u21;
pub const Mouse = vaxis.Mouse.Button;
pub const MouseType = @typeInfo(Mouse).Enum.tag_type;
pub const MouseType = @typeInfo(Mouse).@"enum".tag_type;
pub const mouse = struct {
pub const MOTION: Mouse = vaxis.Mouse.Button.none;

View file

@ -12,6 +12,7 @@ pub const Cell = @import("Cell.zig");
pub const CursorShape = vaxis.Cell.CursorShape;
pub const style = @import("style.zig").StyleBits;
pub const styles = @import("style.zig");
const Self = @This();
pub const log_name = "vaxis";
@ -80,13 +81,14 @@ var panic_cleanup: ?struct {
vx: *vaxis.Vaxis,
} = null;
pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn {
_ = error_return_trace; // TODO: what to do with this in zig-0.14?
const cleanup = panic_cleanup;
panic_cleanup = null;
if (cleanup) |self| {
self.vx.deinit(self.allocator, self.tty.anyWriter());
self.tty.deinit();
}
return std.builtin.default_panic(msg, error_return_trace, ret_addr);
return std.debug.defaultPanic(msg, ret_addr);
}
pub fn run(self: *Self) !void {

View file

@ -4,11 +4,11 @@ pub const StyleBits = packed struct(u5) {
undercurl: bool = false,
underline: bool = false,
italic: bool = false,
pub const struck: StyleBits = .{ .struck = true };
pub const bold: StyleBits = .{ .bold = true };
pub const undercurl: StyleBits = .{ .undercurl = true };
pub const underline: StyleBits = .{ .underline = true };
pub const italic: StyleBits = .{ .italic = true };
pub const normal: StyleBits = .{};
};
pub const struck: StyleBits = .{ .struck = true };
pub const bold: StyleBits = .{ .bold = true };
pub const undercurl: StyleBits = .{ .undercurl = true };
pub const underline: StyleBits = .{ .underline = true };
pub const italic: StyleBits = .{ .italic = true };
pub const normal: StyleBits = .{};