Deleted Added
full compact
init.c (2286) init.c (15645)
1/*
1/*
2 * Copyright (c) 1983 The Regents of the University of California.
3 * All rights reserved.
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the

--- 15 unchanged lines hidden (view full) ---

27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the

--- 15 unchanged lines hidden (view full) ---

27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35static char sccsid[] = "@(#)init.c 5.6 (Berkeley) 3/27/91";
35/*static char sccsid[] = "from: @(#)init.c 8.1 (Berkeley) 6/4/93";*/
36static char rcsid[] = "$Id: init.c,v 1.1.1.2 1996/04/13 15:33:10 joerg Exp $";
36#endif /* not lint */
37
38/*
39 * Getty table initializations.
40 *
41 * Melbourne getty.
42 */
37#endif /* not lint */
38
39/*
40 * Getty table initializations.
41 *
42 * Melbourne getty.
43 */
43#include <sgtty.h>
44#include <termios.h>
45#include "extern.h"
44#include "gettytab.h"
45#include "pathnames.h"
46
46#include "gettytab.h"
47#include "pathnames.h"
48
47extern struct sgttyb tmode;
48extern struct tchars tc;
49extern struct ltchars ltc;
50extern char hostname[];
49static char loginmsg[] = "login: ";
50static char nullstr[] = "";
51static char loginprg[] = _PATH_LOGIN;
51
52struct gettystrs gettystrs[] = {
53 { "nx" }, /* next table */
54 { "cl" }, /* screen clear characters */
55 { "im" }, /* initial message */
52
53struct gettystrs gettystrs[] = {
54 { "nx" }, /* next table */
55 { "cl" }, /* screen clear characters */
56 { "im" }, /* initial message */
56 { "lm", "login: " }, /* login message */
57 { "er", &tmode.sg_erase }, /* erase character */
58 { "kl", &tmode.sg_kill }, /* kill character */
59 { "et", &tc.t_eofc }, /* eof chatacter (eot) */
60 { "pc", "" }, /* pad character */
57 { "lm", loginmsg }, /* login message */
58 { "er", &tmode.c_cc[VERASE] }, /* erase character */
59 { "kl", &tmode.c_cc[VKILL] }, /* kill character */
60 { "et", &tmode.c_cc[VEOF] }, /* eof chatacter (eot) */
61 { "pc", nullstr }, /* pad character */
61 { "tt" }, /* terminal type */
62 { "ev" }, /* enviroment */
62 { "tt" }, /* terminal type */
63 { "ev" }, /* enviroment */
63 { "lo", _PATH_LOGIN }, /* login program */
64 { "lo", loginprg }, /* login program */
64 { "hn", hostname }, /* host name */
65 { "he" }, /* host name edit */
65 { "hn", hostname }, /* host name */
66 { "he" }, /* host name edit */
66 { "in", &tc.t_intrc }, /* interrupt char */
67 { "qu", &tc.t_quitc }, /* quit char */
68 { "xn", &tc.t_startc }, /* XON (start) char */
69 { "xf", &tc.t_stopc }, /* XOFF (stop) char */
70 { "bk", &tc.t_brkc }, /* brk char (alt \n) */
71 { "su", &ltc.t_suspc }, /* suspend char */
72 { "ds", &ltc.t_dsuspc }, /* delayed suspend */
73 { "rp", &ltc.t_rprntc }, /* reprint char */
74 { "fl", &ltc.t_flushc }, /* flush output */
75 { "we", &ltc.t_werasc }, /* word erase */
76 { "ln", &ltc.t_lnextc }, /* literal next */
67 { "in", &tmode.c_cc[VINTR] }, /* interrupt char */
68 { "qu", &tmode.c_cc[VQUIT] }, /* quit char */
69 { "xn", &tmode.c_cc[VSTART] }, /* XON (start) char */
70 { "xf", &tmode.c_cc[VSTOP] }, /* XOFF (stop) char */
71 { "bk", &tmode.c_cc[VEOL] }, /* brk char (alt \n) */
72 { "su", &tmode.c_cc[VSUSP] }, /* suspend char */
73 { "ds", &tmode.c_cc[VDSUSP] }, /* delayed suspend */
74 { "rp", &tmode.c_cc[VREPRINT] },/* reprint char */
75 { "fl", &tmode.c_cc[VDISCARD] },/* flush output */
76 { "we", &tmode.c_cc[VWERASE] }, /* word erase */
77 { "ln", &tmode.c_cc[VLNEXT] }, /* literal next */
78 { "Lo" }, /* locale for strftime() */
77 { 0 }
78};
79
80struct gettynums gettynums[] = {
81 { "is" }, /* input speed */
82 { "os" }, /* output speed */
83 { "sp" }, /* both speeds */
84 { "nd" }, /* newline delay */
85 { "cd" }, /* carriage-return delay */
86 { "td" }, /* tab delay */
87 { "fd" }, /* form-feed delay */
88 { "bd" }, /* backspace delay */
89 { "to" }, /* timeout */
90 { "f0" }, /* output flags */
91 { "f1" }, /* input flags */
92 { "f2" }, /* user mode flags */
93 { "pf" }, /* delay before flush at 1st prompt */
79 { 0 }
80};
81
82struct gettynums gettynums[] = {
83 { "is" }, /* input speed */
84 { "os" }, /* output speed */
85 { "sp" }, /* both speeds */
86 { "nd" }, /* newline delay */
87 { "cd" }, /* carriage-return delay */
88 { "td" }, /* tab delay */
89 { "fd" }, /* form-feed delay */
90 { "bd" }, /* backspace delay */
91 { "to" }, /* timeout */
92 { "f0" }, /* output flags */
93 { "f1" }, /* input flags */
94 { "f2" }, /* user mode flags */
95 { "pf" }, /* delay before flush at 1st prompt */
96 { "c0" }, /* output c_flags */
97 { "c1" }, /* input c_flags */
98 { "c2" }, /* user mode c_flags */
99 { "i0" }, /* output i_flags */
100 { "i1" }, /* input i_flags */
101 { "i2" }, /* user mode i_flags */
102 { "l0" }, /* output l_flags */
103 { "l1" }, /* input l_flags */
104 { "l2" }, /* user mode l_flags */
105 { "o0" }, /* output o_flags */
106 { "o1" }, /* input o_flags */
107 { "o2" }, /* user mode o_flags */
94 { 0 }
95};
96
97struct gettyflags gettyflags[] = {
98 { "ht", 0 }, /* has tabs */
99 { "nl", 1 }, /* has newline char */
100 { "ep", 0 }, /* even parity */
101 { "op", 0 }, /* odd parity */

--- 10 unchanged lines hidden (view full) ---

112 { "uc", 0 }, /* terminal has no lower case */
113 { "ig", 0 }, /* ignore garbage */
114 { "ps", 0 }, /* do port selector speed select */
115 { "hc", 1 }, /* don't set hangup on close */
116 { "ub", 0 }, /* unbuffered output */
117 { "ab", 0 }, /* auto-baud detect with '\r' */
118 { "dx", 0 }, /* set decctlq */
119 { "np", 0 }, /* no parity at all (8bit chars) */
108 { 0 }
109};
110
111struct gettyflags gettyflags[] = {
112 { "ht", 0 }, /* has tabs */
113 { "nl", 1 }, /* has newline char */
114 { "ep", 0 }, /* even parity */
115 { "op", 0 }, /* odd parity */

--- 10 unchanged lines hidden (view full) ---

126 { "uc", 0 }, /* terminal has no lower case */
127 { "ig", 0 }, /* ignore garbage */
128 { "ps", 0 }, /* do port selector speed select */
129 { "hc", 1 }, /* don't set hangup on close */
130 { "ub", 0 }, /* unbuffered output */
131 { "ab", 0 }, /* auto-baud detect with '\r' */
132 { "dx", 0 }, /* set decctlq */
133 { "np", 0 }, /* no parity at all (8bit chars) */
134 { "mb", 0 }, /* do MDMBUF flow control */
120 { 0 }
121};
135 { 0 }
136};