diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-06 21:29:32 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-06 21:29:32 +0000 |
commit | 87add0ac89c23bcb0e73ce25eaacdf5512f66b09 (patch) | |
tree | 51ce772612a78c6698c04b57c4b292c06ff256bf | |
parent | f511175be67ed7ddb06c79691f4b5154c5ed2744 (diff) | |
download | busybox-w32-87add0ac89c23bcb0e73ce25eaacdf5512f66b09.tar.gz busybox-w32-87add0ac89c23bcb0e73ce25eaacdf5512f66b09.tar.bz2 busybox-w32-87add0ac89c23bcb0e73ce25eaacdf5512f66b09.zip |
Fixed backspace and delete so they work properly again -- broken
since 0.44.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@759 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | init.c | 4 | ||||
-rw-r--r-- | init/init.c | 4 |
3 files changed, 7 insertions, 4 deletions
@@ -29,6 +29,9 @@ | |||
29 | Matt Kraai <kraai@alumni.carnegiemellon.edu>. | 29 | Matt Kraai <kraai@alumni.carnegiemellon.edu>. |
30 | * Reorganized signal names in kill.c for better architecture support | 30 | * Reorganized signal names in kill.c for better architecture support |
31 | -- patch thanks to simon wood <simon@mungewell.uklinux.net> | 31 | -- patch thanks to simon wood <simon@mungewell.uklinux.net> |
32 | * In 0.43, backspace and delete worked properly, but with 0.45, | ||
33 | it just echoed a ^? for backspace, and ^H for control-h. This | ||
34 | was due to a broken macro in init.c, that is now fixed. | ||
32 | 35 | ||
33 | 36 | ||
34 | -Erik Andersen | 37 | -Erik Andersen |
@@ -224,7 +224,7 @@ static void message(int device, char *fmt, ...) | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
227 | #define CTRLCHAR(ch) ((ch)&0x1f) | 227 | #define CTRLCHAR(ch) ((ch)-0x40) |
228 | 228 | ||
229 | /* Set terminal settings to reasonable defaults */ | 229 | /* Set terminal settings to reasonable defaults */ |
230 | void set_term(int fd) | 230 | void set_term(int fd) |
@@ -242,7 +242,7 @@ void set_term(int fd) | |||
242 | tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ | 242 | tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ |
243 | tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ | 243 | tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ |
244 | tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ | 244 | tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ |
245 | 245 | ||
246 | /* use line dicipline 0 */ | 246 | /* use line dicipline 0 */ |
247 | tty.c_line = 0; | 247 | tty.c_line = 0; |
248 | 248 | ||
diff --git a/init/init.c b/init/init.c index c960fe333..0f6a9bc9b 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -224,7 +224,7 @@ static void message(int device, char *fmt, ...) | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
227 | #define CTRLCHAR(ch) ((ch)&0x1f) | 227 | #define CTRLCHAR(ch) ((ch)-0x40) |
228 | 228 | ||
229 | /* Set terminal settings to reasonable defaults */ | 229 | /* Set terminal settings to reasonable defaults */ |
230 | void set_term(int fd) | 230 | void set_term(int fd) |
@@ -242,7 +242,7 @@ void set_term(int fd) | |||
242 | tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ | 242 | tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ |
243 | tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ | 243 | tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ |
244 | tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ | 244 | tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ |
245 | 245 | ||
246 | /* use line dicipline 0 */ | 246 | /* use line dicipline 0 */ |
247 | tty.c_line = 0; | 247 | tty.c_line = 0; |
248 | 248 | ||