]> git.xolatile.top Git - public-moontalk.git/commitdiff
further update
authorEmil Williams <emilwilliams@tuta.io>
Fri, 9 Feb 2024 21:23:37 +0000 (21:23 +0000)
committerEmil Williams <emilwilliams@tuta.io>
Fri, 9 Feb 2024 21:23:37 +0000 (21:23 +0000)
client/moontalk-cli.c
client/moontalk.rb [changed mode: 0644->0755]

index 15f13bd73d4bca3b2da694e5bc283104fa6870ba..f84698fba0ba030c64ab7d98ab0bf12d86fe77f8 100644 (file)
@@ -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();
old mode 100644 (file)
new mode 100755 (executable)