aboutsummaryrefslogtreecommitdiff
path: root/libexec/getty
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2018-02-04 13:55:20 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2018-02-04 13:55:20 +0000
commit04688610ae4c23bbc46e9d4908efe4e28343a62c (patch)
tree48c43700a132d1a190c84144bb682b031af5531d /libexec/getty
parent6b1b6a5e281be144f96fef98304a27b0aa57f63a (diff)
Notes
Diffstat (limited to 'libexec/getty')
-rw-r--r--libexec/getty/init.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/libexec/getty/init.c b/libexec/getty/init.c
index cac81fb072dd..5006b66a2f2c 100644
--- a/libexec/getty/init.c
+++ b/libexec/getty/init.c
@@ -52,31 +52,33 @@ static char nullstr[] = "";
static char loginprg[] = _PATH_LOGIN;
static char datefmt[] = "%+";
+#define M(a) (&omode.c_cc[a])
+
struct gettystrs gettystrs[] = {
{ "nx" }, /* next table */
{ "cl" }, /* screen clear characters */
{ "im" }, /* initial message */
{ "lm", loginmsg }, /* login message */
- { "er", &omode.c_cc[VERASE] }, /* erase character */
- { "kl", &omode.c_cc[VKILL] }, /* kill character */
- { "et", &omode.c_cc[VEOF] }, /* eof chatacter (eot) */
+ { "er", M(VERASE) }, /* erase character */
+ { "kl", M(VKILL) }, /* kill character */
+ { "et", M(VEOF) }, /* eof chatacter (eot) */
{ "pc", nullstr }, /* pad character */
{ "tt" }, /* terminal type */
{ "ev" }, /* environment */
{ "lo", loginprg }, /* login program */
{ "hn", hostname }, /* host name */
{ "he" }, /* host name edit */
- { "in", &omode.c_cc[VINTR] }, /* interrupt char */
- { "qu", &omode.c_cc[VQUIT] }, /* quit char */
- { "xn", &omode.c_cc[VSTART] }, /* XON (start) char */
- { "xf", &omode.c_cc[VSTOP] }, /* XOFF (stop) char */
- { "bk", &omode.c_cc[VEOL] }, /* brk char (alt \n) */
- { "su", &omode.c_cc[VSUSP] }, /* suspend char */
- { "ds", &omode.c_cc[VDSUSP] }, /* delayed suspend */
- { "rp", &omode.c_cc[VREPRINT] },/* reprint char */
- { "fl", &omode.c_cc[VDISCARD] },/* flush output */
- { "we", &omode.c_cc[VWERASE] }, /* word erase */
- { "ln", &omode.c_cc[VLNEXT] }, /* literal next */
+ { "in", M(VINTR) }, /* interrupt char */
+ { "qu", M(VQUIT) }, /* quit char */
+ { "xn", M(VSTART) }, /* XON (start) char */
+ { "xf", M(VSTOP) }, /* XOFF (stop) char */
+ { "bk", M(VEOL) }, /* brk char (alt \n) */
+ { "su", M(VSUSP) }, /* suspend char */
+ { "ds", M(VDSUSP) }, /* delayed suspend */
+ { "rp", M(VREPRINT) }, /* reprint char */
+ { "fl", M(VDISCARD) }, /* flush output */
+ { "we", M(VWERASE) }, /* word erase */
+ { "ln", M(VLNEXT) }, /* literal next */
{ "Lo" }, /* locale for strftime() */
{ "pp" }, /* ppp login program */
{ "if" }, /* sysv-like 'issue' filename */