1 /* 2 * Copyright (c) 1983 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 */ 17 18 #ifndef lint 19 static char sccsid[] = "@(#)init.c 5.4 (Berkeley) 04/02/89"; 20 #endif /* not lint */ 21 22 /* 23 * Getty table initializations. 24 * 25 * Melbourne getty. 26 */ 27 #include <sgtty.h> 28 #include "gettytab.h" 29 #include "pathnames.h" 30 31 extern struct sgttyb tmode; 32 extern struct tchars tc; 33 extern struct ltchars ltc; 34 extern char hostname[]; 35 36 struct gettystrs gettystrs[] = { 37 { "nx" }, /* next table */ 38 { "cl" }, /* screen clear characters */ 39 { "im" }, /* initial message */ 40 { "lm", "login: " }, /* login message */ 41 { "er", &tmode.sg_erase }, /* erase character */ 42 { "kl", &tmode.sg_kill }, /* kill character */ 43 { "et", &tc.t_eofc }, /* eof chatacter (eot) */ 44 { "pc", "" }, /* pad character */ 45 { "tt" }, /* terminal type */ 46 { "ev" }, /* enviroment */ 47 { "lo", _PATH_LOGIN }, /* login program */ 48 { "hn", hostname }, /* host name */ 49 { "he" }, /* host name edit */ 50 { "in", &tc.t_intrc }, /* interrupt char */ 51 { "qu", &tc.t_quitc }, /* quit char */ 52 { "xn", &tc.t_startc }, /* XON (start) char */ 53 { "xf", &tc.t_stopc }, /* XOFF (stop) char */ 54 { "bk", &tc.t_brkc }, /* brk char (alt \n) */ 55 { "su", <c.t_suspc }, /* suspend char */ 56 { "ds", <c.t_dsuspc }, /* delayed suspend */ 57 { "rp", <c.t_rprntc }, /* reprint char */ 58 { "fl", <c.t_flushc }, /* flush output */ 59 { "we", <c.t_werasc }, /* word erase */ 60 { "ln", <c.t_lnextc }, /* literal next */ 61 { 0 } 62 }; 63 64 struct gettynums gettynums[] = { 65 { "is" }, /* input speed */ 66 { "os" }, /* output speed */ 67 { "sp" }, /* both speeds */ 68 { "nd" }, /* newline delay */ 69 { "cd" }, /* carriage-return delay */ 70 { "td" }, /* tab delay */ 71 { "fd" }, /* form-feed delay */ 72 { "bd" }, /* backspace delay */ 73 { "to" }, /* timeout */ 74 { "f0" }, /* output flags */ 75 { "f1" }, /* input flags */ 76 { "f2" }, /* user mode flags */ 77 { "pf" }, /* delay before flush at 1st prompt */ 78 { 0 } 79 }; 80 81 struct gettyflags gettyflags[] = { 82 { "ht", 0 }, /* has tabs */ 83 { "nl", 1 }, /* has newline char */ 84 { "ep", 0 }, /* even parity */ 85 { "op", 0 }, /* odd parity */ 86 { "ap", 0 }, /* any parity */ 87 { "ec", 1 }, /* no echo */ 88 { "co", 0 }, /* console special */ 89 { "cb", 0 }, /* crt backspace */ 90 { "ck", 0 }, /* crt kill */ 91 { "ce", 0 }, /* crt erase */ 92 { "pe", 0 }, /* printer erase */ 93 { "rw", 1 }, /* don't use raw */ 94 { "xc", 1 }, /* don't ^X ctl chars */ 95 { "lc", 0 }, /* terminal las lower case */ 96 { "uc", 0 }, /* terminal has no lower case */ 97 { "ig", 0 }, /* ignore garbage */ 98 { "ps", 0 }, /* do port selector speed select */ 99 { "hc", 1 }, /* don't set hangup on close */ 100 { "ub", 0 }, /* unbuffered output */ 101 { "ab", 0 }, /* auto-baud detect with '\r' */ 102 { "dx", 0 }, /* set decctlq */ 103 { 0 } 104 }; 105