diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-31 07:56:00 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-31 07:56:10 -0400 |
| commit | ed6e3b67c2de520e159819f4ad0ba64650bd1470 (patch) | |
| tree | d90229ea5ad71c84873d3b86236164df5023a682 /src | |
| parent | ed04dd7fb0c859870e708da809b002508f959b1c (diff) | |
| download | fujinet-chat-ed6e3b67c2de520e159819f4ad0ba64650bd1470.tar.gz | |
Started rewriting bits of edbox.c in asm. Now 5219 bytes free.
Diffstat (limited to 'src')
| -rw-r--r-- | src/edbox.c | 21 | ||||
| -rw-r--r-- | src/edbox.h | 8 |
2 files changed, 16 insertions, 13 deletions
diff --git a/src/edbox.c b/src/edbox.c index ff61359..126762a 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -13,25 +13,19 @@ static char old_len; static char typeover; char edbox_visible = 0; -static char edbox_pos; /* range 0 to EDBOX_SIZE - 1 */ +char edbox_pos; /* range 0 to EDBOX_SIZE - 1 */ char edbox_len; /* idem */ void (*edbox_callback)(void); -static void hide_cursor(void) { +void hide_cursor(void) { edit_box[edbox_pos] &= 0x7f; } -static void show_cursor(void) { +void show_cursor(void) { edit_box[edbox_pos] |= 0x80; } -void edbox_clear(void) { - bzero(edit_box, EDBOX_SIZE + 1); - edbox_pos = edbox_len = 0; - show_cursor(); // not needed? seems it is.. -} - void edbox_show(void) { u16 addr; @@ -291,6 +285,14 @@ void edbox_keystroke(char c) { if(edbox_visible) edbox_show(); } +/* see edboxutl.s for the asm rewrites of these */ +#if 0 +void edbox_clear(void) { + bzero(edit_box, EDBOX_SIZE + 1); + edbox_pos = edbox_len = 0; + show_cursor(); // not needed? seems it is.. +} + void edbox_addchr(char c) { edit_box[edbox_len++] = c; edbox_pos = edbox_len; @@ -307,3 +309,4 @@ void edbox_set(char *contents) { } edbox_pos = edbox_len; } +#endif diff --git a/src/edbox.h b/src/edbox.h index ae0acfd..67fd3fa 100644 --- a/src/edbox.h +++ b/src/edbox.h @@ -11,7 +11,7 @@ extern char edbox_visible; extern char edbox_len; /* clear the contents of the edit box (whether it's visible or not) */ -void edbox_clear(void); +void __fastcall__ edbox_clear(void); /* make the edit box visible */ void edbox_show(void); @@ -30,10 +30,10 @@ void edbox_keystroke(char c); extern void (*edbox_callback)(void); /* set edit box contents (clears out whatever was there) */ -void edbox_set(char *contents); +void __fastcall__ edbox_set(char *contents); /* append a space to the edit box */ -void edbox_addchr(char c); +void __fastcall__ edbox_addchr(char c); /* append a space to the edit box */ -void edbox_space(void); +void __fastcall__ edbox_space(void); |
