aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-25 03:08:11 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-25 03:08:11 -0400
commitb74d292847b22cf282ff8ae7d1b51df34176ce4d (patch)
tree4717814a5390d1672840c2c417ebb4d9606480d8 /src/main.c
parent8f19c016edd9f258c1b39eb44647c685b245f2fc (diff)
downloadfujinet-chat-b74d292847b22cf282ff8ae7d1b51df34176ce4d.tar.gz
Banish cgetc(), and all its annoyances. Much more flexible and precise keyboard control, see keytab.[ch] and kgetc.[ch]
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 3 insertions, 7 deletions
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 <stdio.h>
#include <string.h>
#include <ctype.h>
-#include <conio.h> // 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) {