xref: /original-bsd/usr.bin/ex/ex_data.c (revision e6c4134e)
1 /*-
2  * Copyright (c) 1980, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)ex_data.c	8.1 (Berkeley) 06/09/93";
10 #endif /* not lint */
11 
12 #include "ex.h"
13 #include "ex_tty.h"
14 
15 /*
16  * Initialization of option values.
17  * The option #defines in ex_vars.h are made
18  * from this file by the script makeoptions.
19  *
20  * These initializations are done char by char instead of as strings
21  * to confuse xstr so it will leave them alone.
22  */
23 char	direct[ONMSZ] =
24 #ifdef vms
25 	{'t', 'm', 'p', ':'};
26 #else
27 	{'/', 'v', 'a', 'r', '/', 't', 'm', 'p'};
28 #endif
29 char	paragraphs[ONMSZ] = {
30 	'I', 'P', 'L', 'P', 'P', 'P', 'Q', 'P',		/* -ms macros */
31 	'P', ' ', 'L', 'I',				/* -mm macros */
32 	'p', 'p', 'l', 'p', 'i', 'p',			/* -me macros */
33 	'b', 'p'					/* bare nroff */
34 };
35 char	sections[ONMSZ] = {
36 	'N', 'H', 'S', 'H',				/* -ms macros */
37 	'H', ' ', 'H', 'U',				/* -mm macros */
38 	'n', 'h', 's', 'h'				/* -me macros */
39 };
40 char	shell[ONMSZ] =
41 	{ '/', 'b', 'i', 'n', '/', 's', 'h' };
42 char	tags[ONMSZ] = {
43 	't', 'a', 'g', 's', ' ',
44 	'/', 'v', 'a', 'r', '/', 'd', 'b', '/', 'l', 'i', 'b', 'c', '.',
45 	    't', 'a', 'g', 's'
46 };
47 char	ttytype[ONMSZ] =
48 	{ 'd', 'u', 'm', 'b' };
49 
50 short	COLUMNS = 80;
51 short	LINES = 24;
52 
53 struct	option options[NOPTS + 1] = {
54 	"autoindent",	"ai",	ONOFF,		0,	0,	0,
55 	"autoprint",	"ap",	ONOFF,		1,	1,	0,
56 	"autowrite",	"aw",	ONOFF,		0,	0,	0,
57 	"beautify",	"bf",	ONOFF,		0,	0,	0,
58 	"directory",	"dir",	STRING,		0,	0,	direct,
59 	"edcompatible",	"ed",	ONOFF,		0,	0,	0,
60 	"errorbells",	"eb",	ONOFF,		0,	0,	0,
61 	"hardtabs",	"ht",	NUMERIC,	8,	8,	0,
62 	"ignorecase",	"ic",	ONOFF,		0,	0,	0,
63 #ifndef	UNIX_SBRK
64 	"linelimit",	"ll",	NUMERIC,	2000,	2000,	0,
65 #endif
66 	"lisp",		0,	ONOFF,		0,	0,	0,
67 	"list",		0,	ONOFF,		0,	0,	0,
68 	"magic",	0,	ONOFF,		1,	1,	0,
69 	"mesg",		0,	ONOFF,		1,	1,	0,
70 	"modeline",	0,	ONOFF,		0,	0,	0,
71 	"number",	"nu",	ONOFF,		0,	0,	0,
72 	"open",		0,	ONOFF,		1,	1,	0,
73 	"optimize",	"opt",	ONOFF,		0,	0,	0,
74 	"paragraphs",	"para",	STRING,		0,	0,	paragraphs,
75 	"prompt",	0,	ONOFF,		1,	1,	0,
76 	"readonly",	"ro",	ONOFF,		0,	0,	0,
77 	"redraw",	0,	ONOFF,		0,	0,	0,
78 	"remap",	0,	ONOFF,		1,	1,	0,
79 	"report",	0,	NUMERIC,	5,	5,	0,
80 	"scroll",	"scr",	NUMERIC,	12,	12,	0,
81 	"sections",	"sect",	STRING,		0,	0,	sections,
82 	"shell",	"sh",	STRING,		0,	0,	shell,
83 	"shiftwidth",	"sw",	NUMERIC,	TABS,	TABS,	0,
84 	"showmatch",	"sm",	ONOFF,		0,	0,	0,
85 	"slowopen",	"slow",	ONOFF,		0,	0,	0,
86 	"sourceany",	0,	ONOFF,		0,	0,	0,
87 	"tabstop",	"ts",	NUMERIC,	TABS,	TABS,	0,
88 	"taglength",	"tl",	NUMERIC,	0,	0,	0,
89 	"tags",		"tag",	STRING,		0,	0,	tags,
90 	"term",		0,	OTERM,		0,	0,	ttytype,
91 	"terse",	0,	ONOFF,		0,	0,	0,
92 	"timeout",	"to",	ONOFF,		1,	1,	0,
93 	"ttytype",	"tty",	OTERM,		0,	0,	ttytype,
94 	"warn",		0,	ONOFF,		1,	1,	0,
95 	"window",	"wi",	NUMERIC,	23,	23,	0,
96 	"wrapscan",	"ws",	ONOFF,		1,	1,	0,
97 	"wrapmargin",	"wm",	NUMERIC,	0,	0,	0,
98 	"writeany",	"wa",	ONOFF,		0,	0,	0,
99 	0,		0,	0,		0,	0,	0,
100 };
101