1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3 Written by Ben Pfaff <blp@gnu.org>.
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.
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.
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
23 /* Table of mode settings (x=X, w=Windows, p=PC+, f=has relevance for
29 BLKSIZE: x (only on SHOW, not on SET)
32 BUFNO: x (only on SHOW, not on SET)
36 COMP/COMPRESSION: xwpf (meaning varies between p and xw)
53 JOURNAL: wf (equivalent to LOG)
56 LOG: pf (equivalent to JOURNAL)
70 N: xw (only on SHOW, not on SET)
72 NUMBERED: x (only on SHOW, not on SET)
79 RESULTS: wpf (semantics differ)
81 SCOMP/SCOMPRESSION: xwf
84 SEED: xwpf (semantics differ)
85 SYSMIS: xwf (only on SHOW, not on SET)
92 WEIGHT: xwf (only on SHOW, not on SET)
97 $VARS: wf (only on SHOW, not on SET)
105 /* Describes one custom currency specification. */
106 struct set_cust_currency
108 char buf[32]; /* Buffer for strings. */
109 char *neg_prefix; /* Negative prefix. */
110 char *prefix; /* Prefix. */
111 char *suffix; /* Suffix. */
112 char *neg_suffix; /* Negative suffix. */
113 int decimal; /* Decimal point. */
114 int grouping; /* Grouping character. */
120 /* Types of routing. */
123 SET_ROUTE_SCREEN = 001, /* Output to screen devices? */
124 SET_ROUTE_LISTING = 002, /* Output to listing devices? */
125 SET_ROUTE_OTHER = 004, /* Output to other devices? */
126 SET_ROUTE_DISABLE = 010 /* Disable output--overrides all other bits. */
130 /* Set view width to a very long value, and prevent it from
132 void force_long_view(void);
135 /* Requested "view length" in lines. */
136 int get_viewlength(void);
139 int get_viewwidth(void);
141 void init_settings(void) ;
143 /* Whether pspp can erase and overwrite files */
144 int safer_mode(void);
146 /* Put into safer mode */
147 void make_safe(void);
149 /* The character used for a decimal point: ',' or '.'. Only respected
150 for data input and output. */
151 char get_decimal(void);
153 /* The character used for grouping in numbers: '.' or ','; the
154 opposite of set_decimal. Only used in COMMA data input and
157 char get_grouping(void);
159 char *get_prompt(void);
161 /* Prompt used for lines between BEGIN DATA and END DATA. */
162 char *get_dprompt(void);
164 /* Continuation prompt. */
165 char *get_cprompt(void);
168 /* Whether we echo commands to the listing file/printer;*/
171 /* If echo is on, whether commands from include files are echoed */
172 int get_include(void);
174 /* Whether an error stops execution; */
175 int get_errorbreak(void);
177 /* Whether save files should be compressed by default. */
178 int get_scompression(void);
180 /* Whether to warn on undefined values in numeric data. */
181 int get_undefined(void);
183 /* Maximum number of warnings + errors. */
184 int get_mxwarns(void);
186 /* Maximum number of errors. */
187 int get_mxerrs(void);
189 /* 0=macro expansion is disabled, 1=macro expansion is enabled. */
190 int get_mexpand(void);
192 /* Whether commands are written to the display */
193 int get_printback(void);
195 /* Independent of get_printback, controls whether the commands
196 generated by macro invocations are displayed. */
197 int get_mprint(void);
199 /* Implied limit of unbounded loop. */
200 int get_mxloops(void);
202 /* Whether a blank line is a command terminator */
203 int get_nullline(void);
205 /* The character used to terminate commands. */
206 unsigned char get_endcmd(void);
208 /* Approximate maximum amount of memory to use for cases, in
210 size_t get_max_workspace(void);
212 /* The value that blank numeric fields are set to when read in;
214 double get_blanks(void);
217 /* Default format for variables created by transformations and by DATA
219 struct fmt_spec get_format(void);
221 /* CCA through CCE. */
222 const struct set_cust_currency *get_cc(int i);
224 #if !USE_INTERNAL_PAGER
225 /* Name of the pager program. */
226 const char *get_pager(void);
227 #endif /* !USE_INTERNAL_PAGER */
230 /* Return 1 if the seed has been set since the last time this function
232 Fill the value pointed to by seed with the seed .
234 int seed_is_set(unsigned long *seed);
237 enum {ENHANCED,COMPATIBLE};
240 /* Set the algorithm option globally */
241 void set_algorithm(int x);
243 /* Set the algorithm option for this command only */
244 void set_cmd_algorithm(int x);
246 /* Unset the algorithm option for this command */
247 void unset_cmd_algorithm(void);
249 /* Return the current algorithm setting */
250 int get_algorithm(void);
252 /* Set the syntax option */
253 void set_syntax(int x);
255 /* Get the current syntax setting */
256 int get_syntax(void);
259 #endif /* !settings_h */