From 4fe82b42b6f6fb1a69da2fb2823831e6b3eaa036 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 20 Oct 2024 19:40:09 +0200 Subject: Added mvp implementations of the server and client for testing --- client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 9a22d90..b9d96d3 100644 --- a/client.c +++ b/client.c @@ -10,7 +10,6 @@ #include "termbox2.h" // clang-format on #include "common.h" -#include "config.h" #include #include @@ -58,6 +57,7 @@ void cleanup() writef("Error while closing server socket. errno: %d\n", errno); } +// panic void err_exit(const char *msg) { cleanup(); @@ -227,8 +227,8 @@ int main(void) } // append pressed character to input.text - // TODO: wrap instead - if (ev.ch > 0 && input.len < MSG_MAX && input.len < global.width - 3 - 1) { + // TODO: wrap instead, allocate more ram for the message instead + if (ev.ch > 0 && input.len < MESSAGE_MAX && input.len < global.width - 3 - 1) { tb_printf(global.cursor_x, global.cursor_y, 0, 0, "%c", ev.ch); global.cursor_x++; -- cgit v1.2.3