aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-20 19:40:09 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-20 19:40:09 +0200
commit4fe82b42b6f6fb1a69da2fb2823831e6b3eaa036 (patch)
treef96543bf338941c20aaa761428a231db6fcd36b8 /client.c
parentff0aae89238f4d60267def24476e8b9f4cb596cf (diff)
Added mvp implementations of the server and client for testing
Diffstat (limited to 'client.c')
-rw-r--r--client.c6
1 files changed, 3 insertions, 3 deletions
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 <arpa/inet.h>
#include <errno.h>
@@ -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++;