xref: /csrg-svn/libexec/getty/init.c (revision 37275)
119060Sdist /*
236929Sbostic  * Copyright (c) 1983 The Regents of the University of California.
336929Sbostic  * All rights reserved.
436929Sbostic  *
536929Sbostic  * Redistribution and use in source and binary forms are permitted
636929Sbostic  * provided that the above copyright notice and this paragraph are
736929Sbostic  * duplicated in all such forms and that any documentation,
836929Sbostic  * advertising materials, and other materials related to such
936929Sbostic  * distribution and use acknowledge that the software was developed
1036929Sbostic  * by the University of California, Berkeley.  The name of the
1136929Sbostic  * University may not be used to endorse or promote products derived
1236929Sbostic  * from this software without specific prior written permission.
1336929Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1436929Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1536929Sbostic  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1619060Sdist  */
1719060Sdist 
1813794Ssam #ifndef lint
19*37275Sbostic static char sccsid[] = "@(#)init.c	5.4 (Berkeley) 04/02/89";
2036929Sbostic #endif /* not lint */
2113794Ssam 
2213794Ssam /*
2313794Ssam  * Getty table initializations.
2413794Ssam  *
2513794Ssam  * Melbourne getty.
2613794Ssam  */
2713794Ssam #include <sgtty.h>
2813794Ssam #include "gettytab.h"
29*37275Sbostic #include "pathnames.h"
3013794Ssam 
3113794Ssam extern	struct sgttyb tmode;
3213794Ssam extern	struct tchars tc;
3313794Ssam extern	struct ltchars ltc;
3413794Ssam extern	char hostname[];
3513794Ssam 
3613794Ssam struct	gettystrs gettystrs[] = {
3713875Ssam 	{ "nx" },			/* next table */
3813794Ssam 	{ "cl" },			/* screen clear characters */
3913794Ssam 	{ "im" },			/* initial message */
4013794Ssam 	{ "lm", "login: " },		/* login message */
4113794Ssam 	{ "er", &tmode.sg_erase },	/* erase character */
4213794Ssam 	{ "kl", &tmode.sg_kill },	/* kill character */
4313794Ssam 	{ "et", &tc.t_eofc },		/* eof chatacter (eot) */
4413794Ssam 	{ "pc", "" },			/* pad character */
4513794Ssam 	{ "tt" },			/* terminal type */
4613794Ssam 	{ "ev" },			/* enviroment */
47*37275Sbostic 	{ "lo", _PATH_LOGIN },		/* login program */
4813794Ssam 	{ "hn", hostname },		/* host name */
4913794Ssam 	{ "he" },			/* host name edit */
5013794Ssam 	{ "in", &tc.t_intrc },		/* interrupt char */
5113794Ssam 	{ "qu", &tc.t_quitc },		/* quit char */
5213794Ssam 	{ "xn", &tc.t_startc },		/* XON (start) char */
5313794Ssam 	{ "xf", &tc.t_stopc },		/* XOFF (stop) char */
5413794Ssam 	{ "bk", &tc.t_brkc },		/* brk char (alt \n) */
5513794Ssam 	{ "su", &ltc.t_suspc },		/* suspend char */
5613794Ssam 	{ "ds", &ltc.t_dsuspc },	/* delayed suspend */
5713794Ssam 	{ "rp", &ltc.t_rprntc },	/* reprint char */
5813794Ssam 	{ "fl", &ltc.t_flushc },	/* flush output */
5913794Ssam 	{ "we", &ltc.t_werasc },	/* word erase */
6013794Ssam 	{ "ln", &ltc.t_lnextc },	/* literal next */
6113794Ssam 	{ 0 }
6213794Ssam };
6313794Ssam 
6413794Ssam struct	gettynums gettynums[] = {
6513794Ssam 	{ "is" },			/* input speed */
6613794Ssam 	{ "os" },			/* output speed */
6713794Ssam 	{ "sp" },			/* both speeds */
6813794Ssam 	{ "nd" },			/* newline delay */
6913794Ssam 	{ "cd" },			/* carriage-return delay */
7013794Ssam 	{ "td" },			/* tab delay */
7113794Ssam 	{ "fd" },			/* form-feed delay */
7213794Ssam 	{ "bd" },			/* backspace delay */
7313794Ssam 	{ "to" },			/* timeout */
7413794Ssam 	{ "f0" },			/* output flags */
7513794Ssam 	{ "f1" },			/* input flags */
7613794Ssam 	{ "f2" },			/* user mode flags */
7713885Ssam 	{ "pf" },			/* delay before flush at 1st prompt */
7813794Ssam 	{ 0 }
7913794Ssam };
8013794Ssam 
8113794Ssam struct	gettyflags gettyflags[] = {
8213794Ssam 	{ "ht",	0 },			/* has tabs */
8313794Ssam 	{ "nl",	1 },			/* has newline char */
8413794Ssam 	{ "ep",	0 },			/* even parity */
8513794Ssam 	{ "op",	0 },			/* odd parity */
8613794Ssam 	{ "ap",	0 },			/* any parity */
8713794Ssam 	{ "ec",	1 },			/* no echo */
8813794Ssam 	{ "co",	0 },			/* console special */
8913794Ssam 	{ "cb",	0 },			/* crt backspace */
9013794Ssam 	{ "ck",	0 },			/* crt kill */
9113794Ssam 	{ "ce",	0 },			/* crt erase */
9213794Ssam 	{ "pe",	0 },			/* printer erase */
9313794Ssam 	{ "rw",	1 },			/* don't use raw */
9413794Ssam 	{ "xc",	1 },			/* don't ^X ctl chars */
9513794Ssam 	{ "lc",	0 },			/* terminal las lower case */
9613794Ssam 	{ "uc",	0 },			/* terminal has no lower case */
9713794Ssam 	{ "ig",	0 },			/* ignore garbage */
9813794Ssam 	{ "ps",	0 },			/* do port selector speed select */
9913826Skre 	{ "hc",	1 },			/* don't set hangup on close */
10013826Skre 	{ "ub", 0 },			/* unbuffered output */
10117925Sralph 	{ "ab", 0 },			/* auto-baud detect with '\r' */
10225730Smckusick 	{ "dx", 0 },			/* set decctlq */
10313794Ssam 	{ 0 }
10413794Ssam };
105