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-w32-3849f9bfcc609380c9225ee04cf84520b02e92b3.tar.gz
busybox-w32-3849f9bfcc609380c9225ee04cf84520b02e92b3.tar.bz2
busybox-w32-3849f9bfcc609380c9225ee04cf84520b02e92b3.zip
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, ...)
244 } 244 }
245} 245}
246 246
247#define CTRLCHAR(ch) ((ch)-0x40)
248
249/* Set terminal settings to reasonable defaults */ 247/* Set terminal settings to reasonable defaults */
250void set_term(int fd) 248void set_term(int fd)
251{ 249{
@@ -254,14 +252,14 @@ void set_term(int fd)
254 tcgetattr(fd, &tty); 252 tcgetattr(fd, &tty);
255 253
256 /* set control chars */ 254 /* set control chars */
257 tty.c_cc[VINTR] = CTRLCHAR('C'); /* Ctrl-C */ 255 tty.c_cc[VINTR] = 3; /* C-c */
258 tty.c_cc[VQUIT] = CTRLCHAR('\\'); /* Ctrl-\ */ 256 tty.c_cc[VQUIT] = 28; /* C-\ */
259 tty.c_cc[VERASE] = CTRLCHAR('?'); /* Ctrl-? */ 257 tty.c_cc[VERASE] = 127; /* C-? */
260 tty.c_cc[VKILL] = CTRLCHAR('U'); /* Ctrl-U */ 258 tty.c_cc[VKILL] = 21; /* C-u */
261 tty.c_cc[VEOF] = CTRLCHAR('D'); /* Ctrl-D */ 259 tty.c_cc[VEOF] = 4; /* C-d */
262 tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ 260 tty.c_cc[VSTART] = 17; /* C-q */
263 tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ 261 tty.c_cc[VSTOP] = 19; /* C-s */
264 tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ 262 tty.c_cc[VSUSP] = 26; /* C-z */
265 263
266 /* use line dicipline 0 */ 264 /* use line dicipline 0 */
267 tty.c_line = 0; 265 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, ...)
244 } 244 }
245} 245}
246 246
247#define CTRLCHAR(ch) ((ch)-0x40)
248
249/* Set terminal settings to reasonable defaults */ 247/* Set terminal settings to reasonable defaults */
250void set_term(int fd) 248void set_term(int fd)
251{ 249{
@@ -254,14 +252,14 @@ void set_term(int fd)
254 tcgetattr(fd, &tty); 252 tcgetattr(fd, &tty);
255 253
256 /* set control chars */ 254 /* set control chars */
257 tty.c_cc[VINTR] = CTRLCHAR('C'); /* Ctrl-C */ 255 tty.c_cc[VINTR] = 3; /* C-c */
258 tty.c_cc[VQUIT] = CTRLCHAR('\\'); /* Ctrl-\ */ 256 tty.c_cc[VQUIT] = 28; /* C-\ */
259 tty.c_cc[VERASE] = CTRLCHAR('?'); /* Ctrl-? */ 257 tty.c_cc[VERASE] = 127; /* C-? */
260 tty.c_cc[VKILL] = CTRLCHAR('U'); /* Ctrl-U */ 258 tty.c_cc[VKILL] = 21; /* C-u */
261 tty.c_cc[VEOF] = CTRLCHAR('D'); /* Ctrl-D */ 259 tty.c_cc[VEOF] = 4; /* C-d */
262 tty.c_cc[VSTART] = CTRLCHAR('Q'); /* Ctrl-Q */ 260 tty.c_cc[VSTART] = 17; /* C-q */
263 tty.c_cc[VSTOP] = CTRLCHAR('S'); /* Ctrl-S */ 261 tty.c_cc[VSTOP] = 19; /* C-s */
264 tty.c_cc[VSUSP] = CTRLCHAR('Z'); /* Ctrl-Z */ 262 tty.c_cc[VSUSP] = 26; /* C-z */
265 263
266 /* use line dicipline 0 */ 264 /* use line dicipline 0 */
267 tty.c_line = 0; 265 tty.c_line = 0;