aboutsummaryrefslogtreecommitdiff
path: root/src/edbox.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-31 07:56:00 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-31 07:56:10 -0400
commited6e3b67c2de520e159819f4ad0ba64650bd1470 (patch)
treed90229ea5ad71c84873d3b86236164df5023a682 /src/edbox.c
parented04dd7fb0c859870e708da809b002508f959b1c (diff)
downloadfujinet-chat-ed6e3b67c2de520e159819f4ad0ba64650bd1470.tar.gz
Started rewriting bits of edbox.c in asm. Now 5219 bytes free.
Diffstat (limited to 'src/edbox.c')
-rw-r--r--src/edbox.c21
1 files changed, 12 insertions, 9 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