diff options
| -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); |
