aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-10 19:56:47 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-10 19:56:47 +0000
commit3849f9bfcc609380c9225ee04cf84520b02e92b3 (patch)
tree5f5c3e36d508bd90a38d5cd87d0855cb5c25bdd9
parent9a8243aa1e8a8c7f34404401a1b23e6bb27a49bb (diff)
downloadbusybox-3849f9bfcc609380c9225ee04cf84520b02e92b3.tar.gz
Remove the problematic CTRLCHAR macro.
-Erik
-rw-r--r--init.c18
-rw-r--r--init/init.c18
2 files changed, 16 insertions, 20 deletions
diff --git a/init.c b/init.c
index b368c00ed..52440ef85 100644
--- a/init.c
+++ b/init.c
@@ -244,8 +244,6 @@ static void message(int device, char *fmt, ...)
}
}
-#define CTRLCHAR(ch) ((ch)-0x40)
-
/* Set terminal settings to reasonable defaults */
void set_term(int fd)
{
@@ -254,14 +252,14 @@ void set_term(int fd)
tcgetattr(fd, &tty);
/* set control chars */
- tty.c_cc[VINTR] = CTRLCHAR('C'); /* Ctrl-C */
- tty.c_cc[VQUIT] = CTRLCHAR('\\'); /* Ctrl-\ */
- tty.c_cc[VERASE] = CTRLCHAR('?'); /* Ctrl-? */
- tty.c_cc[VKILL] = CTRLCHAR('U'); /* Ctrl-U */
- tty.c_cc[VEOF] = CTRLCHAR('D'); /* Ctrl-D */
- tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */
- tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */
- tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */
+ tty.c_cc[VINTR] = 3; /* C-c */
+ tty.c_cc[VQUIT] = 28; /* C-\ */
+ tty.c_cc[VERASE] = 127; /* C-? */
+ tty.c_cc[VKILL] = 21; /* C-u */
+ tty.c_cc[VEOF] = 4; /* C-d */
+ tty.c_cc[VSTART] = 17; /* C-q */
+ tty.c_cc[VSTOP] = 19; /* C-s */
+ tty.c_cc[VSUSP] = 26; /* C-z */
/* use line dicipline 0 */
tty.c_line = 0;
diff --git a/init/init.c b/init/init.c
index b368c00ed..52440ef85 100644
--- a/init/init.c
+++ b/init/init.c
@@ -244,8 +244,6 @@ static void message(int device, char *fmt, ...)
}
}
-#define CTRLCHAR(ch) ((ch)-0x40)
-
/* Set terminal settings to reasonable defaults */
void set_term(int fd)
{
@@ -254,14 +252,14 @@ void set_term(int fd)
tcgetattr(fd, &tty);
/* set control chars */
- tty.c_cc[VINTR] = CTRLCHAR('C'); /* Ctrl-C */
- tty.c_cc[VQUIT] = CTRLCHAR('\\'); /* Ctrl-\ */
- tty.c_cc[VERASE] = CTRLCHAR('?'); /* Ctrl-? */
- tty.c_cc[VKILL] = CTRLCHAR('U'); /* Ctrl-U */
- tty.c_cc[VEOF] = CTRLCHAR('D'); /* Ctrl-D */
- tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */
- tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */
- tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */
+ tty.c_cc[VINTR] = 3; /* C-c */
+ tty.c_cc[VQUIT] = 28; /* C-\ */
+ tty.c_cc[VERASE] = 127; /* C-? */
+ tty.c_cc[VKILL] = 21; /* C-u */
+ tty.c_cc[VEOF] = 4; /* C-d */
+ tty.c_cc[VSTART] = 17; /* C-q */
+ tty.c_cc[VSTOP] = 19; /* C-s */
+ tty.c_cc[VSUSP] = 26; /* C-z */
/* use line dicipline 0 */
tty.c_line = 0;