date and time created 88/07/21 17:35:30 by marc
[unix-history] / usr / src / libexec / getty / init.c
CommitLineData
8a3f4fd4
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
850c5cfe 7#ifndef lint
e5943133 8static char sccsid[] = "@(#)init.c 5.2 (Berkeley) %G%";
8a3f4fd4 9#endif not lint
850c5cfe
SL
10
11/*
12 * Getty table initializations.
13 *
14 * Melbourne getty.
15 */
16#include <sgtty.h>
17#include "gettytab.h"
18
19extern struct sgttyb tmode;
20extern struct tchars tc;
21extern struct ltchars ltc;
22extern char hostname[];
23
24struct gettystrs gettystrs[] = {
6f692736 25 { "nx" }, /* next table */
850c5cfe
SL
26 { "cl" }, /* screen clear characters */
27 { "im" }, /* initial message */
28 { "lm", "login: " }, /* login message */
29 { "er", &tmode.sg_erase }, /* erase character */
30 { "kl", &tmode.sg_kill }, /* kill character */
31 { "et", &tc.t_eofc }, /* eof chatacter (eot) */
32 { "pc", "" }, /* pad character */
33 { "tt" }, /* terminal type */
34 { "ev" }, /* enviroment */
35 { "lo", "/bin/login" }, /* login program */
36 { "hn", hostname }, /* host name */
37 { "he" }, /* host name edit */
38 { "in", &tc.t_intrc }, /* interrupt char */
39 { "qu", &tc.t_quitc }, /* quit char */
40 { "xn", &tc.t_startc }, /* XON (start) char */
41 { "xf", &tc.t_stopc }, /* XOFF (stop) char */
42 { "bk", &tc.t_brkc }, /* brk char (alt \n) */
43 { "su", &ltc.t_suspc }, /* suspend char */
44 { "ds", &ltc.t_dsuspc }, /* delayed suspend */
45 { "rp", &ltc.t_rprntc }, /* reprint char */
46 { "fl", &ltc.t_flushc }, /* flush output */
47 { "we", &ltc.t_werasc }, /* word erase */
48 { "ln", &ltc.t_lnextc }, /* literal next */
49 { 0 }
50};
51
52struct gettynums gettynums[] = {
53 { "is" }, /* input speed */
54 { "os" }, /* output speed */
55 { "sp" }, /* both speeds */
56 { "nd" }, /* newline delay */
57 { "cd" }, /* carriage-return delay */
58 { "td" }, /* tab delay */
59 { "fd" }, /* form-feed delay */
60 { "bd" }, /* backspace delay */
61 { "to" }, /* timeout */
62 { "f0" }, /* output flags */
63 { "f1" }, /* input flags */
64 { "f2" }, /* user mode flags */
b3afc78c 65 { "pf" }, /* delay before flush at 1st prompt */
850c5cfe
SL
66 { 0 }
67};
68
69struct gettyflags gettyflags[] = {
70 { "ht", 0 }, /* has tabs */
71 { "nl", 1 }, /* has newline char */
72 { "ep", 0 }, /* even parity */
73 { "op", 0 }, /* odd parity */
74 { "ap", 0 }, /* any parity */
75 { "ec", 1 }, /* no echo */
76 { "co", 0 }, /* console special */
77 { "cb", 0 }, /* crt backspace */
78 { "ck", 0 }, /* crt kill */
79 { "ce", 0 }, /* crt erase */
80 { "pe", 0 }, /* printer erase */
81 { "rw", 1 }, /* don't use raw */
82 { "xc", 1 }, /* don't ^X ctl chars */
83 { "lc", 0 }, /* terminal las lower case */
84 { "uc", 0 }, /* terminal has no lower case */
85 { "ig", 0 }, /* ignore garbage */
86 { "ps", 0 }, /* do port selector speed select */
c6d70045
RE
87 { "hc", 1 }, /* don't set hangup on close */
88 { "ub", 0 }, /* unbuffered output */
ec2b493d 89 { "ab", 0 }, /* auto-baud detect with '\r' */
e5943133 90 { "dx", 0 }, /* set decctlq */
850c5cfe
SL
91 { 0 }
92};