diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-04-01 03:51:34 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-04-01 03:51:43 -0400 |
| commit | 546e07e530e100a739a510efc2731e32d8679ec1 (patch) | |
| tree | fd61202cbfec53d63e3c0384e8cfc5cde1665d47 /src/edbox.c | |
| parent | 6616def8739f746ac247c65723452b8cf0b6d7a8 (diff) | |
| download | fujinet-chat-546e07e530e100a739a510efc2731e32d8679ec1.tar.gz | |
Rewrite inschr() in asm. 5372 bytes free.
Diffstat (limited to 'src/edbox.c')
| -rw-r--r-- | src/edbox.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/edbox.c b/src/edbox.c index 821955d..bbad5c1 100644 --- a/src/edbox.c +++ b/src/edbox.c @@ -15,6 +15,7 @@ void storechr(char c); void copy_to_old(void); void restore_old(void); void backspace(void); +void inschr(char c); char old_edbox[EDBOX_SIZE]; char old_len; @@ -52,18 +53,6 @@ void move_right(void) { memmove(edit_box + edbox_pos + 1, edit_box + edbox_pos, EDBOX_MAXPOS - edbox_pos); } -void inschr(char c) { - if(edbox_len == EDBOX_MAXPOS) { - /* buffer full, can't insert */ - bell(); - return; - } - move_right(); - edbox_len++; - storechr(c); - edbox_pos++; -} - /* 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, |
