init.c revision 2286
1168404Spjd/* 2168404Spjd * Copyright (c) 1983 The Regents of the University of California. 3168404Spjd * All rights reserved. 4168404Spjd * 5168404Spjd * Redistribution and use in source and binary forms, with or without 6168404Spjd * modification, are permitted provided that the following conditions 7168404Spjd * are met: 8168404Spjd * 1. Redistributions of source code must retain the above copyright 9168404Spjd * notice, this list of conditions and the following disclaimer. 10168404Spjd * 2. Redistributions in binary form must reproduce the above copyright 11168404Spjd * notice, this list of conditions and the following disclaimer in the 12168404Spjd * documentation and/or other materials provided with the distribution. 13168404Spjd * 3. All advertising materials mentioning features or use of this software 14168404Spjd * must display the following acknowledgement: 15168404Spjd * This product includes software developed by the University of 16168404Spjd * California, Berkeley and its contributors. 17168404Spjd * 4. Neither the name of the University nor the names of its contributors 18168404Spjd * may be used to endorse or promote products derived from this software 19168404Spjd * without specific prior written permission. 20178414Sjb * 21178414Sjb * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22168404Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23168404Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24168404Spjd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25168404Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26168404Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27168404Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28168404Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29168404Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30168404Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31168404Spjd * SUCH DAMAGE. 32168404Spjd */ 33168404Spjd 34168404Spjd#ifndef lint 35168404Spjdstatic char sccsid[] = "@(#)init.c 5.6 (Berkeley) 3/27/91"; 36168404Spjd#endif /* not lint */ 37168404Spjd 38168404Spjd/* 39168404Spjd * Getty table initializations. 40168404Spjd * 41168404Spjd * Melbourne getty. 42168404Spjd */ 43168404Spjd#include <sgtty.h> 44168404Spjd#include "gettytab.h" 45168404Spjd#include "pathnames.h" 46168404Spjd 47168404Spjdextern struct sgttyb tmode; 48168404Spjdextern struct tchars tc; 49168404Spjdextern struct ltchars ltc; 50168404Spjdextern char hostname[]; 51168404Spjd 52168404Spjdstruct gettystrs gettystrs[] = { 53168404Spjd { "nx" }, /* next table */ 54168404Spjd { "cl" }, /* screen clear characters */ 55168404Spjd { "im" }, /* initial message */ 56168404Spjd { "lm", "login: " }, /* login message */ 57168404Spjd { "er", &tmode.sg_erase }, /* erase character */ 58168404Spjd { "kl", &tmode.sg_kill }, /* kill character */ 59168404Spjd { "et", &tc.t_eofc }, /* eof chatacter (eot) */ 60168404Spjd { "pc", "" }, /* pad character */ 61168404Spjd { "tt" }, /* terminal type */ 62168404Spjd { "ev" }, /* enviroment */ 63168404Spjd { "lo", _PATH_LOGIN }, /* login program */ 64168404Spjd { "hn", hostname }, /* host name */ 65168404Spjd { "he" }, /* host name edit */ 66168404Spjd { "in", &tc.t_intrc }, /* interrupt char */ 67168404Spjd { "qu", &tc.t_quitc }, /* quit char */ 68168404Spjd { "xn", &tc.t_startc }, /* XON (start) char */ 69168404Spjd { "xf", &tc.t_stopc }, /* XOFF (stop) char */ 70168404Spjd { "bk", &tc.t_brkc }, /* brk char (alt \n) */ 71168404Spjd { "su", <c.t_suspc }, /* suspend char */ 72168404Spjd { "ds", <c.t_dsuspc }, /* delayed suspend */ 73168404Spjd { "rp", <c.t_rprntc }, /* reprint char */ 74168404Spjd { "fl", <c.t_flushc }, /* flush output */ 75168404Spjd { "we", <c.t_werasc }, /* word erase */ 76168404Spjd { "ln", <c.t_lnextc }, /* literal next */ 77168404Spjd { 0 } 78168404Spjd}; 79168404Spjd 80168404Spjdstruct gettynums gettynums[] = { 81168404Spjd { "is" }, /* input speed */ 82168404Spjd { "os" }, /* output speed */ 83168404Spjd { "sp" }, /* both speeds */ 84168404Spjd { "nd" }, /* newline delay */ 85168404Spjd { "cd" }, /* carriage-return delay */ 86168404Spjd { "td" }, /* tab delay */ 87168404Spjd { "fd" }, /* form-feed delay */ 88168404Spjd { "bd" }, /* backspace delay */ 89168404Spjd { "to" }, /* timeout */ 90168404Spjd { "f0" }, /* output flags */ 91168404Spjd { "f1" }, /* input flags */ 92168404Spjd { "f2" }, /* user mode flags */ 93168404Spjd { "pf" }, /* delay before flush at 1st prompt */ 94168404Spjd { 0 } 95168404Spjd}; 96168404Spjd 97168404Spjdstruct gettyflags gettyflags[] = { 98168404Spjd { "ht", 0 }, /* has tabs */ 99168404Spjd { "nl", 1 }, /* has newline char */ 100168404Spjd { "ep", 0 }, /* even parity */ 101168404Spjd { "op", 0 }, /* odd parity */ 102168404Spjd { "ap", 0 }, /* any parity */ 103168404Spjd { "ec", 1 }, /* no echo */ 104168404Spjd { "co", 0 }, /* console special */ 105168404Spjd { "cb", 0 }, /* crt backspace */ 106168404Spjd { "ck", 0 }, /* crt kill */ 107168404Spjd { "ce", 0 }, /* crt erase */ 108168404Spjd { "pe", 0 }, /* printer erase */ 109168404Spjd { "rw", 1 }, /* don't use raw */ 110168404Spjd { "xc", 1 }, /* don't ^X ctl chars */ 111168404Spjd { "lc", 0 }, /* terminal las lower case */ 112168404Spjd { "uc", 0 }, /* terminal has no lower case */ 113168404Spjd { "ig", 0 }, /* ignore garbage */ 114168404Spjd { "ps", 0 }, /* do port selector speed select */ 115168404Spjd { "hc", 1 }, /* don't set hangup on close */ 116168404Spjd { "ub", 0 }, /* unbuffered output */ 117168404Spjd { "ab", 0 }, /* auto-baud detect with '\r' */ 118168404Spjd { "dx", 0 }, /* set decctlq */ 119168404Spjd { "np", 0 }, /* no parity at all (8bit chars) */ 120168404Spjd { 0 } 121168404Spjd}; 122168404Spjd