aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-01 03:25:36 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-01 03:25:51 -0400
commit6616def8739f746ac247c65723452b8cf0b6d7a8 (patch)
treef77b6b9b4ff39492a1726aea231889adaa7a80b4
parent007f596e3d75131086d0c165fc8848ad630aa82b (diff)
downloadfujinet-chat-6616def8739f746ac247c65723452b8cf0b6d7a8.tar.gz
Rewrite backspace() in asm. 5363 bytes free.
-rw-r--r--doc/ideas.txt4
-rw-r--r--src/edbox.c12
2 files changed, 6 insertions, 10 deletions
diff --git a/doc/ideas.txt b/doc/ideas.txt
index b9c9627..15d44dc 100644
--- a/doc/ideas.txt
+++ b/doc/ideas.txt
@@ -2,6 +2,10 @@ These are not really TODOs, they're "might do" or "hope to do".
Features that should be implemented:
+- /r to reply to the last person/channel who msg'd you, /a to msg the
+ last person/channel you msg'ed (server and private screens). Idea
+ comes from phigan (thanks!)
+
- Support for (some of) the extra RAM in 64K machines. Can get an
extra 4K because we don't need the international font or the
floating point routines, and we can plop our custom font directly
diff --git a/src/edbox.c b/src/edbox.c
index 39b142b..821955d 100644
--- a/src/edbox.c
+++ b/src/edbox.c
@@ -14,6 +14,7 @@ void show_cursor(void);
void storechr(char c);
void copy_to_old(void);
void restore_old(void);
+void backspace(void);
char old_edbox[EDBOX_SIZE];
char old_len;
@@ -87,7 +88,7 @@ void edbox_putc(char c) {
}
-static void del_char(void) {
+void del_char(void) {
if(!edbox_len) return;
memmove(edit_box + edbox_pos, edit_box + edbox_pos + 1, EDBOX_MAXPOS - edbox_pos);
edbox_len--;
@@ -98,15 +99,6 @@ static void del_to_end(void) {
del_char();
}
-static void backspace(void) {
- if(!edbox_pos) return;
- edbox_pos--;
- if(typeover)
- edit_box[edbox_pos] = ' ';
- else
- del_char();
-}
-
static void up(void) {
if(!edbox_len) {
restore_old();