diff options
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r-- | term-utils/agetty.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c index c9163caa6..ed97bc560 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -106,22 +106,6 @@ #define LOGIN "login: " #define LOGIN_ARGV_MAX 16 /* Numbers of args for login */ -/* Some shorthands for control characters. */ -#define CTL(x) (x ^ 0100) /* Assumes ASCII dialect */ -#define CR CTL('M') /* carriage return */ -#define NL CTL('J') /* line feed */ -#define BS CTL('H') /* back space */ -#define DEL CTL('?') /* delete */ - -/* Defaults for line-editing etc. characters; you may want to change these. */ -#define DEF_ERASE DEL /* default erase character */ -#define DEF_INTR CTL('C') /* default interrupt character */ -#define DEF_QUIT CTL('\\') /* default quit char */ -#define DEF_KILL CTL('U') /* default kill char */ -#define DEF_EOF CTL('D') /* default EOF char */ -#define DEF_EOL 0 -#define DEF_SWITCH 0 /* default switch char */ - /* * When multiple baud rates are specified on the command line, the first one * we will try is the first one specified. @@ -178,13 +162,6 @@ struct options { #define serial_tty_option(opt, flag) \ (((opt)->flags & (F_VCONSOLE|(flag))) == (flag)) -/* Initial values for the above. */ -static const struct chardata init_chardata = { - .erase = DEF_ERASE, /* default erase character */ - .kill = DEF_KILL, /* default kill character */ - .eol = 13 /* default eol char */ -}; - struct Speedtab { long speed; speed_t code; @@ -365,7 +342,7 @@ int main(int argc, char **argv) } } - chardata = init_chardata; + INIT_CHARDATA(&chardata); if (options.autolog) { debug("doing auto login\n"); @@ -1404,7 +1381,7 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata }; /* Initialize kill, erase, parity etc. (also after switching speeds). */ - *cp = init_chardata; + INIT_CHARDATA(cp); /* * Flush pending input (especially important after parsing or switching |