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., 51 Franklin Street, Fifth Floor, 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) ;
142 void done_settings(void) ;
144 /* Whether pspp can erase and overwrite files */
145 int safer_mode(void);
147 /* Put into safer mode */
148 void make_safe(void);
150 /* The character used for a decimal point: ',' or '.'. Only respected
151 for data input and output. */
152 char get_decimal(void);
154 /* The character used for grouping in numbers: '.' or ','; the
155 opposite of set_decimal. Only used in COMMA data input and
158 char get_grouping(void);
160 char *get_prompt(void);
162 /* Prompt used for lines between BEGIN DATA and END DATA. */
163 char *get_dprompt(void);
165 /* Continuation prompt. */
166 char *get_cprompt(void);
169 /* Whether we echo commands to the listing file/printer;*/
172 /* What year to use as the start of the epoch. */
173 int get_epoch (void);
175 /* If echo is on, whether commands from include files are echoed */
176 int get_include(void);
178 /* Whether an error stops execution; */
179 int get_errorbreak(void);
181 /* Whether save files should be compressed by default. */
182 int get_scompression(void);
184 /* Whether to warn on undefined values in numeric data. */
185 int get_undefined(void);
187 /* Maximum number of warnings + errors. */
188 int get_mxwarns(void);
190 /* Maximum number of errors. */
191 int get_mxerrs(void);
193 /* 0=macro expansion is disabled, 1=macro expansion is enabled. */
194 int get_mexpand(void);
196 /* Whether commands are written to the display */
197 int get_printback(void);
199 /* Independent of get_printback, controls whether the commands
200 generated by macro invocations are displayed. */
201 int get_mprint(void);
203 /* Implied limit of unbounded loop. */
204 int get_mxloops(void);
206 /* Whether a blank line is a command terminator */
207 int get_nullline(void);
209 /* The character used to terminate commands. */
210 unsigned char get_endcmd(void);
212 /* Approximate maximum amount of memory to use for cases, in
214 size_t get_max_workspace(void);
216 /* The value that blank numeric fields are set to when read in;
218 double get_blanks(void);
221 /* Default format for variables created by transformations and by DATA
223 struct fmt_spec get_format(void);
225 /* CCA through CCE. */
226 const struct set_cust_currency *get_cc(int i);
228 #if !USE_INTERNAL_PAGER
229 /* Name of the pager program. */
230 const char *get_pager(void);
231 #endif /* !USE_INTERNAL_PAGER */
234 #include <gsl/gsl_rng.h>
235 gsl_rng *get_rng (void);
238 enum {ENHANCED,COMPATIBLE};
241 /* Set the algorithm option globally */
242 void set_algorithm(int x);
244 /* Set the algorithm option for this command only */
245 void set_cmd_algorithm(int x);
247 /* Unset the algorithm option for this command */
248 void unset_cmd_algorithm(void);
250 /* Return the current algorithm setting */
251 int get_algorithm(void);
253 /* Set the syntax option */
254 void set_syntax(int x);
256 /* Get the current syntax setting */
257 int get_syntax(void);
260 #endif /* !settings_h */