From 7f571f805cb1bf7f7d20e65ac0ec9e0d70105e5a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 6 Apr 2026 03:11:25 -0400 Subject: Rewrite poll_keyboard() in asm. 6667 bytes free. --- src/irc.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'src/irc.c') diff --git a/src/irc.c b/src/irc.c index e581e94..b12c8da 100644 --- a/src/irc.c +++ b/src/irc.c @@ -48,6 +48,9 @@ char last_chan[33]; /* without a screen */ static int minutes, last_read_min; +/* see pollkbd.s */ +extern void poll_keyboard(void); + /* static void join_channel(void) { txbuf_set_str2("JOIN ", channel); @@ -1003,32 +1006,6 @@ void start_keystroke(char c) { } } -static void poll_keyboard(void) { - char c; - - if(!keypress()) return; - - /* have to latch start status because doing a keyclick clears CONSOL */ - if(GTIA_READ.consol == 6) start_latch = 1; - - c = kgetc(); - if(!c) return; - - /* maybe this shouldn't happen until user presses Enter in the edbox? - would let lurkers lurk and read scrollback... */ - if(irc_away) { - txbuf_send_str("AWAY"); - irc_away = 0; - } - - if(start_latch) { /* start pressed */ - start_keystroke(c); - } else { - edbox_keystroke(c); - OS.cdtmv3 = hz / 2; - } -} - /* only exits on error (e.g. connection closed, which might be via /QUIT). */ void irc_loop(void) { /* this stuff happens on every connect. */ -- cgit v1.2.3