aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-06 03:11:25 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-06 03:11:32 -0400
commit7f571f805cb1bf7f7d20e65ac0ec9e0d70105e5a (patch)
tree18301d29de78899d980d1a7b70d53f5a5bd7aac9 /src/irc.c
parent08bba9cd8f0dfd5269287331b2baae1c388d79dd (diff)
downloadfujinet-chat-7f571f805cb1bf7f7d20e65ac0ec9e0d70105e5a.tar.gz
Rewrite poll_keyboard() in asm. 6667 bytes free.
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c29
1 files changed, 3 insertions, 26 deletions
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. */