vars.c revision 161754
11541Srgrimes/* $OpenBSD: vars.c,v 1.8 2006/08/18 03:06:18 jason Exp $ */ 21541Srgrimes/* $NetBSD: vars.c,v 1.3 1994/12/08 09:31:19 jtc Exp $ */ 31541Srgrimes 41541Srgrimes/* 51541Srgrimes * Copyright (c) 1983, 1993 61541Srgrimes * The Regents of the University of California. All rights reserved. 71541Srgrimes * 81541Srgrimes * Redistribution and use in source and binary forms, with or without 91541Srgrimes * modification, are permitted provided that the following conditions 101541Srgrimes * are met: 111541Srgrimes * 1. Redistributions of source code must retain the above copyright 121541Srgrimes * notice, this list of conditions and the following disclaimer. 131541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 141541Srgrimes * notice, this list of conditions and the following disclaimer in the 151541Srgrimes * documentation and/or other materials provided with the distribution. 161541Srgrimes * 3. Neither the name of the University nor the names of its contributors 171541Srgrimes * may be used to endorse or promote products derived from this software 181541Srgrimes * without specific prior written permission. 191541Srgrimes * 201541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 211541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 221541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 231541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 241541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 251541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 261541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 271541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 281541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 291541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 301541Srgrimes * SUCH DAMAGE. 311541Srgrimes */ 321541Srgrimes 331541Srgrimes#include <sys/cdefs.h> 341541Srgrimes__FBSDID("$FreeBSD: head/usr.bin/tip/tip/vars.c 161754 2006-08-31 14:14:30Z ru $"); 351541Srgrimes 361541Srgrimes#ifndef lint 371541Srgrimes#if 0 381541Srgrimesstatic char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93"; 3921673Sjkhstatic const char rcsid[] = "$OpenBSD: vars.c,v 1.8 2006/08/18 03:06:18 jason Exp $"; 401541Srgrimes#endif 411541Srgrimes#endif /* not lint */ 4213203Swollman 4313203Swollman#include "tip.h" 441541Srgrimes#include "pathnames.h" 452112Swollman 461541Srgrimes/* 471541Srgrimes * Definition of variables 481541Srgrimes */ 491541Srgrimesvalue_t vtable[] = { 501541Srgrimes { "beautify", BOOL, (READ|WRITE)<<PUBLIC, 511541Srgrimes "be", (char *)TRUE }, 521541Srgrimes { "baudrate", NUMBER|IREMOTE|INIT, (READ<<PUBLIC)|(WRITE<<ROOT), 531541Srgrimes "ba", (char *)&BR }, 541541Srgrimes { "dialtimeout",NUMBER, (READ<<PUBLIC)|(WRITE<<ROOT), 551541Srgrimes "dial", (char *)60 }, 561541Srgrimes { "eofread", STRING|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 571541Srgrimes "eofr", (char *)&IE }, 581541Srgrimes { "eofwrite", STRING|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 591541Srgrimes "eofw", (char *)&OE }, 601541Srgrimes { "eol", STRING|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 611541Srgrimes NOSTR, (char *)&EL }, 621541Srgrimes { "escape", CHAR, (READ|WRITE)<<PUBLIC, 631541Srgrimes "es", (char *)'~' }, 641541Srgrimes { "exceptions", STRING|INIT|IREMOTE, (READ|WRITE)<<PUBLIC, 651541Srgrimes "ex", (char *)&EX }, 661541Srgrimes { "force", CHAR, (READ|WRITE)<<PUBLIC, 671541Srgrimes "fo", (char *)CTRL('p') }, 681541Srgrimes { "framesize", NUMBER|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 691541Srgrimes "fr", (char *)&FS }, 701541Srgrimes { "host", STRING|IREMOTE|INIT, READ<<PUBLIC, 711541Srgrimes "ho", (char *)&HO }, 721541Srgrimes { "log", STRING|INIT, (READ|WRITE)<<ROOT, 731541Srgrimes NOSTR, _PATH_ACULOG }, 741541Srgrimes { "phones", STRING|INIT|IREMOTE, READ<<PUBLIC, 751541Srgrimes NOSTR, (char *)&PH }, 761541Srgrimes { "prompt", CHAR, (READ|WRITE)<<PUBLIC, 771541Srgrimes "pr", (char *)'\n' }, 781541Srgrimes { "raise", BOOL, (READ|WRITE)<<PUBLIC, 791541Srgrimes "ra", (char *)FALSE }, 801541Srgrimes { "raisechar", CHAR, (READ|WRITE)<<PUBLIC, 811541Srgrimes "rc", NOSTR }, 821541Srgrimes { "record", STRING|INIT|IREMOTE, (READ|WRITE)<<PUBLIC, 831541Srgrimes "rec", (char *)&RE }, 841541Srgrimes { "remote", STRING|INIT|IREMOTE, READ<<PUBLIC, 851541Srgrimes NOSTR, (char *)&RM }, 861541Srgrimes { "script", BOOL, (READ|WRITE)<<PUBLIC, 871541Srgrimes "sc", (char *)FALSE }, 881541Srgrimes { "tabexpand", BOOL, (READ|WRITE)<<PUBLIC, 891541Srgrimes "tab", (char *)FALSE }, 901541Srgrimes { "verbose", BOOL, (READ|WRITE)<<PUBLIC, 9122521Sdyson "verb", (char *)TRUE }, 921541Srgrimes { "SHELL", STRING|ENVIRON|INIT, (READ|WRITE)<<PUBLIC, 931541Srgrimes NULL, _PATH_BSHELL }, 941541Srgrimes { "HOME", STRING|ENVIRON, (READ|WRITE)<<PUBLIC, 951541Srgrimes NOSTR, NOSTR }, 961541Srgrimes { "echocheck", BOOL, (READ|WRITE)<<PUBLIC, 971541Srgrimes "ec", (char *)FALSE }, 981541Srgrimes { "disconnect", STRING|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 991541Srgrimes "di", (char *)&DI }, 1001541Srgrimes { "tandem", BOOL, (READ|WRITE)<<PUBLIC, 1011541Srgrimes "ta", (char *)TRUE }, 1021541Srgrimes { "linedelay", NUMBER|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 1031541Srgrimes "ldelay", (char *)&DL }, 1041541Srgrimes { "chardelay", NUMBER|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 1051541Srgrimes "cdelay", (char *)&CL }, 1061541Srgrimes { "etimeout", NUMBER|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 1071541Srgrimes "et", (char *)&ET }, 1081541Srgrimes { "rawftp", BOOL, (READ|WRITE)<<PUBLIC, 1091541Srgrimes "raw", (char *)FALSE }, 1101541Srgrimes { "halfduplex", BOOL, (READ|WRITE)<<PUBLIC, 1111541Srgrimes "hdx", (char *)FALSE }, 1122142Sdg { "localecho", BOOL, (READ|WRITE)<<PUBLIC, 1131541Srgrimes "le", (char *)FALSE }, 1141541Srgrimes { "parity", STRING|INIT|IREMOTE, (READ|WRITE)<<PUBLIC, 1152142Sdg "par", (char *)&PA }, 11620069Sbde { "hardwareflow", BOOL, (READ|WRITE)<<PUBLIC, 11720069Sbde "hf", (char *)FALSE }, 11820069Sbde { "linedisc", NUMBER|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, 11920069Sbde "ld", (char *)&LD }, 12020069Sbde { "direct", BOOL, (READ<<PUBLIC)|(WRITE<<ROOT), 12120069Sbde "dc", (char *)FALSE }, 12220069Sbde { NOSTR, 0, 0, 1231541Srgrimes NOSTR, NOSTR } 1241541Srgrimes}; 1251541Srgrimes