From b74d292847b22cf282ff8ae7d1b51df34176ce4d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 25 Mar 2026 03:08:11 -0400 Subject: Banish cgetc(), and all its annoyances. Much more flexible and precise keyboard control, see keytab.[ch] and kgetc.[ch] --- src/main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index b5de37b..5535343 100644 --- a/src/main.c +++ b/src/main.c @@ -11,13 +11,12 @@ #include #include #include -#include // for cgetc() only #include "nio.h" #include "irc.h" #include "screen.h" #include "edbox.h" #include "config.h" -#include "keyclick.h" +#include "kgetc.h" #include "indic8.h" unsigned char err; // error code of last operation. @@ -156,13 +155,10 @@ void reconnect(void) { } scr_print_current(" to reconnect.\n"); - while(OS.cdtmf3 == 0xff && OS.ch == 0xff) + while(OS.cdtmf3 == 0xff && !keypress()) /* NOP */; - if(OS.ch != 0xff) { - keyclick(); - OS.ch = 0xff; - } + if(keypress()) kgetc(); } void main(void) { -- cgit v1.2.3