Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
99 7u83 1
/*
2
 * This code contains changes by
3
 *      Gunnar Ritter, Freiburg i. Br., Germany, 2002. All rights reserved.
4
 *
5
 * Conditions 1, 2, and 4 and the no-warranty notice below apply
6
 * to these changes.
7
 *
8
 *
9
 * Copyright (c) 1980, 1993
10
 * 	The Regents of the University of California.  All rights reserved.
11
 *
12
 * Redistribution and use in source and binary forms, with or without
13
 * modification, are permitted provided that the following conditions
14
 * are met:
15
 * 1. Redistributions of source code must retain the above copyright
16
 *    notice, this list of conditions and the following disclaimer.
17
 * 2. Redistributions in binary form must reproduce the above copyright
18
 *    notice, this list of conditions and the following disclaimer in the
19
 *    documentation and/or other materials provided with the distribution.
20
 * 3. All advertising materials mentioning features or use of this software
21
 *    must display the following acknowledgement:
22
 * 	This product includes software developed by the University of
23
 * 	California, Berkeley and its contributors.
24
 * 4. Neither the name of the University nor the names of its contributors
25
 *    may be used to endorse or promote products derived from this software
26
 *    without specific prior written permission.
27
 *
28
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38
 * SUCH DAMAGE.
39
 *
40
 *
41
 * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
42
 *
43
 * Redistribution and use in source and binary forms, with or without
44
 * modification, are permitted provided that the following conditions
45
 * are met:
46
 *   Redistributions of source code and documentation must retain the
47
 *    above copyright notice, this list of conditions and the following
48
 *    disclaimer.
49
 *   Redistributions in binary form must reproduce the above copyright
50
 *    notice, this list of conditions and the following disclaimer in the
51
 *    documentation and/or other materials provided with the distribution.
52
 *   All advertising materials mentioning features or use of this software
53
 *    must display the following acknowledgement:
54
 *      This product includes software developed or owned by Caldera
55
 *      International, Inc.
56
 *   Neither the name of Caldera International, Inc. nor the names of
57
 *    other contributors may be used to endorse or promote products
58
 *    derived from this software without specific prior written permission.
59
 *
60
 * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
61
 * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
62
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
63
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
64
 * ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE
65
 * LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
66
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
67
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
68
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
69
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
70
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
71
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
72
 */
73
 
74
#ifndef	lint
75
#ifdef	DOSCCS
76
static char sccsid[] = "@(#)ex_data.c	1.14 (gritter) 11/23/04";
77
#endif
78
#endif
79
 
80
/* from ex_data.c	7.5 (Berkeley) 8/29/85 */
81
 
82
#include "ex.h"
83
#include "ex_tty.h"
84
 
85
/*
86
 * Initialization of option values.
87
 * The option #defines in ex_vars.h are made
88
 * from this file by the script makeoptions.
89
 *
90
 * These initializations are done char by char instead of as strings
91
 * to confuse xstr so it will leave them alone.
92
 */
93
#ifdef	notdef
94
char	direct[ONMSZ] =
95
	{'/', 't', 'm', 'p'}; 
96
#else
97
char	direct[ONMSZ] =
98
	{'/', 'v', 'a', 'r', '/', 't', 'm', 'p' }; 
99
#endif
100
char	paragraphs[ONMSZ] = {
101
	'I', 'P', 'L', 'P', 'P', 'P', 'Q', 'P',		/* -ms macros */
102
	'P', ' ', 'L', 'I',				/* -mm macros */
103
	'p', 'p', 'l', 'p', 'i', 'p',			/* -me macros */
104
	'b', 'p'					/* bare nroff */
105
};
106
char	sections[ONMSZ] = {
107
	'N', 'H', 'S', 'H',				/* -ms macros */
108
	'H', ' ', 'H', 'U',				/* -mm macros */
109
	'n', 'h', 's', 'h'				/* -me macros */
110
};
111
char	shell[ONMSZ] =
112
	{ '/', 'b', 'i', 'n', '/', 's', 'h' };
