diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-04-13 01:38:17 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-04-13 01:38:51 -0400 |
| commit | 172db1bcaa88b51326e9b788022985c97276dbfb (patch) | |
| tree | 40455c46fe46553d94be0865ab93c05b4da3fa8f /src | |
| parent | 7a0ae36af58e684b4108f817a15000d09adf1722 (diff) | |
| download | fujinet-chat-172db1bcaa88b51326e9b788022985c97276dbfb.tar.gz | |
Get rid of edbox_callback() abstraction (never used it anyway). 7696 bytes free.
Diffstat (limited to 'src')
| -rw-r--r-- | src/crt0.s | 5 | ||||
| -rw-r--r-- | src/edbox.c | 9 | ||||
| -rw-r--r-- | src/edbox.h | 5 | ||||
| -rw-r--r-- | src/main.c | 2 |
4 files changed, 7 insertions, 14 deletions
@@ -43,11 +43,12 @@ start: lda MEMTOP+1 sta sp+1 -; Set the keyboard to upper-/lower-case mode. +; Set various OS variables. ldy #$ff sty CH ; remove keypress which might be in the input buffer iny ; Set Y to 0 - sty SHFLOK + sty SHFLOK ; Turn off Caps Lock + sty SOUNDR ; Turn off SIO beep/click ; Go directly to main(). No support for CLI arguments, no saving ; any machine state for a clean exit, because we don't exit. diff --git a/src/edbox.c b/src/edbox.c index 7f232fd..eca60f8 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -25,8 +25,6 @@ char edbox_visible = 0; char edbox_pos; /* range 0 to EDBOX_SIZE - 1 */ char edbox_len; /* idem */ -void (*edbox_callback)(void); - void edbox_show(void) { u16 addr; @@ -55,8 +53,8 @@ void move_right(void) { /* note: c will never be an EOL. idea: when the edbox is completely full (240 chars), go - ahead and pretend the user pressed Return (call edbox_callback, - etc). not sure if this is more or less annoying than just + ahead and pretend the user pressed Return. + Not sure if this is more or less annoying than just refusing to accept more input until Return is pressed. */ void edbox_putc(char c) { if(!c) @@ -168,8 +166,7 @@ void edbox_keystroke(char c) { case CH_EOL: copy_to_old(); edbox_hide(); - if(edbox_callback) - (*edbox_callback)(); + cmd_execute(); edbox_clear(); break; case XCH_TAB: diff --git a/src/edbox.h b/src/edbox.h index e4069a0..99e64da 100644 --- a/src/edbox.h +++ b/src/edbox.h @@ -24,12 +24,9 @@ void edbox_hide(void); void edbox_putc(char c); /* pass a keystroke, insert its character into the edit box. if Return - is pressed, edbox_callback gets called (if it's set!) */ + is pressed, cmd_execute() gets called. */ void edbox_keystroke(char c); -/* called when the user presses Return */ -extern void (*edbox_callback)(void); - /* set edit box contents (clears out whatever was there) */ void __fastcall__ edbox_set(char *contents); @@ -132,14 +132,12 @@ void reconnect(void) { void main(void) { bell_type = config.alert_type; /* TODO: have bell.s read staight from the struct */ - OS.soundr = 0; // Turn off SIO beeping sound edbox_clear(); scr_init(); init_channels(); while(1) { - edbox_callback = cmd_execute; if(fn_connect()) { ind_net_idle(); irc_register(); |
