1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 1997-9, 2000, 2006, 2009, 2010 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 #include "data/format.h"
24 #include "libpspp/float-format.h"
25 #include "libpspp/integer-format.h"
26 #include "libpspp/message.h"
31 void settings_init (int *, int *);
32 void settings_done (void);
34 enum float_format settings_get_input_float_format (void);
35 void settings_set_input_float_format ( enum float_format);
37 /* Returns the integer format used for IB and PIB input. */
38 enum integer_format settings_get_input_integer_format (void);
40 /* Sets the integer format used for IB and PIB input to
42 void settings_set_input_integer_format ( enum integer_format);
45 /* Returns the current output integer format. */
46 enum integer_format settings_get_output_integer_format (void);
48 /* Sets the output integer format to INTEGER_FORMAT. */
49 void settings_set_output_integer_format (enum integer_format integer_format);
51 /* Returns the current output float format. */
52 enum float_format settings_get_output_float_format (void);
54 /* Sets the output float format to FLOAT_FORMAT. */
55 void settings_set_output_float_format (enum float_format float_format);
59 int settings_get_viewlength (void);
60 void settings_set_viewlength ( int);
62 int settings_get_viewwidth (void);
63 void settings_set_viewwidth ( int);
65 bool settings_get_safer_mode (void);
66 void settings_set_safer_mode (void);
68 bool settings_get_include (void);
69 void settings_set_include ( bool);
71 int settings_get_epoch (void);
72 void settings_set_epoch ( int);
74 bool settings_get_scompression (void);
75 void settings_set_scompression (bool);
77 bool settings_get_undefined (void);
78 void settings_set_undefined (bool);
79 double settings_get_blanks (void);
80 void settings_set_blanks (double);
82 int settings_get_max_messages (enum msg_severity);
83 void settings_set_max_messages (enum msg_severity, int max);
85 bool settings_get_mprint (void);
86 void settings_set_mprint (bool);
88 int settings_get_mxloops (void);
89 void settings_set_mxloops ( int);
91 bool settings_get_nulline (void);
92 void settings_set_nulline (bool);
94 char settings_get_endcmd (void);
95 void settings_set_endcmd (char);
97 size_t settings_get_workspace (void);
98 size_t settings_get_workspace_cases (const struct caseproto *);
99 void settings_set_workspace (size_t);
101 const struct fmt_spec *settings_get_format (void);
102 void settings_set_format ( const struct fmt_spec *);
104 bool settings_get_testing_mode (void);
105 void settings_set_testing_mode (bool);
108 ENHANCED, /* Use improved PSPP behavior. */
109 COMPATIBLE /* Be as compatible as possible. */
112 enum behavior_mode settings_get_algorithm (void);
113 void settings_set_algorithm (enum behavior_mode);
114 enum behavior_mode settings_get_syntax (void);
115 void settings_set_syntax (enum behavior_mode);
117 void settings_set_cmd_algorithm (enum behavior_mode);
118 void unset_cmd_algorithm (void);
121 bool settings_set_cc (const char *cc_string, enum fmt_type type);
123 int settings_get_decimal_char (enum fmt_type type);
124 void settings_set_decimal_char (char decimal);
127 const struct fmt_number_style * settings_get_style (enum fmt_type type);
129 char * settings_dollar_template (const struct fmt_spec *fmt);
131 /* Routing of different kinds of output. */
132 enum settings_output_devices
134 SETTINGS_DEVICE_LISTING = 1 << 0, /* File or device. */
135 SETTINGS_DEVICE_TERMINAL = 1 << 1, /* Screen. */
136 SETTINGS_DEVICE_UNFILTERED = 1 << 2 /* Gets all output, no filtering. */
139 enum settings_output_type
141 SETTINGS_OUTPUT_ERROR, /* Errors and warnings. */
142 SETTINGS_OUTPUT_NOTE, /* Notes. */
143 SETTINGS_OUTPUT_SYNTAX, /* Syntax. */
144 SETTINGS_OUTPUT_RESULT, /* Everything else. */
145 SETTINGS_N_OUTPUT_TYPES
148 void settings_set_output_routing (enum settings_output_type,
149 enum settings_output_devices);
150 enum settings_output_devices settings_get_output_routing (
151 enum settings_output_type);
153 #endif /* !settings_h */