Beginning of VFM cleanup.
[pspp-builds.git] / src / settings.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3    Written by Ben Pfaff <blp@gnu.org>.
4
5    This program is free software; you can redistribute it and/or
6    modify it under the terms of the GNU General Public License as
7    published by the Free Software Foundation; either version 2 of the
8    License, or (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful, but
11    WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software
17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18    02111-1307, USA. */
19
20 #if !settings_h
21 #define settings_h 1
22
23 /* Table of mode settings (x=X, w=Windows, p=PC+, f=has relevance for
24    PSPP):
25
26    AUTOMENU: p
27    BEEP: p
28    BLANKS: xwpf
29    BLKSIZE: x (only on SHOW, not on SET)
30    BLOCK: xwp
31    BOX/BOXSTRING: xwp
32    BUFNO: x (only on SHOW, not on SET)
33    CASE: xw
34    CCA...CCE: xwf
35    COLOR: p
36    COMP/COMPRESSION: xwpf (meaning varies between p and xw)
37    CPI: xwp
38    CPROMPT: pf
39    DECIMAL: wf
40    DPROMPT: f
41    ECHO: pf
42    EJECT: p
43    EMULATION: f
44    ENDCMD: xpf
45    ERRORBREAK: pf
46    ERRORS: wf
47    FORMAT: xwf
48    HEADERS: xwf
49    HELPWINDOWS: p
50    HIGHRES: w
51    HISTOGRAM: xp
52    INCLUDE: pf
53    JOURNAL: wf (equivalent to LOG)
54    LENGTH: xwp
55    LISTING: xpf
56    LOG: pf (equivalent to JOURNAL)
57    LOWRES: w
58    LPI: xwp
59    MENUS: p
60    MESSAGES: wf
61    MEXPAND: xwf
62    MITERATE: xwf
63    MNEST: xwf
64    MORE: pf
65    MPRINT: xwf
66    MXERRS: xf
67    MXLOOPS: xwf
68    MXMEMORY: w
69    MXWARNS: xwf
70    N: xw (only on SHOW, not on SET)
71    NULLINE: xpf
72    NUMBERED: x (only on SHOW, not on SET)
73    PAGER: f
74    PRINTBACK: xwf
75    PRINTER: pf
76    PROMPT: pf
77    PTRANSLATE: p
78    RCOLOR: p
79    RESULTS: wpf (semantics differ)
80    RUNREVIEW: p
81    SCOMP/SCOMPRESSION: xwf
82    SCREEN: pf
83    SCRIPTTAB: xw
84    SEED: xwpf (semantics differ)
85    SYSMIS: xwf (only on SHOW, not on SET)
86    TBFONTS: xw
87    TB1: xw
88    TB2: x
89    UNDEFINED: xwf
90    VIEWLENGTH: pf
91    VIEWWIDTH: f
92    WEIGHT: xwf (only on SHOW, not on SET)
93    WIDTH: xwp
94    WORKDEV: p
95    WORKSPACE: w
96    XSORT: x
97    $VARS: wf (only on SHOW, not on SET)
98
99  */
100
101 #include <stddef.h>
102 #include <float.h>
103
104 /* The value that blank numeric fields are set to when read in;
105    normally SYSMIS. */
106 extern double set_blanks;
107
108 /* Describes one custom currency specification. */
109 struct set_cust_currency
110   {
111     char buf[32];               /* Buffer for strings. */
112     char *neg_prefix;           /* Negative prefix. */
113     char *prefix;               /* Prefix. */
114     char *suffix;               /* Suffix. */
115     char *neg_suffix;           /* Negative suffix. */
116     int decimal;                /* Decimal point. */
117     int grouping;               /* Grouping character. */
118   };
119
120 /* CCA through CCE. */
121 extern struct set_cust_currency set_cc[5];
122
123 /* Whether the active file should be compressed. */
124 extern int set_compression;
125
126 /* Characters per inch (horizontal). */
127 extern int set_cpi;
128
129 /* Continuation prompt. */
130 extern char *set_cprompt;
131
132 /* The character used for a decimal point: ',' or '.'.  Only respected
133    for data input and output. */
134 extern int set_decimal;
135
136 /* The character used for grouping in numbers: '.' or ','; the
137    opposite of set_decimal.  Only used in COMMA data input and
138    output. */
139 extern int set_grouping;
140
141 /* Prompt used for lines between BEGIN DATA and END DATA. */
142 extern char *set_dprompt;
143
144 /* Whether we echo commands to the listing file/printer; 0=no, 1=yes. */
145 extern int set_echo;
146
147 /* The character used to terminate commands. */
148 extern int set_endcmd;
149
150 /* Types of routing. */
151 enum
152   {
153     SET_ROUTE_SCREEN = 001,     /* Output to screen devices? */
154     SET_ROUTE_LISTING = 002,    /* Output to listing devices? */
155     SET_ROUTE_OTHER = 004,      /* Output to other devices? */
156     SET_ROUTE_DISABLE = 010     /* Disable output--overrides all other bits. */
157   };
158
159 /* Routing for errors, messages, and procedure results. */
160 extern int set_errors, set_messages, set_results;
161
162 /* Whether an error stops execution; 0=no, 1=yes. */
163 extern int set_errorbreak;
164
165 /* Default format for variables created by transformations and by DATA
166    LIST {FREE,LIST}. */
167 extern struct fmt_spec set_format;
168
169 /* I don't know what this setting means; 0=no, 1=yes, 2=blank. */
170 extern int set_headers;
171
172 /* If set_echo is on, whether commands from include files are echoed;
173  * 0=no, 1=yes. */
174 extern int set_include;
175
176 /* Journal file's name. */
177 extern char *set_journal;
178
179 /* Whether we're journaling. */
180 extern int set_journaling;
181
182 /* Lines per inch (vertical). */
183 extern int set_lpi;
184
185 /* 0=macro expansion is disabled, 1=macro expansion is enabled. */
186 extern int set_mexpand;
187
188 /* Maximum number of iterations in a macro loop. */
189 extern int set_miterate;
190
191 /* Maximum nesting level for macros. */
192 extern int set_mnest;
193
194 /* Whether we pause after each screen of output; 0=no, 1=yes. */
195 extern int set_more;
196
197 /* Independent of set_printback, controls whether the commands
198    generated by macro invocations are displayed. */
199 extern int set_mprint;
200
201 /* Maximum number of errors. */
202 extern int set_mxerrs;
203
204 /* Implied limit of unbounded loop. */
205 extern int set_mxloops;
206
207 /* Maximum number of warnings + errors. */
208 extern int set_mxwarns;
209
210 /* Whether a blank line is a command terminator; 0=no, 1=yes. */
211 extern int set_nullline;
212
213 /* Whether commands are written to the display; 0=off, 1=on. */
214 extern int set_printback;
215
216 #if !USE_INTERNAL_PAGER
217 /* Name of the pager program. */
218 extern char *set_pager;
219 #endif /* !USE_INTERNAL_PAGER */
220
221 /* The command prompt. */
222 extern char *set_prompt;
223
224 /* Name of the results file. */
225 extern char *set_results_file;
226
227 /* Whether to allow certain unsafe operations.  Cannot be unset after
228    it is set. */
229 extern int set_safer;
230
231 /* Whether save files should be compressed by default. */
232 extern int set_scompression;
233
234 /* The random number seed; NOT_LONG if we want a "random" random
235    number seed.  */
236 extern long set_seed;
237
238 /* 1=The user has modified or made use of the random number seed. */
239 extern int set_seed_used;
240
241 /* 1=Turn on some heuristics that make testing PSPP for correct
242    workings a little easier. */
243 extern int set_testing_mode;
244
245 /* Whether to warn on undefined values in numeric data. */
246 extern int set_undefined;
247
248 /* Requested "view length" in lines. */
249 extern int set_viewlength;
250
251 /* Screen width. */
252 extern int set_viewwidth;
253
254 /* Approximate maximum amount of memory to use for cases, in
255    bytes. */
256 extern size_t set_max_workspace;
257
258 #endif /* !settings_h */