~leon_plickat/public-inbox

zig-spoon: update to zig 0.10.0 v1 PROPOSED

Andrea Feletto: 1
 update to zig 0.10.0

 3 files changed, 7 insertions(+), 7 deletions(-)
#873594 running alpine.yml
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~leon_plickat/public-inbox/patches/36529/mbox | git am -3
Learn more about email & git

[PATCH zig-spoon] update to zig 0.10.0 Export this patch

---
 example/input-demo.zig | 6 +++---
 example/menu.zig       | 6 +++---
 lib/Term.zig           | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/example/input-demo.zig b/example/input-demo.zig
index 2f52bef..642e10c 100644
--- a/example/input-demo.zig
+++ b/example/input-demo.zig
@@ -31,7 +31,7 @@ pub fn main() !void {
    try term.init(.{});
    defer term.deinit();

    os.sigaction(os.SIG.WINCH, &os.Sigaction{
    try os.sigaction(os.SIG.WINCH, &os.Sigaction{
        .handler = .{ .handler = handleSigWinch },
        .mask = os.empty_sigset,
        .flags = 0,
@@ -203,8 +203,8 @@ fn handleSigWinch(_: c_int) callconv(.C) void {

/// Custom panic handler, so that we can try to cook the terminal on a crash,
/// as otherwise all messages will be mangled.
pub fn panic(msg: []const u8, trace: ?*std.builtin.StackTrace) noreturn {
pub fn panic(msg: []const u8, trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn {
    @setCold(true);
    term.cook() catch {};
    std.builtin.default_panic(msg, trace);
    std.builtin.default_panic(msg, trace, ret_addr);
}
diff --git a/example/menu.zig b/example/menu.zig
index a127749..29fd166 100644
--- a/example/menu.zig
+++ b/example/menu.zig
@@ -15,7 +15,7 @@ pub fn main() !void {
    try term.init(.{});
    defer term.deinit();

    os.sigaction(os.SIG.WINCH, &os.Sigaction{
    try os.sigaction(os.SIG.WINCH, &os.Sigaction{
        .handler = .{ .handler = handleSigWinch },
        .mask = os.empty_sigset,
        .flags = 0,
@@ -116,8 +116,8 @@ fn handleSigWinch(_: c_int) callconv(.C) void {

/// Custom panic handler, so that we can try to cook the terminal on a crash,
/// as otherwise all messages will be mangled.
pub fn panic(msg: []const u8, trace: ?*std.builtin.StackTrace) noreturn {
pub fn panic(msg: []const u8, trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn {
    @setCold(true);
    term.cook() catch {};
    std.builtin.default_panic(msg, trace);
    std.builtin.default_panic(msg, trace, ret_addr);
}
diff --git a/lib/Term.zig b/lib/Term.zig
index 6225987..7c46dc3 100644
--- a/lib/Term.zig
+++ b/lib/Term.zig
@@ -67,7 +67,7 @@ pub fn init(self: *Self, term_config: TermConfig) !void {
    self.* = .{
        .tty = try fs.cwd().openFile(
            term_config.tty_name,
            .{ .read = true, .write = true },
            .{ .mode = .read_write },
        ),
    };
}
-- 
2.38.1
Thanks!


Friendly greetings,
Leon Henrik Plickat