summaryrefslogtreecommitdiffstats
path: root/libexec/getty/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/getty/init.c')
-rw-r--r--libexec/getty/init.c65
1 files changed, 40 insertions, 25 deletions
diff --git a/libexec/getty/init.c b/libexec/getty/init.c
index ac7112f..f289795 100644
--- a/libexec/getty/init.c
+++ b/libexec/getty/init.c
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1983 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,7 +32,8 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)init.c 5.6 (Berkeley) 3/27/91";
+/*static char sccsid[] = "from: @(#)init.c 8.1 (Berkeley) 6/4/93";*/
+static char rcsid[] = "$Id: init.c,v 1.1.1.2 1996/04/13 15:33:10 joerg Exp $";
#endif /* not lint */
/*
@@ -40,40 +41,41 @@ static char sccsid[] = "@(#)init.c 5.6 (Berkeley) 3/27/91";
*
* Melbourne getty.
*/
-#include <sgtty.h>
+#include <termios.h>
+#include "extern.h"
#include "gettytab.h"
#include "pathnames.h"
-extern struct sgttyb tmode;
-extern struct tchars tc;
-extern struct ltchars ltc;
-extern char hostname[];
+static char loginmsg[] = "login: ";
+static char nullstr[] = "";
+static char loginprg[] = _PATH_LOGIN;
struct gettystrs gettystrs[] = {
{ "nx" }, /* next table */
{ "cl" }, /* screen clear characters */
{ "im" }, /* initial message */
- { "lm", "login: " }, /* login message */
- { "er", &tmode.sg_erase }, /* erase character */
- { "kl", &tmode.sg_kill }, /* kill character */
- { "et", &tc.t_eofc }, /* eof chatacter (eot) */
- { "pc", "" }, /* pad character */
+ { "lm", loginmsg }, /* login message */
+ { "er", &tmode.c_cc[VERASE] }, /* erase character */
+ { "kl", &tmode.c_cc[VKILL] }, /* kill character */
+ { "et", &tmode.c_cc[VEOF] }, /* eof chatacter (eot) */
+ { "pc", nullstr }, /* pad character */
{ "tt" }, /* terminal type */
{ "ev" }, /* enviroment */
- { "lo", _PATH_LOGIN }, /* login program */
+ { "lo", loginprg }, /* login program */
{ "hn", hostname }, /* host name */
{ "he" }, /* host name edit */
- { "in", &tc.t_intrc }, /* interrupt char */
- { "qu", &tc.t_quitc }, /* quit char */
- { "xn", &tc.t_startc }, /* XON (start) char */
- { "xf", &tc.t_stopc }, /* XOFF (stop) char */
- { "bk", &tc.t_brkc }, /* brk char (alt \n) */
- { "su", &ltc.t_suspc }, /* suspend char */
- { "ds", &ltc.t_dsuspc }, /* delayed suspend */
- { "rp", &ltc.t_rprntc }, /* reprint char */
- { "fl", &ltc.t_flushc }, /* flush output */
- { "we", &ltc.t_werasc }, /* word erase */
- { "ln", &ltc.t_lnextc }, /* literal next */
+ { "in", &tmode.c_cc[VINTR] }, /* interrupt char */
+ { "qu", &tmode.c_cc[VQUIT] }, /* quit char */
+ { "xn", &tmode.c_cc[VSTART] }, /* XON (start) char */
+ { "xf", &tmode.c_cc[VSTOP] }, /* XOFF (stop) char */
+ { "bk", &tmode.c_cc[VEOL] }, /* brk char (alt \n) */
+ { "su", &tmode.c_cc[VSUSP] }, /* suspend char */
+ { "ds", &tmode.c_cc[VDSUSP] }, /* delayed suspend */
+ { "rp", &tmode.c_cc[VREPRINT] },/* reprint char */
+ { "fl", &tmode.c_cc[VDISCARD] },/* flush output */
+ { "we", &tmode.c_cc[VWERASE] }, /* word erase */
+ { "ln", &tmode.c_cc[VLNEXT] }, /* literal next */
+ { "Lo" }, /* locale for strftime() */
{ 0 }
};
@@ -91,6 +93,18 @@ struct gettynums gettynums[] = {
{ "f1" }, /* input flags */
{ "f2" }, /* user mode flags */
{ "pf" }, /* delay before flush at 1st prompt */
+ { "c0" }, /* output c_flags */
+ { "c1" }, /* input c_flags */
+ { "c2" }, /* user mode c_flags */
+ { "i0" }, /* output i_flags */
+ { "i1" }, /* input i_flags */
+ { "i2" }, /* user mode i_flags */
+ { "l0" }, /* output l_flags */
+ { "l1" }, /* input l_flags */
+ { "l2" }, /* user mode l_flags */
+ { "o0" }, /* output o_flags */
+ { "o1" }, /* input o_flags */
+ { "o2" }, /* user mode o_flags */
{ 0 }
};
@@ -117,5 +131,6 @@ struct gettyflags gettyflags[] = {
{ "ab", 0 }, /* auto-baud detect with '\r' */
{ "dx", 0 }, /* set decctlq */
{ "np", 0 }, /* no parity at all (8bit chars) */
+ { "mb", 0 }, /* do MDMBUF flow control */
{ 0 }
};
OpenPOWER on IntegriCloud