1 /**	$MirOS: src/usr.bin/tip/vars.c,v 1.2 2005/03/13 18:33:47 tg Exp $ */
2 /*	$OpenBSD: vars.c,v 1.5 2003/09/20 18:15:32 millert Exp $	*/
3 /*	$NetBSD: vars.c,v 1.3 1994/12/08 09:31:19 jtc Exp $	*/
4 
5 /*
6  * Copyright (c) 1983, 1993
7  *	The Regents of the University of California.  All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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
35 #if 0
36 static char sccsid[] = "@(#)vars.c	8.1 (Berkeley) 6/6/93";
37 #endif
38 static const char rcsid[] = "$OpenBSD: vars.c,v 1.5 2003/09/20 18:15:32 millert Exp $";
39 #endif /* not lint */
40 
41 #include "tip.h"
42 #include "pathnames.h"
43 
44 /*
45  * Definition of variables
46  */
47 value_t vtable[] = {
48 	{ "beautify",	BOOL,			(READ|WRITE)<<PUBLIC,
49 	  "be",		(char *)TRUE },
50 	{ "baudrate",	NUMBER|IREMOTE|INIT,	(READ<<PUBLIC)|(WRITE<<ROOT),
51 	  "ba",		(char *)&BR },
52 	{ "dialtimeout",NUMBER,			(READ<<PUBLIC)|(WRITE<<ROOT),
53 	  "dial",	(char *)60 },
54 	{ "eofread",	STRING|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
55 	  "eofr",	(char *)&IE },
56 	{ "eofwrite",	STRING|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
57 	  "eofw",	(char *)&OE },
58 	{ "eol",	STRING|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
59 	  NOSTR,	(char *)&EL },
60 	{ "escape",	CHAR,			(READ|WRITE)<<PUBLIC,
61 	  "es",		(char *)'~' },
62 	{ "exceptions",	STRING|INIT|IREMOTE,	(READ|WRITE)<<PUBLIC,
63 	  "ex",		(char *)&EX },
64 	{ "force",	CHAR,			(READ|WRITE)<<PUBLIC,
65 	  "fo",		(char *)CTRL('p') },
66 	{ "framesize",	NUMBER|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
67 	  "fr",		(char *)&FS },
68 	{ "host",	STRING|IREMOTE|INIT,	READ<<PUBLIC,
69 	  "ho",		(char *)&HO },
70 	{ "log",	STRING|INIT,		(READ|WRITE)<<ROOT,
71 	  NOSTR,	_PATH_ACULOG },
72 	{ "phones",	STRING|INIT|IREMOTE,	READ<<PUBLIC,
73 	  NOSTR,	(char *)&PH },
74 	{ "prompt",	CHAR,			(READ|WRITE)<<PUBLIC,
75 	  "pr",		(char *)'\n' },
76 	{ "raise",	BOOL,			(READ|WRITE)<<PUBLIC,
77 	  "ra",		(char *)FALSE },
78 	{ "raisechar",	CHAR,			(READ|WRITE)<<PUBLIC,
79 	  "rc",		(char *)CTRL('a') },
80 	{ "record",	STRING|INIT|IREMOTE,	(READ|WRITE)<<PUBLIC,
81 	  "rec",	(char *)&RE },
82 	{ "remote",	STRING|INIT|IREMOTE,	READ<<PUBLIC,
83 	  NOSTR,	(char *)&RM },
84 	{ "script",	BOOL,			(READ|WRITE)<<PUBLIC,
85 	  "sc",		(char *)FALSE },
86 	{ "tabexpand",	BOOL,			(READ|WRITE)<<PUBLIC,
87 	  "tab",	(char *)FALSE },
88 	{ "verbose",	BOOL,			(READ|WRITE)<<PUBLIC,
89 	  "verb",	(char *)TRUE },
90 	{ "SHELL",	STRING|ENVIRON|INIT,	(READ|WRITE)<<PUBLIC,
91 	  NULL,		_PATH_BSHELL },
92 	{ "HOME",	STRING|ENVIRON,		(READ|WRITE)<<PUBLIC,
93 	  NOSTR,	NOSTR },
94 	{ "echocheck",	BOOL,			(READ|WRITE)<<PUBLIC,
95 	  "ec",		(char *)FALSE },
96 	{ "disconnect",	STRING|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
97 	  "di",		(char *)&DI },
98 	{ "tandem",	BOOL,			(READ|WRITE)<<PUBLIC,
99 	  "ta",		(char *)TRUE },
100 	{ "linedelay",	NUMBER|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
101 	  "ldelay",	(char *)&DL },
102 	{ "chardelay",	NUMBER|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
103 	  "cdelay",	(char *)&CL },
104 	{ "etimeout",	NUMBER|IREMOTE|INIT,	(READ|WRITE)<<PUBLIC,
105 	  "et",		(char *)&ET },
106 	{ "rawftp",	BOOL,			(READ|WRITE)<<PUBLIC,
107 	  "raw",	(char *)FALSE },
108 	{ "halfduplex",	BOOL,			(READ|WRITE)<<PUBLIC,
109 	  "hdx",	(char *)FALSE },
110 	{ "localecho",	BOOL,			(READ|WRITE)<<PUBLIC,
111 	  "le",		(char *)FALSE },
112 	{ "parity",	STRING|INIT|IREMOTE,	(READ|WRITE)<<PUBLIC,
113 	  "par",	(char *)&PA },
114 	{ "hardwareflow", BOOL,			(READ|WRITE)<<PUBLIC,
115 	  "hf",		(char *)FALSE },
116 	{ NOSTR, 0, 0, NOSTR, NOSTR }
117 };
118