From 87add0ac89c23bcb0e73ce25eaacdf5512f66b09 Mon Sep 17 00:00:00 2001 From: andersen Date: Thu, 6 Jul 2000 21:29:32 +0000 Subject: 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 --- Changelog | 3 +++ init.c | 4 ++-- init/init.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 981324308..f9d385622 100644 --- a/Changelog +++ b/Changelog @@ -29,6 +29,9 @@ Matt Kraai . * Reorganized signal names in kill.c for better architecture support -- patch thanks to simon wood + * 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 c960fe333..0f6a9bc9b 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 c960fe333..0f6a9bc9b 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; -- cgit v1.2.3-55-g6feb