summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2000-07-06 21:29:32 +0000
committerEric Andersen2000-07-06 21:29:32 +0000
commit02bc25be56606b3a6c66225687f848f8968a5dff (patch)
tree51ce772612a78c6698c04b57c4b292c06ff256bf
parente5cec4e3ac31ec32fd8a39287155374ea2283518 (diff)
downloadbusybox-02bc25be56606b3a6c66225687f848f8968a5dff.zip
busybox-02bc25be56606b3a6c66225687f848f8968a5dff.tar.gz
Fixed backspace and delete so they work properly again -- broken
since 0.44. -Erik
-rw-r--r--Changelog3
-rw-r--r--init.c4
-rw-r--r--init/init.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/Changelog b/Changelog
index 9813243..f9d3856 100644
--- a/Changelog
+++ b/Changelog
@@ -29,6 +29,9 @@
Matt Kraai <kraai@alumni.carnegiemellon.edu>.
* Reorganized signal names in kill.c for better architecture support
-- patch thanks to simon wood <simon@mungewell.uklinux.net>
+ * In 0.43, backspace and delete worked properly, but with 0.45,
+ it just echoed a ^? for backspace, and ^H for control-h. This
+ was due to a broken macro in init.c, that is now fixed.
-Erik Andersen
diff --git a/init.c b/init.c
index c960fe3..0f6a9bc 100644
--- a/init.c
+++ b/init.c
@@ -224,7 +224,7 @@ static void message(int device, char *fmt, ...)
}
}
-#define CTRLCHAR(ch) ((ch)&0x1f)
+#define CTRLCHAR(ch) ((ch)-0x40)
/* Set terminal settings to reasonable defaults */
void set_term(int fd)
@@ -242,7 +242,7 @@ void set_term(int fd)
tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */
tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */
tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */
-
+
/* use line dicipline 0 */
tty.c_line = 0;
diff --git a/init/init.c b/init/init.c
index c960fe3..0f6a9bc 100644
--- a/init/init.c
+++ b/init/init.c
@@ -224,7 +224,7 @@ static void message(int device, char *fmt, ...)
}
}
-#define CTRLCHAR(ch) ((ch)&0x1f)
+#define CTRLCHAR(ch) ((ch)-0x40)
/* Set terminal settings to reasonable defaults */
void set_term(int fd)
@@ -242,7 +242,7 @@ void set_term(int fd)
tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */
tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */
tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */
-
+
/* use line dicipline 0 */
tty.c_line = 0;