aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-21 01:26:49 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-21 01:26:49 +0000
commitf2d936410c1523ab9bfc0663053d444589b2e7d7 (patch)
tree2c99ce8ba7d4d592806fbf81899e663bc884676b /init
parente8140c5cf14be7ddbc10f1bf834fd4150994a184 (diff)
downloadbusybox-w32-f2d936410c1523ab9bfc0663053d444589b2e7d7.tar.gz
busybox-w32-f2d936410c1523ab9bfc0663053d444589b2e7d7.tar.bz2
busybox-w32-f2d936410c1523ab9bfc0663053d444589b2e7d7.zip
More Doc updates. cmdedit and more termio fixes.
git-svn-id: svn://busybox.net/trunk/busybox@492 69ca8d6d-28ef-0310-b511-8ec308f3f277
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, ...)
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 */
206void set_term(int fd) 207void 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;