aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-04-21 01:26:49 +0000
committerErik Andersen <andersen@codepoet.org>2000-04-21 01:26:49 +0000
commit1d1d95051a288b6bf64498aac9fb20047f384b7d (patch)
tree2c99ce8ba7d4d592806fbf81899e663bc884676b /init
parentcf8d38a3eb46f4f9c4e674d43cff486cd79c9c0f (diff)
downloadbusybox-1d1d95051a288b6bf64498aac9fb20047f384b7d.tar.gz
More Doc updates. cmdedit and more termio fixes.
Diffstat (limited to 'init')
-rw-r--r--init/init.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/init/init.c b/init/init.c
index e8a5f74d3..af10f98f0 100644
--- a/init/init.c
+++ b/init/init.c
@@ -201,6 +201,7 @@ static void message(int device, char *fmt, ...)
}
}
+#define CTRLCHAR(ch) ((ch)&0x1f)
/* Set terminal settings to reasonable defaults */
void set_term(int fd)
@@ -210,14 +211,14 @@ void set_term(int fd)
tcgetattr(fd, &tty);
/* set control chars */
- 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 */
+ 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[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */
+ tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */
+ tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */
/* use line dicipline 0 */
tty.c_line = 0;