diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-21 01:26:49 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-21 01:26:49 +0000 |
commit | 1d1d95051a288b6bf64498aac9fb20047f384b7d (patch) | |
tree | 2c99ce8ba7d4d592806fbf81899e663bc884676b /init | |
parent | cf8d38a3eb46f4f9c4e674d43cff486cd79c9c0f (diff) | |
download | busybox-w32-1d1d95051a288b6bf64498aac9fb20047f384b7d.tar.gz busybox-w32-1d1d95051a288b6bf64498aac9fb20047f384b7d.tar.bz2 busybox-w32-1d1d95051a288b6bf64498aac9fb20047f384b7d.zip |
More Doc updates. cmdedit and more termio fixes.
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 17 |
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, ...) | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | #define CTRLCHAR(ch) ((ch)&0x1f) | ||
204 | 205 | ||
205 | /* Set terminal settings to reasonable defaults */ | 206 | /* Set terminal settings to reasonable defaults */ |
206 | void set_term(int fd) | 207 | void set_term(int fd) |
@@ -210,14 +211,14 @@ void set_term(int fd) | |||
210 | tcgetattr(fd, &tty); | 211 | tcgetattr(fd, &tty); |
211 | 212 | ||
212 | /* set control chars */ | 213 | /* set control chars */ |
213 | tty.c_cc[VINTR] = 3; /* C-c */ | 214 | tty.c_cc[VINTR] = CTRLCHAR('C'); /* Ctrl-C */ |
214 | tty.c_cc[VQUIT] = 28; /* C-\ */ | 215 | tty.c_cc[VQUIT] = CTRLCHAR('\\'); /* Ctrl-\ */ |
215 | tty.c_cc[VERASE] = 127; /* C-? */ | 216 | tty.c_cc[VERASE] = CTRLCHAR('?'); /* Ctrl-? */ |
216 | tty.c_cc[VKILL] = 21; /* C-u */ | 217 | tty.c_cc[VKILL] = CTRLCHAR('U'); /* Ctrl-U */ |
217 | tty.c_cc[VEOF] = 4; /* C-d */ | 218 | tty.c_cc[VEOF] = CTRLCHAR('D'); /* Ctrl-D */ |
218 | tty.c_cc[VSTART] = 17; /* C-q */ | 219 | tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ |
219 | tty.c_cc[VSTOP] = 19; /* C-s */ | 220 | tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ |
220 | tty.c_cc[VSUSP] = 26; /* C-z */ | 221 | tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ |
221 | 222 | ||
222 | /* use line dicipline 0 */ | 223 | /* use line dicipline 0 */ |
223 | tty.c_line = 0; | 224 | tty.c_line = 0; |