Completely rewrite src/data/format.[ch], to achieve better
[pspp-builds.git] / src / data / settings.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 1997-9, 2000, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA
18    02110-1301, USA. */
19
20 #if !settings_h
21 #define settings_h 1
22
23 #include <stdbool.h>
24 #include <stddef.h>
25
26 /* Types of routing. */
27 enum
28   {
29     SET_ROUTE_SCREEN = 001,     /* Output to screen devices? */
30     SET_ROUTE_LISTING = 002,    /* Output to listing devices? */
31     SET_ROUTE_OTHER = 004,      /* Output to other devices? */
32     SET_ROUTE_DISABLE = 010     /* Disable output--overrides all other bits. */
33   };
34
35 void settings_init (void);
36 void settings_done (void);
37
38 void force_long_view (void);
39 int get_viewlength (void);
40 void set_viewlength (int);
41
42 int get_viewwidth (void);
43 void set_viewwidth (int);
44
45 bool get_safer_mode (void);
46 void set_safer_mode (void);
47
48 bool get_echo (void);
49 void set_echo (bool);
50 bool get_include (void);
51 void set_include (bool);
52
53 int get_epoch (void);
54 void set_epoch (int);
55
56 bool get_errorbreak (void);
57 void set_errorbreak (bool);
58
59 bool get_scompression (void);
60 void set_scompression (bool);
61
62 bool get_undefined (void);
63 void set_undefined (bool);
64 double get_blanks (void);
65 void set_blanks (double);
66
67 int get_mxwarns (void);
68 void set_mxwarns (int);
69 int get_mxerrs (void);
70 void set_mxerrs (int);
71
72 bool get_printback (void);
73 void set_printback (bool);
74 bool get_mprint (void);
75 void set_mprint (bool);
76
77 int get_mxloops (void);
78 void set_mxloops (int);
79
80 bool get_nulline (void);
81 void set_nulline (bool);
82
83 char get_endcmd (void);
84 void set_endcmd (char);
85
86 size_t get_workspace (void);
87 void set_workspace (size_t);
88
89 const struct fmt_spec *get_format (void);
90 void set_format (const struct fmt_spec *);
91
92 bool get_testing_mode (void);
93 void set_testing_mode (bool);
94
95 enum behavior_mode {
96   ENHANCED,             /* Use improved PSPP behavior. */
97   COMPATIBLE            /* Be as compatible as possible. */
98 };
99
100 enum behavior_mode get_algorithm (void);
101 void set_algorithm (enum behavior_mode);
102 enum behavior_mode get_syntax (void);
103 void set_syntax(enum behavior_mode);
104 void set_cmd_algorithm (enum behavior_mode);
105 void unset_cmd_algorithm (void);
106
107 #endif /* !settings_h */