From 81eeb80bc8befb80e16c109eee14383837e7736c Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Fri, 9 Feb 2024 21:23:37 +0000 Subject: [PATCH] further update --- client/moontalk-cli.c | 9 +++++---- client/moontalk.rb | 0 2 files changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 client/moontalk.rb diff --git a/client/moontalk-cli.c b/client/moontalk-cli.c index 15f13bd..f84698f 100644 --- a/client/moontalk-cli.c +++ b/client/moontalk-cli.c @@ -58,7 +58,9 @@ #define streq(a,b) (!strcmp(a,b)) #define strneq(a,b,c) (!memcmp(a,b,c)) -int g_y, g_x; +#define g_y COLS +#define g_x LINES + int g_sockfd = -1; void fillline(int y, int xstart, char c) { @@ -79,15 +81,14 @@ void decoration(void) { int g_hardrefresh = 0; -void init_screen(int x) { +void init_screen(int x) { (void)x; + WINDOW * header, * body, * input; signal(SIGWINCH, SIG_IGN); endwin(); struct winsize w; ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); - g_y = w.ws_row; - g_x = w.ws_col; initscr(); raw(); noecho(); diff --git a/client/moontalk.rb b/client/moontalk.rb old mode 100644 new mode 100755