From 275d7f14633be3a7b16e839a5864f4c2e5886b05 Mon Sep 17 00:00:00 2001 From: jjanzen Date: Wed, 22 Jan 2025 11:34:53 -0600 Subject: prepare for generics --- src/frontend/ncurses.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/frontend/ncurses.zig') diff --git a/src/frontend/ncurses.zig b/src/frontend/ncurses.zig index 9b626b3..dfbf276 100644 --- a/src/frontend/ncurses.zig +++ b/src/frontend/ncurses.zig @@ -1,4 +1,5 @@ //! This module provides an implementation of IO using the ncurses library. +const io_interface = @import("io_interface.zig"); const std = @import("std"); const Action = @import("../actions.zig").Action; const ncurses = @cImport({ @@ -119,7 +120,7 @@ pub const IO = struct { /// Display a message in the message box. /// Takes a pre-formatted null-terminated string /// If the message is too wide for the box, display "Message too long" instead. - pub fn displayMessage(self: *IO, str: []const u8) !void { + pub fn displayMessage(self: *IO, str: []const u8) error{OutOfMemory}!void { if (self.msgs == null) return; for (1..MESSAGE_PANEL_WIDTH - 1) |i| { -- cgit v1.2.3