113
char	tags[ONMSZ] = {
114
	't', 'a', 'g', 's', ' ',
115
	'/', 'u', 's', 'r', '/', 'l', 'i', 'b', '/', 't', 'a', 'g', 's'
116
};
117
char	ttylongname[ONMSZ] =
118
	{ 'd', 'u', 'm', 'b' };
119
 
120
short	TCOLUMNS = 80;
121
short	TLINES = 24;
122
 
123
struct	option options[NOPTS + 1] = {
124
	{ "autoindent",	"ai",	ONOFF,		0,	0,	0, },
125
	{ "autoprint",	"ap",	ONOFF,		1,	1,	0, },
126
	{ "autowrite",	"aw",	ONOFF,		0,	0,	0, },
127
	{ "beautify",	"bf",	ONOFF,		0,	0,	0, },
128
	{ "directory",	"dir",	STRING,		0,	0,	direct, },
129
	{ "edcompatible","ed",	ONOFF,		0,	0,	0, },
130
	{ "errorbells",	"eb",	ONOFF,		0,	0,	0, },
131
	{ "exrc",	"ex",	ONOFF,		0,	0,	0, },
132
	{ "flash",	"fl",	ONOFF,		1,	1,	0, },
133
	{ "hardtabs",	"ht",	NUMERIC,	8,	8,	0, },
134
	{ "ignorecase",	"ic",	ONOFF,		0,	0,	0, },
135
	{ "lisp",	0,	ONOFF,		0,	0,	0, },
136
	{ "list",	0,	ONOFF,		0,	0,	0, },
137
	{ "magic",	0,	ONOFF,		1,	1,	0, },
138
	{ "mesg",	0,	ONOFF,		1,	1,	0, },
139
	{ "modelines",	"ml",	ONOFF,		0,	0,	0, },
140
	{ "number",	"nu",	ONOFF,		0,	0,	0, },
141
	{ "open",	0,	ONOFF,		1,	1,	0, },
142
	{ "optimize",	"opt",	ONOFF,		0,	0,	0, },
143
	{ "paragraphs",	"para",	STRING,		0,	0,	paragraphs, },
144
	{ "prompt",	0,	ONOFF,		1,	1,	0, },
145
	{ "readonly",	"ro",	ONOFF,		0,	0,	0, },
146
	{ "redraw",	0,	ONOFF,		0,	0,	0, },
147
	{ "remap",	0,	ONOFF,		1,	1,	0, },
148
	{ "report",	0,	NUMERIC,	5,	5,	0, },
149
	{ "scroll",	"scr",	NUMERIC,	12,	12,	0, },
150
	{ "sections",	"sect",	STRING,		0,	0,	sections, },
151
	{ "shell",	"sh",	STRING,		0,	0,	shell, },
152
	{ "shiftwidth",	"sw",	NUMERIC,	TABS,	TABS,	0, },
153
	{ "showmatch",	"sm",	ONOFF,		0,	0,	0, },
154
	{ "showmode",	"smd",	ONOFF,		0,	0,	0, },
155
	{ "slowopen",	"slow",	ONOFF,		0,	0,	0, },
156
	{ "sourceany",	0,	ONOFF,		0,	0,	0, },
157
	{ "tabstop",	"ts",	NUMERIC,	TABS,	TABS,	0, },
158
	{ "taglength",	"tl",	NUMERIC,	0,	0,	0, },
159
	{ "tags",	"tag",	STRING,		0,	0,	tags, },
160
	{ "term",	0,	OTERM,		0,	0,	ttylongname, },
161
	{ "terse",	0,	ONOFF,		0,	0,	0, },
162
	{ "timeout",	"to",	ONOFF,		1,	1,	0, },
163
	{ "ttytype",	"tty",	OTERM,		0,	0,	ttylongname, },
164
	{ "warn",	0,	ONOFF,		1,	1,	0, },
165
	{ "window",	"wi",	NUMERIC,	23,	23,	0, },
166
	{ "wrapscan",	"ws",	ONOFF,		1,	1,	0, },
167
	{ "wrapmargin",	"wm",	NUMERIC,	0,	0,	0, },
168
	{ "writeany",	"wa",	ONOFF,		0,	0,	0, },
169
	{ 0,		0,	0,		0,	0,	0, }
170
};