These functions construct @struct{fmt_spec}s and verify that they are
valid.
+
+
@deftypefun {struct fmt_spec} fmt_for_input (enum fmt_type @var{type}, int @var{w}, int @var{d})
@deftypefunx {struct fmt_spec} fmt_for_output (enum fmt_type @var{type}, int @var{w}, int @var{d})
Constructs a @struct{fmt_spec} with the given @var{type}, @var{w}, and
output format specifier.
@end deftypefun
+@deftypefun void fmt_resize (struct fmt_spec *@var{fmt}, int @var{width})
+Sets the width of @var{fmt} to a valid format for a @union{value} of size @var{width}.
+@end deftypefun
+
@node Obtaining Properties of Format Types
@subsection Obtaining Properties of Format Types
The following functions are provided for working with numeric
formatting styles.
-@deftypefun {struct fmt_number_style *} fmt_number_style_create (void)
-Creates and returns a new @struct{fmt_number_style} with all of the
+@deftypefun void fmt_number_style_init (struct fmt_number_style *@var{style})
+Initialises a @struct{fmt_number_style} with all of the
prefixes and suffixes set to the empty string, @samp{.} as the decimal
point character, and grouping disables.
@end deftypefun
+
@deftypefun void fmt_number_style_destroy (struct fmt_number_style *@var{style})
Destroys @var{style}, freeing its storage.
@end deftypefun
+@deftypefun {struct fmt_number_style} *fmt_create (void)
+A function which creates an array of all the styles used by pspp, and
+calls fmt_number_style_init on each of them.
+@end deftypefun
+
+@deftypefun void fmt_done (struct fmt_number_style *@var{styles})
+A wrapper function which takes an array of @struct{fmt_number_style}, calls
+fmt_number_style_destroy on each of them, and then frees the array.
+@end deftypefun
+
+
+
@deftypefun int fmt_affix_width (const struct fmt_number_style *@var{style})
Returns the total length of @var{style}'s @code{prefix} and @code{suffix}.
@end deftypefun
Returns the numeric style for the given format @var{type}.
@end deftypefun
-@deftypefun void fmt_set_style (enum fmt_type @var{type}, struct fmt_number_style *@var{style})
-Replaces the current numeric style for format @var{type} by the given
-@var{style}, which becomes owned by the callee. @var{type} must be a
-custom currency format and @var{style} must follow all the rules for
-numeric styles explained above.
+@deftypefun void fmt_check_style (const struct fmt_number_style *@var{style})
+Asserts that style is self consistent.
@end deftypefun
-@deftypefun int fmt_decimal_char (enum fmt_type @var{type})
-Returns the decimal point character for the given format @var{type}.
-Equivalent to @code{fmt_get_style (@var{type})->decimal}.
-@end deftypefun
-@deftypefun int fmt_grouping_char (enum fmt_type @var{type})
-Returns the grouping character for the given format @var{type}, or 0
-if @var{type} output should not be grouped. Equivalent to
-@code{fmt_get_style (@var{type})->grouping}.
+@deftypefun {const char *} fmt_name (enum fmt_type @var{type})
+Returns the name of the given format @var{type}.
@end deftypefun
-@deftypefun void fmt_set_decimal (char @var{decimal})
-Changes the decimal point character for the basic numeric formats to
-@var{decimal}, which must be @samp{.} or @samp{,}. The F, E, COMMA,
-DOLLAR, and PCT will use the specified decimal point character, and the
-opposite character for grouping where appropriate. The DOT format
-uses the reverse choices.
-@end deftypefun
+
@node Formatted Data Input and Output
@subsection Formatted Data Input and Output
@code{MAX_SHORT_STRING} or less, false otherwise.
@end deftypefun
-@deftypefun bool var_is_long_string (const struct variable *var{var})
+@deftypefun bool var_is_long_string (const struct variable *@var{var})
Returns true if @var{var} is a string variable of width greater than
@code{MAX_SHORT_STRING}, false otherwise.
@end deftypefun
msgstr ""
"Project-Id-Version: PSPP 0.4.3\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2008-01-10 11:14+0900\n"
+"POT-Creation-Date: 2008-01-19 15:35+0900\n"
"PO-Revision-Date: 2006-07-28 19:32+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: German <pspp-dev@gnu.org>\n"
msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
msgstr ""
-#: src/data/casereader-filter.c:221
-msgid ""
-"At least one case in the data read had a weight value that was user-missing, "
-"system-missing, zero, or negative. These case(s) were ignored."
-msgstr ""
-
#: src/data/case-tmpfile.c:57
msgid "failed to create temporary file"
msgstr ""
msgid "writing to temporary file"
msgstr ""
-#: src/data/data-in.c:287 src/data/data-in.c:477
+#: src/data/casereader-filter.c:221
+msgid ""
+"At least one case in the data read had a weight value that was user-missing, "
+"system-missing, zero, or negative. These case(s) were ignored."
+msgstr ""
+
+#: src/data/data-in.c:254 src/data/data-in.c:444
msgid "Field contents are not numeric."
msgstr ""
-#: src/data/data-in.c:289 src/data/data-in.c:479
+#: src/data/data-in.c:256 src/data/data-in.c:446
msgid "Number followed by garbage."
msgstr ""
-#: src/data/data-in.c:300
+#: src/data/data-in.c:267
msgid "Invalid numeric syntax."
msgstr ""
-#: src/data/data-in.c:309 src/data/data-in.c:492
+#: src/data/data-in.c:276 src/data/data-in.c:459
msgid "Too-large number set to system-missing."
msgstr ""
-#: src/data/data-in.c:314 src/data/data-in.c:497
+#: src/data/data-in.c:281 src/data/data-in.c:464
msgid "Too-small number set to zero."
msgstr ""
-#: src/data/data-in.c:340
+#: src/data/data-in.c:307
msgid "All characters in field must be digits."
msgstr ""
-#: src/data/data-in.c:363
+#: src/data/data-in.c:330
msgid "Unrecognized character in field."
msgstr ""
-#: src/data/data-in.c:387 src/data/data-in.c:660
+#: src/data/data-in.c:354 src/data/data-in.c:628
msgid "Field must have even length."
msgstr ""
-#: src/data/data-in.c:392 src/data/data-in.c:671
+#: src/data/data-in.c:359 src/data/data-in.c:639
msgid "Field must contain only hex digits."
msgstr ""
-#: src/data/data-in.c:710 src/data/data-in.c:757
+#: src/data/data-in.c:678 src/data/data-in.c:725
msgid "Syntax error in date field."
msgstr ""
-#: src/data/data-in.c:726
+#: src/data/data-in.c:694
#, c-format
msgid "Day (%ld) must be between 1 and 31."
msgstr ""
-#: src/data/data-in.c:773
+#: src/data/data-in.c:741
msgid "Delimiter expected between fields in date."
msgstr ""
-#: src/data/data-in.c:847
+#: src/data/data-in.c:815
msgid ""
"Unrecognized month format. Months may be specified as Arabic or Roman "
"numerals or as at least 3 letters of their English names."
msgstr ""
-#: src/data/data-in.c:874
+#: src/data/data-in.c:842
#, c-format
msgid "Year (%ld) must be between 1582 and 19999."
msgstr ""
-#: src/data/data-in.c:886
+#: src/data/data-in.c:854
#, c-format
msgid "Trailing garbage \"%.*s\" following date."
msgstr ""
-#: src/data/data-in.c:902
+#: src/data/data-in.c:870
msgid "Julian day must have exactly three digits."
msgstr ""
-#: src/data/data-in.c:907
+#: src/data/data-in.c:875
#, c-format
msgid "Julian day (%ld) must be between 1 and 366."
msgstr ""
-#: src/data/data-in.c:931
+#: src/data/data-in.c:899
#, c-format
msgid "Quarter (%ld) must be between 1 and 4."
msgstr ""
-#: src/data/data-in.c:951
+#: src/data/data-in.c:919
#, c-format
msgid "Week (%ld) must be between 1 and 53."
msgstr ""
-#: src/data/data-in.c:964
+#: src/data/data-in.c:932
msgid "Delimiter expected between fields in time."
msgstr ""
-#: src/data/data-in.c:984
+#: src/data/data-in.c:952
#, c-format
msgid "Minute (%ld) must be between 0 and 59."
msgstr ""
-#: src/data/data-in.c:1024
+#: src/data/data-in.c:992
msgid ""
"Unrecognized weekday name. At least the first two letters of an English "
"weekday name must be specified."
msgstr ""
-#: src/data/data-in.c:1162
+#: src/data/data-in.c:1130
#, c-format
msgid "`%c' expected in date field."
msgstr ""
-#: src/data/data-in.c:1203
+#: src/data/data-in.c:1171
#, c-format
msgid "column %d"
msgstr "Spalten %d"
-#: src/data/data-in.c:1205
+#: src/data/data-in.c:1173
#, fuzzy, c-format
msgid "columns %d-%d"
msgstr "Spalten"
-#: src/data/data-in.c:1209
+#: src/data/data-in.c:1177
#, c-format
msgid "%s field) "
msgstr ""
-#: src/data/data-out.c:476
+#: src/data/data-out.c:446
#, c-format
msgid "Weekday number %f is not between 1 and 7."
msgstr ""
-#: src/data/data-out.c:497
+#: src/data/data-out.c:467
#, c-format
msgid "Month number %f is not between 1 and 12."
msgstr ""
msgid "Not opening pipe file `%s' because SAFER option set."
msgstr ""
-#: src/data/format.c:226
+#: src/data/format.c:238
msgid "Input format"
msgstr ""
-#: src/data/format.c:226
+#: src/data/format.c:238
msgid "Output format"
msgstr ""
-#: src/data/format.c:235
+#: src/data/format.c:247
#, c-format
msgid "Format %s may not be used for input."
msgstr ""
-#: src/data/format.c:242
+#: src/data/format.c:254
#, c-format
msgid "%s specifies width %d, but %s requires an even width."
msgstr ""
-#: src/data/format.c:251
+#: src/data/format.c:263
#, c-format
msgid "%s %s specifies width %d, but %s requires a width between %d and %d."
msgstr ""
-#: src/data/format.c:260
+#: src/data/format.c:272
#, c-format
msgid "%s %s specifies %d decimal place, but %s does not allow any decimals."
msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/data/format.c:271
+#: src/data/format.c:283
#, c-format
msgid ""
"%s %s specifies %d decimal place, but the given width allows at most %d "
msgstr[0] ""
msgstr[1] ""
-#: src/data/format.c:278
+#: src/data/format.c:290
#, c-format
msgid ""
"%s %s specifies %d decimal place, but the given width does not allow for any "
msgstr[0] ""
msgstr[1] ""
-#: src/data/format.c:317
+#: src/data/format.c:329
#, c-format
msgid "%s variables are not compatible with %s format %s."
msgstr ""
-#: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire.glade:2176
-#: src/ui/gui/psppire-var-store.c:493
+#: src/data/format.c:330 src/data/sys-file-reader.c:639
+#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire-var-store.c:493
+#: src/ui/gui/psppire.glade:2176
msgid "String"
msgstr "Zeichenkette"
-#: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire.glade:2131
-#: src/ui/gui/psppire-var-store.c:486
+#: src/data/format.c:330 src/data/sys-file-reader.c:639
+#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire-var-store.c:486
+#: src/ui/gui/psppire.glade:2131
msgid "Numeric"
msgstr "Nummer"
-#: src/data/format.c:319 src/data/sys-file-reader.c:1133
+#: src/data/format.c:331 src/data/sys-file-reader.c:1133
#: src/data/sys-file-reader.c:1135
#: src/language/dictionary/apply-dictionary.c:78
#: src/language/dictionary/apply-dictionary.c:79
msgid "numeric"
msgstr "numerisch"
-#: src/data/format.c:319 src/data/sys-file-reader.c:1133
+#: src/data/format.c:331 src/data/sys-file-reader.c:1133
#: src/data/sys-file-reader.c:1135
#: src/language/dictionary/apply-dictionary.c:78
#: src/language/dictionary/apply-dictionary.c:79
msgid "string"
msgstr "kette"
-#: src/data/format.c:337
+#: src/data/format.c:349
#, c-format
msgid "String variable with width %d is not compatible with format %s."
msgstr ""
msgid "scratch file"
msgstr ""
+#: src/data/settings.c:685
+#, c-format
+msgid ""
+"%s: Custom currency string `%s' does not contain exactly three periods or "
+"commas (or it contains both)."
+msgstr ""
+
#: src/data/short-names.c:71
msgid "Variable suffix too large."
msgstr ""
msgid "Handle for %s not allowed here."
msgstr ""
+#: src/language/data-io/get-data.c:57
+#, c-format
+msgid "Unsupported TYPE %s"
+msgstr ""
+
+#: src/language/data-io/get-data.c:181
+#, c-format
+msgid ""
+"%s is allowed only with %s arrangement, but %s arrangement was stated or "
+"implied earlier in this command."
+msgstr ""
+
+#: src/language/data-io/get-data.c:236
+msgid "expecting FIXED or DELIMITED"
+msgstr ""
+
+#: src/language/data-io/get-data.c:249
+msgid "Value of FIRSTCASE must be 1 or greater."
+msgstr ""
+
+#: src/language/data-io/get-data.c:274
+msgid "expecting LINE or VARIABLES"
+msgstr ""
+
+#: src/language/data-io/get-data.c:287
+msgid "Value of FIXCASE must be at least 1."
+msgstr ""
+
+#: src/language/data-io/get-data.c:307
+msgid "Value of FIRST must be at least 1."
+msgstr ""
+
+#: src/language/data-io/get-data.c:319
+msgid "Value of PERCENT must be between 1 and 100."
+msgstr ""
+
+#: src/language/data-io/get-data.c:372
+msgid "expecting VARIABLES"
+msgstr ""
+
+#: src/language/data-io/get-data.c:394
+#: src/language/data-io/placement-parser.c:376
+#, c-format
+msgid ""
+"The record number specified, %ld, is at or before the previous record, %d. "
+"Data fields must be listed in order of increasing record number."
+msgstr ""
+
+#: src/language/data-io/get-data.c:403
+#, c-format
+msgid ""
+"The record number specified, %ld, exceeds the number of records per case "
+"specified on FIXCASE, %d."
+msgstr ""
+
#: src/language/data-io/get.c:99
msgid "expecting COMM or TAPE"
msgstr ""
"variable in earlier file (%s)."
msgstr ""
-#: src/language/data-io/get-data.c:57
-#, c-format
-msgid "Unsupported TYPE %s"
-msgstr ""
-
-#: src/language/data-io/get-data.c:181
-#, c-format
-msgid ""
-"%s is allowed only with %s arrangement, but %s arrangement was stated or "
-"implied earlier in this command."
-msgstr ""
-
-#: src/language/data-io/get-data.c:236
-msgid "expecting FIXED or DELIMITED"
-msgstr ""
-
-#: src/language/data-io/get-data.c:249
-msgid "Value of FIRSTCASE must be 1 or greater."
-msgstr ""
-
-#: src/language/data-io/get-data.c:274
-msgid "expecting LINE or VARIABLES"
-msgstr ""
-
-#: src/language/data-io/get-data.c:287
-msgid "Value of FIXCASE must be at least 1."
-msgstr ""
-
-#: src/language/data-io/get-data.c:307
-msgid "Value of FIRST must be at least 1."
-msgstr ""
-
-#: src/language/data-io/get-data.c:319
-msgid "Value of PERCENT must be between 1 and 100."
-msgstr ""
-
-#: src/language/data-io/get-data.c:372
-msgid "expecting VARIABLES"
-msgstr ""
-
-#: src/language/data-io/get-data.c:394
-#: src/language/data-io/placement-parser.c:376
-#, c-format
-msgid ""
-"The record number specified, %ld, is at or before the previous record, %d. "
-"Data fields must be listed in order of increasing record number."
-msgstr ""
-
-#: src/language/data-io/get-data.c:403
-#, c-format
-msgid ""
-"The record number specified, %ld, exceeds the number of records per case "
-"specified on FIXCASE, %d."
-msgstr ""
-
#: src/language/data-io/inpt-pgm.c:129
msgid "Unexpected end-of-file within INPUT PROGRAM."
msgstr ""
msgid "The ending column for a field must be greater than the starting column."
msgstr ""
+#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476
+#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60
+msgid "expecting end of command"
+msgstr ""
+
+#: src/language/data-io/print-space.c:116
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+msgstr ""
+
+#: src/language/data-io/print-space.c:119
+#, c-format
+msgid "The expression on PRINT SPACE evaluated to %g."
+msgstr ""
+
#: src/language/data-io/print.c:265
#, c-format
msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
msgstr[0] ""
msgstr[1] ""
-#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476
-#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60
-msgid "expecting end of command"
-msgstr ""
-
-#: src/language/data-io/print-space.c:116
-msgid "The expression on PRINT SPACE evaluated to the system-missing value."
-msgstr ""
-
-#: src/language/data-io/print-space.c:119
-#, c-format
-msgid "The expression on PRINT SPACE evaluated to %g."
-msgstr ""
-
#: src/language/dictionary/apply-dictionary.c:75
#, c-format
msgid "Variable %s is %s in target file, but %s in source file."
msgid "TABLES subcommand may not appear more than once."
msgstr ""
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr ""
+
+#: src/language/stats/npar-summary.c:145
+msgid "25th"
+msgstr ""
+
+#: src/language/stats/npar-summary.c:148
+msgid "50th (Median)"
+msgstr ""
+
+#: src/language/stats/npar-summary.c:151
+msgid "75th"
+msgstr ""
+
#: src/language/stats/npar.q:98
msgid "NPAR subcommand not currently implemented."
msgstr ""
"not match the number following (%zu)."
msgstr ""
-#: src/language/stats/npar-summary.c:108
-msgid "Descriptive Statistics"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:145
-msgid "25th"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:148
-msgid "50th (Median)"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:151
-msgid "75th"
-msgstr ""
-
#: src/language/stats/oneway.q:169
msgid "Number of contrast coefficients must equal the number of groups"
msgstr ""
msgid "Active file compression is not implemented."
msgstr ""
-#: src/language/utilities/set.q:347
-#, c-format
-msgid ""
-"%s: Custom currency string `%s' does not contain exactly three periods or "
-"commas (or it contains both)."
-msgstr ""
-
-#: src/language/utilities/set.q:403
+#: src/language/utilities/set.q:318
msgid "EPOCH must be 1500 or later."
msgstr ""
-#: src/language/utilities/set.q:410
+#: src/language/utilities/set.q:325
msgid "expecting AUTOMATIC or year"
msgstr ""
-#: src/language/utilities/set.q:431
+#: src/language/utilities/set.q:346
msgid "LENGTH must be at least 1."
msgstr ""
-#: src/language/utilities/set.q:475
+#: src/language/utilities/set.q:390
msgid "WIDTH must be at least 40."
msgstr ""
-#: src/language/utilities/set.q:498
+#: src/language/utilities/set.q:413
#, c-format
msgid ""
"FORMAT requires numeric output format as an argument. Specified format %s "
"is of type string."
msgstr ""
-#: src/language/utilities/set.q:565
+#: src/language/utilities/set.q:480
msgid "BLANKS is SYSMIS."
msgstr ""
-#: src/language/utilities/set.q:567
+#: src/language/utilities/set.q:482
#, c-format
msgid "BLANKS is %g."
msgstr ""
-#: src/language/utilities/set.q:602
+#: src/language/utilities/set.q:517
#, c-format
msgid "%s is \"%s\"."
msgstr ""
-#: src/language/utilities/set.q:638
+#: src/language/utilities/set.q:553
#, c-format
msgid "DECIMAL is \"%c\"."
msgstr ""
-#: src/language/utilities/set.q:644
+#: src/language/utilities/set.q:559
#, c-format
msgid "ENDCMD is \"%c\"."
msgstr ""
-#: src/language/utilities/set.q:652
+#: src/language/utilities/set.q:567
#, c-format
msgid "ERRORS is \"%s\"."
msgstr ""
-#: src/language/utilities/set.q:663
+#: src/language/utilities/set.q:578
#, c-format
msgid "FORMAT is %s."
msgstr ""
-#: src/language/utilities/set.q:669
+#: src/language/utilities/set.q:584
#, c-format
msgid "LENGTH is %d."
msgstr ""
-#: src/language/utilities/set.q:675
+#: src/language/utilities/set.q:590
#, c-format
msgid "MXERRS is %d."
msgstr ""
-#: src/language/utilities/set.q:681
+#: src/language/utilities/set.q:596
#, c-format
msgid "MXLOOPS is %d."
msgstr ""
-#: src/language/utilities/set.q:687
+#: src/language/utilities/set.q:602
#, c-format
msgid "MXWARNS is %d."
msgstr ""
-#: src/language/utilities/set.q:694 src/language/utilities/set.q:745
+#: src/language/utilities/set.q:609 src/language/utilities/set.q:660
#, c-format
msgid "%s is %s (%s)."
msgstr ""
-#: src/language/utilities/set.q:766
+#: src/language/utilities/set.q:681
msgid "SCOMPRESSION is ON."
msgstr ""
-#: src/language/utilities/set.q:768
+#: src/language/utilities/set.q:683
msgid "SCOMPRESSION is OFF."
msgstr ""
-#: src/language/utilities/set.q:775
+#: src/language/utilities/set.q:690
msgid "UNDEFINED is WARN."
msgstr ""
-#: src/language/utilities/set.q:777
+#: src/language/utilities/set.q:692
msgid "UNDEFINED is NOWARN."
msgstr ""
-#: src/language/utilities/set.q:785
+#: src/language/utilities/set.q:700
msgid "WEIGHT is off."
msgstr ""
-#: src/language/utilities/set.q:787
+#: src/language/utilities/set.q:702
#, c-format
msgid "WEIGHT is variable %s."
msgstr ""
-#: src/language/utilities/set.q:805
+#: src/language/utilities/set.q:720
#, c-format
msgid "WIDTH is %d."
msgstr ""
msgid "Paste"
msgstr "Datum"
-#: src/ui/gui/psppire.c:199
-msgid "_Reset"
-msgstr "_Zurücksetzen"
-
-#: src/ui/gui/psppire.c:200
-#, fuzzy
-msgid "_Select"
-msgstr "Schriftwahlung"
-
#: src/ui/gui/psppire-data-store.c:816
msgid "var"
msgstr ""
msgid "%ld"
msgstr ""
+#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14
+msgid "None"
+msgstr "Keine"
+
+#: src/ui/gui/psppire-var-store.c:489
+msgid "Scientific"
+msgstr "Wissenschäflich"
+
+#: src/ui/gui/psppire-var-store.c:492
+msgid "Custom"
+msgstr "Spezial"
+
+#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573
+#: src/ui/gui/psppire-var-store.c:583
+#, c-format
+msgid "%d"
+msgstr ""
+
+#: src/ui/gui/psppire.c:198
+msgid "_Reset"
+msgstr "_Zurücksetzen"
+
+#: src/ui/gui/psppire.c:199
+#, fuzzy
+msgid "_Select"
+msgstr "Schriftwahlung"
+
#: src/ui/gui/psppire.glade:11
#, fuzzy
msgid "This is pre-alpha software. Use at your own risk."
msgid "Search backward"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14
-msgid "None"
-msgstr "Keine"
-
-#: src/ui/gui/psppire-var-store.c:489
-msgid "Scientific"
-msgstr "Wissenschäflich"
-
-#: src/ui/gui/psppire-var-store.c:492
-msgid "Custom"
-msgstr "Spezial"
-
-#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573
-#: src/ui/gui/psppire-var-store.c:583
-#, c-format
-msgid "%d"
-msgstr ""
-
#: src/ui/gui/rank.glade:111
msgid "By:"
msgstr ""
msgid "To End"
msgstr ""
+#: src/ui/gui/t-test-options.c:60
+#, c-format
+msgid "Confidence Interval: %2d %%"
+msgstr ""
+
#: src/ui/gui/t-test.glade:53 src/ui/gui/t-test.glade:161
msgid "Define Groups"
msgstr ""
msgid "Test Value: "
msgstr "Werte:"
-#: src/ui/gui/t-test-options.c:60
-#, c-format
-msgid "Confidence Interval: %2d %%"
-msgstr ""
+#: src/ui/gui/var-sheet.c:65
+msgid "Name"
+msgstr "Name"
+
+#: src/ui/gui/var-sheet.c:68
+msgid "Decimals"
+msgstr "Dezimalstellen"
+
+#: src/ui/gui/var-sheet.c:70
+msgid "Values"
+msgstr "Werten"
+
+#: src/ui/gui/var-sheet.c:73
+msgid "Align"
+msgstr "Einstellung"
+
+#: src/ui/gui/var-sheet.c:74
+msgid "Measure"
+msgstr "Messe"
#: src/ui/gui/variable-info-dialog.c:88
#, fuzzy, c-format
msgid "%s %s\n"
msgstr ""
-#: src/ui/gui/var-sheet.c:65
-msgid "Name"
-msgstr "Name"
-
-#: src/ui/gui/var-sheet.c:68
-msgid "Decimals"
-msgstr "Dezimalstellen"
-
-#: src/ui/gui/var-sheet.c:70
-msgid "Values"
-msgstr "Werten"
-
-#: src/ui/gui/var-sheet.c:73
-msgid "Align"
-msgstr "Einstellung"
-
-#: src/ui/gui/var-sheet.c:74
-msgid "Measure"
-msgstr "Messe"
-
#: src/ui/gui/weight-cases-dialog.c:88
#, c-format
msgid "Weight cases by %s"
"Report bugs to <%s>.\n"
msgstr ""
-#: src/ui/terminal/main.c:132
+#: src/ui/terminal/main.c:131
msgid ""
"Stopping syntax file processing here to avoid a cascade of dependent command "
"failures."
msgstr ""
"Project-Id-Version: PSPP 0.4.3\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2008-01-10 11:14+0900\n"
+"POT-Creation-Date: 2008-01-19 15:35+0900\n"
"PO-Revision-Date: 2007-09-15 08:29+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
msgstr ""
-#: src/data/casereader-filter.c:221
-msgid ""
-"At least one case in the data read had a weight value that was user-missing, "
-"system-missing, zero, or negative. These case(s) were ignored."
-msgstr ""
-
#: src/data/case-tmpfile.c:57
msgid "failed to create temporary file"
msgstr ""
msgid "writing to temporary file"
msgstr ""
-#: src/data/data-in.c:287 src/data/data-in.c:477
+#: src/data/casereader-filter.c:221
+msgid ""
+"At least one case in the data read had a weight value that was user-missing, "
+"system-missing, zero, or negative. These case(s) were ignored."
+msgstr ""
+
+#: src/data/data-in.c:254 src/data/data-in.c:444
msgid "Field contents are not numeric."
msgstr ""
-#: src/data/data-in.c:289 src/data/data-in.c:479
+#: src/data/data-in.c:256 src/data/data-in.c:446
msgid "Number followed by garbage."
msgstr ""
-#: src/data/data-in.c:300
+#: src/data/data-in.c:267
msgid "Invalid numeric syntax."
msgstr ""
-#: src/data/data-in.c:309 src/data/data-in.c:492
+#: src/data/data-in.c:276 src/data/data-in.c:459
msgid "Too-large number set to system-missing."
msgstr ""
-#: src/data/data-in.c:314 src/data/data-in.c:497
+#: src/data/data-in.c:281 src/data/data-in.c:464
msgid "Too-small number set to zero."
msgstr ""
-#: src/data/data-in.c:340
+#: src/data/data-in.c:307
msgid "All characters in field must be digits."
msgstr ""
-#: src/data/data-in.c:363
+#: src/data/data-in.c:330
msgid "Unrecognized character in field."
msgstr ""
-#: src/data/data-in.c:387 src/data/data-in.c:660
+#: src/data/data-in.c:354 src/data/data-in.c:628
msgid "Field must have even length."
msgstr ""
-#: src/data/data-in.c:392 src/data/data-in.c:671
+#: src/data/data-in.c:359 src/data/data-in.c:639
msgid "Field must contain only hex digits."
msgstr ""
-#: src/data/data-in.c:710 src/data/data-in.c:757
+#: src/data/data-in.c:678 src/data/data-in.c:725
msgid "Syntax error in date field."
msgstr ""
-#: src/data/data-in.c:726
+#: src/data/data-in.c:694
#, c-format
msgid "Day (%ld) must be between 1 and 31."
msgstr ""
-#: src/data/data-in.c:773
+#: src/data/data-in.c:741
msgid "Delimiter expected between fields in date."
msgstr ""
-#: src/data/data-in.c:847
+#: src/data/data-in.c:815
msgid ""
"Unrecognized month format. Months may be specified as Arabic or Roman "
"numerals or as at least 3 letters of their English names."
msgstr ""
-#: src/data/data-in.c:874
+#: src/data/data-in.c:842
#, c-format
msgid "Year (%ld) must be between 1582 and 19999."
msgstr ""
-#: src/data/data-in.c:886
+#: src/data/data-in.c:854
#, c-format
msgid "Trailing garbage \"%.*s\" following date."
msgstr ""
-#: src/data/data-in.c:902
+#: src/data/data-in.c:870
msgid "Julian day must have exactly three digits."
msgstr ""
-#: src/data/data-in.c:907
+#: src/data/data-in.c:875
#, c-format
msgid "Julian day (%ld) must be between 1 and 366."
msgstr ""
-#: src/data/data-in.c:931
+#: src/data/data-in.c:899
#, c-format
msgid "Quarter (%ld) must be between 1 and 4."
msgstr ""
-#: src/data/data-in.c:951
+#: src/data/data-in.c:919
#, c-format
msgid "Week (%ld) must be between 1 and 53."
msgstr ""
-#: src/data/data-in.c:964
+#: src/data/data-in.c:932
msgid "Delimiter expected between fields in time."
msgstr ""
-#: src/data/data-in.c:984
+#: src/data/data-in.c:952
#, c-format
msgid "Minute (%ld) must be between 0 and 59."
msgstr ""
-#: src/data/data-in.c:1024
+#: src/data/data-in.c:992
msgid ""
"Unrecognized weekday name. At least the first two letters of an English "
"weekday name must be specified."
msgstr ""
-#: src/data/data-in.c:1162
+#: src/data/data-in.c:1130
#, c-format
msgid "`%c' expected in date field."
msgstr ""
-#: src/data/data-in.c:1203
+#: src/data/data-in.c:1171
#, c-format
msgid "column %d"
msgstr ""
-#: src/data/data-in.c:1205
+#: src/data/data-in.c:1173
#, c-format
msgid "columns %d-%d"
msgstr ""
-#: src/data/data-in.c:1209
+#: src/data/data-in.c:1177
#, c-format
msgid "%s field) "
msgstr ""
-#: src/data/data-out.c:476
+#: src/data/data-out.c:446
#, c-format
msgid "Weekday number %f is not between 1 and 7."
msgstr ""
-#: src/data/data-out.c:497
+#: src/data/data-out.c:467
#, c-format
msgid "Month number %f is not between 1 and 12."
msgstr ""
msgid "Not opening pipe file `%s' because SAFER option set."
msgstr ""
-#: src/data/format.c:226
+#: src/data/format.c:238
msgid "Input format"
msgstr ""
-#: src/data/format.c:226
+#: src/data/format.c:238
msgid "Output format"
msgstr ""
-#: src/data/format.c:235
+#: src/data/format.c:247
#, c-format
msgid "Format %s may not be used for input."
msgstr ""
-#: src/data/format.c:242
+#: src/data/format.c:254
#, c-format
msgid "%s specifies width %d, but %s requires an even width."
msgstr ""
-#: src/data/format.c:251
+#: src/data/format.c:263
#, c-format
msgid "%s %s specifies width %d, but %s requires a width between %d and %d."
msgstr ""
-#: src/data/format.c:260
+#: src/data/format.c:272
#, c-format
msgid "%s %s specifies %d decimal place, but %s does not allow any decimals."
msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/data/format.c:271
+#: src/data/format.c:283
#, c-format
msgid ""
"%s %s specifies %d decimal place, but the given width allows at most %d "
msgstr[0] ""
msgstr[1] ""
-#: src/data/format.c:278
+#: src/data/format.c:290
#, c-format
msgid ""
"%s %s specifies %d decimal place, but the given width does not allow for any "
msgstr[0] ""
msgstr[1] ""
-#: src/data/format.c:317
+#: src/data/format.c:329
#, c-format
msgid "%s variables are not compatible with %s format %s."
msgstr ""
-#: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire.glade:2176
-#: src/ui/gui/psppire-var-store.c:493
+#: src/data/format.c:330 src/data/sys-file-reader.c:639
+#: src/ui/gui/data-editor.glade:1304 src/ui/gui/psppire-var-store.c:493
+#: src/ui/gui/psppire.glade:2176
msgid "String"
msgstr ""
-#: src/data/format.c:318 src/data/sys-file-reader.c:639
-#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire.glade:2131
-#: src/ui/gui/psppire-var-store.c:486
+#: src/data/format.c:330 src/data/sys-file-reader.c:639
+#: src/ui/gui/data-editor.glade:1193 src/ui/gui/psppire-var-store.c:486
+#: src/ui/gui/psppire.glade:2131
msgid "Numeric"
msgstr ""
-#: src/data/format.c:319 src/data/sys-file-reader.c:1133
+#: src/data/format.c:331 src/data/sys-file-reader.c:1133
#: src/data/sys-file-reader.c:1135
#: src/language/dictionary/apply-dictionary.c:78
#: src/language/dictionary/apply-dictionary.c:79
msgid "numeric"
msgstr ""
-#: src/data/format.c:319 src/data/sys-file-reader.c:1133
+#: src/data/format.c:331 src/data/sys-file-reader.c:1133
#: src/data/sys-file-reader.c:1135
#: src/language/dictionary/apply-dictionary.c:78
#: src/language/dictionary/apply-dictionary.c:79
msgid "string"
msgstr ""
-#: src/data/format.c:337
+#: src/data/format.c:349
#, c-format
msgid "String variable with width %d is not compatible with format %s."
msgstr ""
msgid "scratch file"
msgstr ""
+#: src/data/settings.c:685
+#, c-format
+msgid ""
+"%s: Custom currency string `%s' does not contain exactly three periods or "
+"commas (or it contains both)."
+msgstr ""
+
#: src/data/short-names.c:71
msgid "Variable suffix too large."
msgstr ""
msgid "Handle for %s not allowed here."
msgstr ""
+#: src/language/data-io/get-data.c:57
+#, c-format
+msgid "Unsupported TYPE %s"
+msgstr ""
+
+#: src/language/data-io/get-data.c:181
+#, c-format
+msgid ""
+"%s is allowed only with %s arrangement, but %s arrangement was stated or "
+"implied earlier in this command."
+msgstr ""
+
+#: src/language/data-io/get-data.c:236
+msgid "expecting FIXED or DELIMITED"
+msgstr ""
+
+#: src/language/data-io/get-data.c:249
+msgid "Value of FIRSTCASE must be 1 or greater."
+msgstr ""
+
+#: src/language/data-io/get-data.c:274
+msgid "expecting LINE or VARIABLES"
+msgstr ""
+
+#: src/language/data-io/get-data.c:287
+msgid "Value of FIXCASE must be at least 1."
+msgstr ""
+
+#: src/language/data-io/get-data.c:307
+msgid "Value of FIRST must be at least 1."
+msgstr ""
+
+#: src/language/data-io/get-data.c:319
+msgid "Value of PERCENT must be between 1 and 100."
+msgstr ""
+
+#: src/language/data-io/get-data.c:372
+msgid "expecting VARIABLES"
+msgstr ""
+
+#: src/language/data-io/get-data.c:394
+#: src/language/data-io/placement-parser.c:376
+#, c-format
+msgid ""
+"The record number specified, %ld, is at or before the previous record, %d. "
+"Data fields must be listed in order of increasing record number."
+msgstr ""
+
+#: src/language/data-io/get-data.c:403
+#, c-format
+msgid ""
+"The record number specified, %ld, exceeds the number of records per case "
+"specified on FIXCASE, %d."
+msgstr ""
+
#: src/language/data-io/get.c:99
msgid "expecting COMM or TAPE"
msgstr ""
"variable in earlier file (%s)."
msgstr ""
-#: src/language/data-io/get-data.c:57
-#, c-format
-msgid "Unsupported TYPE %s"
-msgstr ""
-
-#: src/language/data-io/get-data.c:181
-#, c-format
-msgid ""
-"%s is allowed only with %s arrangement, but %s arrangement was stated or "
-"implied earlier in this command."
-msgstr ""
-
-#: src/language/data-io/get-data.c:236
-msgid "expecting FIXED or DELIMITED"
-msgstr ""
-
-#: src/language/data-io/get-data.c:249
-msgid "Value of FIRSTCASE must be 1 or greater."
-msgstr ""
-
-#: src/language/data-io/get-data.c:274
-msgid "expecting LINE or VARIABLES"
-msgstr ""
-
-#: src/language/data-io/get-data.c:287
-msgid "Value of FIXCASE must be at least 1."
-msgstr ""
-
-#: src/language/data-io/get-data.c:307
-msgid "Value of FIRST must be at least 1."
-msgstr ""
-
-#: src/language/data-io/get-data.c:319
-msgid "Value of PERCENT must be between 1 and 100."
-msgstr ""
-
-#: src/language/data-io/get-data.c:372
-msgid "expecting VARIABLES"
-msgstr ""
-
-#: src/language/data-io/get-data.c:394
-#: src/language/data-io/placement-parser.c:376
-#, c-format
-msgid ""
-"The record number specified, %ld, is at or before the previous record, %d. "
-"Data fields must be listed in order of increasing record number."
-msgstr ""
-
-#: src/language/data-io/get-data.c:403
-#, c-format
-msgid ""
-"The record number specified, %ld, exceeds the number of records per case "
-"specified on FIXCASE, %d."
-msgstr ""
-
#: src/language/data-io/inpt-pgm.c:129
msgid "Unexpected end-of-file within INPUT PROGRAM."
msgstr ""
msgid "The ending column for a field must be greater than the starting column."
msgstr ""
+#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476
+#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60
+msgid "expecting end of command"
+msgstr ""
+
+#: src/language/data-io/print-space.c:116
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+msgstr ""
+
+#: src/language/data-io/print-space.c:119
+#, c-format
+msgid "The expression on PRINT SPACE evaluated to %g."
+msgstr ""
+
#: src/language/data-io/print.c:265
#, c-format
msgid "Output calls for %d records but %zu specified on RECORDS subcommand."
msgstr[0] ""
msgstr[1] ""
-#: src/language/data-io/print-space.c:73 src/language/lexer/lexer.c:476
-#: src/language/stats/autorecode.c:154 src/language/xforms/select-if.c:60
-msgid "expecting end of command"
-msgstr ""
-
-#: src/language/data-io/print-space.c:116
-msgid "The expression on PRINT SPACE evaluated to the system-missing value."
-msgstr ""
-
-#: src/language/data-io/print-space.c:119
-#, c-format
-msgid "The expression on PRINT SPACE evaluated to %g."
-msgstr ""
-
#: src/language/dictionary/apply-dictionary.c:75
#, c-format
msgid "Variable %s is %s in target file, but %s in source file."
msgid "TABLES subcommand may not appear more than once."
msgstr ""
+#: src/language/stats/npar-summary.c:108
+msgid "Descriptive Statistics"
+msgstr ""
+
+#: src/language/stats/npar-summary.c:145
+msgid "25th"
+msgstr ""
+
+#: src/language/stats/npar-summary.c:148
+msgid "50th (Median)"
+msgstr ""
+
+#: src/language/stats/npar-summary.c:151
+msgid "75th"
+msgstr ""
+
#: src/language/stats/npar.q:98
msgid "NPAR subcommand not currently implemented."
msgstr ""
"not match the number following (%zu)."
msgstr ""
-#: src/language/stats/npar-summary.c:108
-msgid "Descriptive Statistics"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:145
-msgid "25th"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:148
-msgid "50th (Median)"
-msgstr ""
-
-#: src/language/stats/npar-summary.c:151
-msgid "75th"
-msgstr ""
-
#: src/language/stats/oneway.q:169
msgid "Number of contrast coefficients must equal the number of groups"
msgstr ""
msgid "Active file compression is not implemented."
msgstr ""
-#: src/language/utilities/set.q:347
-#, c-format
-msgid ""
-"%s: Custom currency string `%s' does not contain exactly three periods or "
-"commas (or it contains both)."
-msgstr ""
-
-#: src/language/utilities/set.q:403
+#: src/language/utilities/set.q:318
msgid "EPOCH must be 1500 or later."
msgstr ""
-#: src/language/utilities/set.q:410
+#: src/language/utilities/set.q:325
msgid "expecting AUTOMATIC or year"
msgstr ""
-#: src/language/utilities/set.q:431
+#: src/language/utilities/set.q:346
msgid "LENGTH must be at least 1."
msgstr ""
-#: src/language/utilities/set.q:475
+#: src/language/utilities/set.q:390
msgid "WIDTH must be at least 40."
msgstr ""
-#: src/language/utilities/set.q:498
+#: src/language/utilities/set.q:413
#, c-format
msgid ""
"FORMAT requires numeric output format as an argument. Specified format %s "
"is of type string."
msgstr ""
-#: src/language/utilities/set.q:565
+#: src/language/utilities/set.q:480
msgid "BLANKS is SYSMIS."
msgstr ""
-#: src/language/utilities/set.q:567
+#: src/language/utilities/set.q:482
#, c-format
msgid "BLANKS is %g."
msgstr ""
-#: src/language/utilities/set.q:602
+#: src/language/utilities/set.q:517
#, c-format
msgid "%s is \"%s\"."
msgstr ""
-#: src/language/utilities/set.q:638
+#: src/language/utilities/set.q:553
#, c-format
msgid "DECIMAL is \"%c\"."
msgstr ""
-#: src/language/utilities/set.q:644
+#: src/language/utilities/set.q:559
#, c-format
msgid "ENDCMD is \"%c\"."
msgstr ""
-#: src/language/utilities/set.q:652
+#: src/language/utilities/set.q:567
#, c-format
msgid "ERRORS is \"%s\"."
msgstr ""
-#: src/language/utilities/set.q:663
+#: src/language/utilities/set.q:578
#, c-format
msgid "FORMAT is %s."
msgstr ""
-#: src/language/utilities/set.q:669
+#: src/language/utilities/set.q:584
#, c-format
msgid "LENGTH is %d."
msgstr ""
-#: src/language/utilities/set.q:675
+#: src/language/utilities/set.q:590
#, c-format
msgid "MXERRS is %d."
msgstr ""
-#: src/language/utilities/set.q:681
+#: src/language/utilities/set.q:596
#, c-format
msgid "MXLOOPS is %d."
msgstr ""
-#: src/language/utilities/set.q:687
+#: src/language/utilities/set.q:602
#, c-format
msgid "MXWARNS is %d."
msgstr ""
-#: src/language/utilities/set.q:694 src/language/utilities/set.q:745
+#: src/language/utilities/set.q:609 src/language/utilities/set.q:660
#, c-format
msgid "%s is %s (%s)."
msgstr ""
-#: src/language/utilities/set.q:766
+#: src/language/utilities/set.q:681
msgid "SCOMPRESSION is ON."
msgstr ""
-#: src/language/utilities/set.q:768
+#: src/language/utilities/set.q:683
msgid "SCOMPRESSION is OFF."
msgstr ""
-#: src/language/utilities/set.q:775
+#: src/language/utilities/set.q:690
msgid "UNDEFINED is WARN."
msgstr ""
-#: src/language/utilities/set.q:777
+#: src/language/utilities/set.q:692
msgid "UNDEFINED is NOWARN."
msgstr ""
-#: src/language/utilities/set.q:785
+#: src/language/utilities/set.q:700
msgid "WEIGHT is off."
msgstr ""
-#: src/language/utilities/set.q:787
+#: src/language/utilities/set.q:702
#, c-format
msgid "WEIGHT is variable %s."
msgstr ""
-#: src/language/utilities/set.q:805
+#: src/language/utilities/set.q:720
#, c-format
msgid "WIDTH is %d."
msgstr ""
msgid "Paste"
msgstr ""
-#: src/ui/gui/psppire.c:199
-msgid "_Reset"
-msgstr ""
-
-#: src/ui/gui/psppire.c:200
-msgid "_Select"
-msgstr ""
-
#: src/ui/gui/psppire-data-store.c:816
msgid "var"
msgstr ""
msgid "%ld"
msgstr ""
+#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14
+msgid "None"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:489
+msgid "Scientific"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:492
+msgid "Custom"
+msgstr ""
+
+#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573
+#: src/ui/gui/psppire-var-store.c:583
+#, c-format
+msgid "%d"
+msgstr ""
+
+#: src/ui/gui/psppire.c:198
+msgid "_Reset"
+msgstr ""
+
+#: src/ui/gui/psppire.c:199
+msgid "_Select"
+msgstr ""
+
#: src/ui/gui/psppire.glade:11
msgid "This is pre-alpha software. Use at your own risk."
msgstr ""
msgid "Search backward"
msgstr ""
-#: src/ui/gui/psppire-var-store.c:479 src/ui/gui/var-display.c:14
-msgid "None"
-msgstr ""
-
-#: src/ui/gui/psppire-var-store.c:489
-msgid "Scientific"
-msgstr ""
-
-#: src/ui/gui/psppire-var-store.c:492
-msgid "Custom"
-msgstr ""
-
-#: src/ui/gui/psppire-var-store.c:563 src/ui/gui/psppire-var-store.c:573
-#: src/ui/gui/psppire-var-store.c:583
-#, c-format
-msgid "%d"
-msgstr ""
-
#: src/ui/gui/rank.glade:111
msgid "By:"
msgstr ""
msgid "To End"
msgstr ""
+#: src/ui/gui/t-test-options.c:60
+#, c-format
+msgid "Confidence Interval: %2d %%"
+msgstr ""
+
#: src/ui/gui/t-test.glade:53 src/ui/gui/t-test.glade:161
msgid "Define Groups"
msgstr ""
msgid "Test Value: "
msgstr ""
-#: src/ui/gui/t-test-options.c:60
-#, c-format
-msgid "Confidence Interval: %2d %%"
+#: src/ui/gui/var-sheet.c:65
+msgid "Name"
+msgstr ""
+
+#: src/ui/gui/var-sheet.c:68
+msgid "Decimals"
+msgstr ""
+
+#: src/ui/gui/var-sheet.c:70
+msgid "Values"
+msgstr ""
+
+#: src/ui/gui/var-sheet.c:73
+msgid "Align"
+msgstr ""
+
+#: src/ui/gui/var-sheet.c:74
+msgid "Measure"
msgstr ""
#: src/ui/gui/variable-info-dialog.c:88
msgid "%s %s\n"
msgstr ""
-#: src/ui/gui/var-sheet.c:65
-msgid "Name"
-msgstr ""
-
-#: src/ui/gui/var-sheet.c:68
-msgid "Decimals"
-msgstr ""
-
-#: src/ui/gui/var-sheet.c:70
-msgid "Values"
-msgstr ""
-
-#: src/ui/gui/var-sheet.c:73
-msgid "Align"
-msgstr ""
-
-#: src/ui/gui/var-sheet.c:74
-msgid "Measure"
-msgstr ""
-
#: src/ui/gui/weight-cases-dialog.c:88
#, c-format
msgid "Weight cases by %s"
"Report bugs to <%s>.\n"
msgstr ""
-#: src/ui/terminal/main.c:132
+#: src/ui/terminal/main.c:131
msgid ""
"Stopping syntax file processing here to avoid a cascade of dependent command "
"failures."
+2008-01-19 John Darrington <john@darrington.wattle.id.au>
+
+ * settings.c settings.h: Moved static variables into a
+ single struct. Renamed functions to have a settings_ prefix.
+
2008-01-14 John Darrington <john@darrington.wattle.id.au>
* data-out.c (output_AHEX): Corrected number of bytes in
/* Normalize year. */
if (y >= 0 && y < 100)
{
- int epoch = get_epoch ();
+ int epoch = settings_get_epoch ();
int century = epoch / 100 + (y < epoch % 100);
y += century * 100;
}
size_t value_cnt = casereader_get_value_cnt (reader);
casenumber case_cnt = casereader_get_case_cnt (reader);
struct shim *b = xmalloc (sizeof *b);
- b->window = casewindow_create (value_cnt, get_workspace_cases (value_cnt));
+ b->window = casewindow_create (value_cnt, settings_get_workspace_cases (value_cnt));
b->subreader = casereader_create_random (value_cnt, case_cnt,
&shim_class, b);
casereader_swap (reader, b->subreader);
struct casewriter *
autopaging_writer_create (size_t value_cnt)
{
- return create_casewriter_window (value_cnt, get_workspace_cases (value_cnt));
+ return create_casewriter_window (value_cnt, settings_get_workspace_cases (value_cnt));
}
/* Returns a casewriter for cases with VALUE_CNT struct values
int last_column; /* Last column. */
};
-/* Integer format used for IB and PIB input. */
-static enum integer_format input_integer_format = INTEGER_NATIVE;
-/* Floating-point format used for RB and RBHEX input. */
-static enum float_format input_float_format = FLOAT_NATIVE_DOUBLE;
typedef bool data_in_parser_func (struct data_in *);
#define FMT(NAME, METHOD, IMIN, OMIN, IO, CATEGORY) \
return ok;
}
-/* Returns the integer format used for IB and PIB input. */
-enum integer_format
-data_in_get_integer_format (void)
-{
- return input_integer_format;
-}
-
-/* Sets the integer format used for IB and PIB input to
- FORMAT. */
-void
-data_in_set_integer_format (enum integer_format format)
-{
- input_integer_format = format;
-}
-
-/* Returns the floating-point format used for RB and RBHEX
- input. */
-enum float_format
-data_in_get_float_format (void)
-{
- return input_float_format;
-}
-
-/* Sets the floating-point format used for RB and RBHEX input to
- FORMAT. */
-void
-data_in_set_float_format (enum float_format format)
-{
- input_float_format = format;
-}
\f
/* Format parsers. */
static bool
parse_number (struct data_in *i)
{
- const struct fmt_number_style *style = fmt_get_style (i->format);
+ const struct fmt_number_style *style =
+ settings_get_style (i->format);
struct string tmp;
uint64_t sign_bit;
bytes = MIN (8, ss_length (i->input));
- value = integer_get (input_integer_format, ss_data (i->input), bytes);
+ value = integer_get (settings_get_input_integer_format (), ss_data (i->input), bytes);
sign_bit = UINT64_C(1) << (8 * bytes - 1);
if (!(value & sign_bit))
static bool
parse_PIB (struct data_in *i)
{
- i->output->f = integer_get (input_integer_format, ss_data (i->input),
+ i->output->f = integer_get (settings_get_input_integer_format (), ss_data (i->input),
MIN (8, ss_length (i->input)));
apply_implied_decimals (i);
static bool
parse_RB (struct data_in *i)
{
- size_t size = float_get_size (input_float_format);
+ enum float_format ff = settings_get_input_float_format ();
+ size_t size = float_get_size (ff);
if (ss_length (i->input) >= size)
- float_convert (input_float_format, ss_data (i->input),
+ float_convert (ff, ss_data (i->input),
FLOAT_NATIVE_DOUBLE, &i->output->f);
else
i->output->f = SYSMIS;
if (*year >= 0 && *year <= 99)
{
- int epoch = get_epoch ();
+ int epoch = settings_get_epoch ();
int epoch_century = ROUND_DOWN (epoch, 100);
int epoch_offset = epoch - epoch_century;
if (*year >= epoch_offset)
cp = buf;
while (c_isdigit (ss_first (i->input)))
*cp++ = ss_get_char (&i->input);
- if (ss_match_char (&i->input, fmt_decimal_char (FMT_F)))
+ if (ss_match_char (&i->input, settings_get_decimal_char (FMT_F)))
*cp++ = '.';
while (c_isdigit (ss_first (i->input)))
*cp++ = ss_get_char (&i->input);
if (fmt_is_string (i->format))
memset (i->output->s, ' ', i->width);
else
- i->output->f = get_blanks ();
+ i->output->f = settings_get_blanks ();
}
/* Trims leading and trailing spaces from I.
#include <libpspp/integer-format.h>
#include <libpspp/str.h>
-enum integer_format data_in_get_integer_format (void);
-void data_in_set_integer_format (enum integer_format);
-
-enum float_format data_in_get_float_format (void);
-void data_in_set_float_format (enum float_format);
union value;
bool data_in (struct substring input, enum legacy_encoding,
static void rounder_format (const struct rounder *, int decimals,
char *output);
\f
-/* Format of integers in output (SET WIB). */
-static enum integer_format output_integer_format = INTEGER_NATIVE;
-
-/* Format of reals in output (SET WRB). */
-static enum float_format output_float_format = FLOAT_NATIVE_DOUBLE;
-
typedef void data_out_converter_func (const union value *,
const struct fmt_spec *,
char *);
return data_out_legacy (value, LEGACY_NATIVE, format, output);
}
-/* Returns the current output integer format. */
-enum integer_format
-data_out_get_integer_format (void)
-{
- return output_integer_format;
-}
-
-/* Sets the output integer format to INTEGER_FORMAT. */
-void
-data_out_set_integer_format (enum integer_format integer_format)
-{
- output_integer_format = integer_format;
-}
-
-/* Returns the current output float format. */
-enum float_format
-data_out_get_float_format (void)
-{
- return output_float_format;
-}
-
-/* Sets the output float format to FLOAT_FORMAT. */
-void
-data_out_set_float_format (enum float_format float_format)
-{
- output_float_format = float_format;
-}
\f
/* Main conversion functions. */
uint64_t integer = fabs (number);
if (number < 0)
integer = -integer;
- output_binary_integer (integer, format->w, output_integer_format,
+ output_binary_integer (integer, format->w,
+ settings_get_output_integer_format (),
output);
}
}
|| number < 0 || number >= power256 (format->w))
memset (output, 0, format->w);
else
- output_binary_integer (number, format->w, output_integer_format, output);
+ output_binary_integer (number, format->w,
+ settings_get_output_integer_format (), output);
}
/* Outputs PIBHEX format. */
}
else
{
- int offset = year - get_epoch ();
+ int epoch = settings_get_epoch ();
+ int offset = year - epoch;
if (offset < 0 || offset > 99)
goto overflow;
p += sprintf (p, "%02d", abs (year) % 100);
int d = MIN (format->d, excess_width - 4);
int w = d + 3;
sprintf (p, ":%0*.*f", w, d, number);
- if (fmt_decimal_char (FMT_F) != '.')
+ if (settings_get_decimal_char (FMT_F) != '.')
{
char *cp = strchr (p, '.');
if (cp != NULL)
- *cp = fmt_decimal_char (FMT_F);
+ *cp = settings_get_decimal_char (FMT_F);
}
p += strlen (p);
}
output_decimal (const struct rounder *r, const struct fmt_spec *format,
bool require_affixes, char *output)
{
- const struct fmt_number_style *style = fmt_get_style (format->type);
+ const struct fmt_number_style *style =
+ settings_get_style (format->type);
+
int decimals;
for (decimals = format->d; decimals >= 0; decimals--)
output_scientific (double number, const struct fmt_spec *format,
bool require_affixes, char *output)
{
- const struct fmt_number_style *style = fmt_get_style (format->type);
+ const struct fmt_number_style *style =
+ settings_get_style (format->type);
int width;
int fraction_width;
bool add_affixes;
void data_out_legacy (const union value *, enum legacy_encoding,
const struct fmt_spec *, char *);
-enum integer_format data_out_get_integer_format (void);
-void data_out_set_integer_format (enum integer_format);
-
-enum float_format data_out_get_float_format (void);
-void data_out_set_float_format (enum float_format);
-
#endif /* data-out.h */
rename_var (d, v, new_name);
hsh_force_insert (d->name_tab, v);
- if (get_algorithm () == ENHANCED)
+ if (settings_get_algorithm () == ENHANCED)
var_clear_short_names (v);
if ( d->callbacks && d->callbacks->var_changed )
}
/* Clear short names. */
- if (get_algorithm () == ENHANCED)
+ if (settings_get_algorithm () == ENHANCED)
for (i = 0; i < count; i++)
var_clear_short_names (vars[i]);
#if HAVE_POPEN
if (fn[0] == '|')
{
- if (get_safer_mode ())
+ if (settings_get_safer_mode ())
return safety_violation (fn);
return popen (&fn[1], mode[0] == 'r' ? "r" : "w");
char *s;
FILE *f;
- if (get_safer_mode ())
+ if (settings_get_safer_mode ())
return safety_violation (fn);
s = xmalloca (strlen (fn));
#include "gettext.h"
#define _(msgid) gettext (msgid)
-static bool is_fmt_type (enum fmt_type);
+
+
+bool is_fmt_type (enum fmt_type);
static int min_width (enum fmt_type, bool for_input);
static int max_width (enum fmt_type);
static int max_digits_for_bytes (int bytes);
+void fmt_number_style_init (struct fmt_number_style *style);
+
+
/* Initialize the format module. */
-void
-fmt_init (void)
+struct fmt_number_style *
+fmt_create (void)
{
- static bool inited = false;
- if (!inited)
- {
- inited = true;
- fmt_set_decimal ('.');
- }
+ struct fmt_number_style *styles =
+ xcalloc (FMT_NUMBER_OF_FORMATS, sizeof (*styles));
+
+ int t;
+ for (t = 0 ; t < FMT_NUMBER_OF_FORMATS ; ++t )
+ fmt_number_style_init (&styles[t]);
+
+ fmt_set_decimal (styles, '.');
+
+ return styles;
}
-static struct fmt_number_style *styles[FMT_NUMBER_OF_FORMATS];
/* Deinitialize the format module. */
void
-fmt_done (void)
+fmt_done (struct fmt_number_style *styles)
{
int t;
for (t = 0 ; t < FMT_NUMBER_OF_FORMATS ; ++t )
- fmt_number_style_destroy (styles[t]);
+ fmt_number_style_destroy (&styles[t]);
+
+ free (styles);
}
/* Returns an input format specification with type TYPE, width W,
case FMT_DOLLAR:
case FMT_PCT:
{
- const struct fmt_number_style *style = fmt_get_style (input->type);
+ const struct fmt_number_style *style =
+ settings_get_style (input->type);
+
output.w += fmt_affix_width (style);
if (style->grouping != 0 && input->w - input->d >= 3)
output.w += (input->w - input->d - 1) / 3;
/* Adjusts FMT to be valid for a value of the given WIDTH. */
void
-fmt_resize (struct fmt_spec *fmt, int width)
+fmt_resize (struct fmt_spec *fmt, int width)
{
if ((width > 0) != fmt_is_string (fmt->type))
{
width. */
fmt->w = fmt->type == FMT_AHEX ? width * 2 : width;
}
- else
+ else
{
/* Still numeric. */
}
}
}
-/* Returns a string of the form "$#,###.##" according to FMT,
- which must be of type FMT_DOLLAR. The caller must free the
- string. */
-char *
-fmt_dollar_template (const struct fmt_spec *fmt)
-{
- struct string s = DS_EMPTY_INITIALIZER;
- int c;
-
- assert (fmt->type == FMT_DOLLAR);
-
- ds_put_char (&s, '$');
- for (c = MAX (fmt->w - fmt->d - 1, 0); c > 0; )
- {
- ds_put_char (&s, '#');
- if (--c % 4 == 0 && c > 0)
- {
- ds_put_char (&s, fmt_grouping_char (fmt->type));
- --c;
- }
- }
- if (fmt->d > 0)
- {
- ds_put_char (&s, fmt_decimal_char (fmt->type));
- ds_put_char_multiple (&s, '#', fmt->d);
- }
-
- return ds_cstr (&s);
-}
\f
/* Returns true if TYPE is a valid format type,
false otherwise. */
-static bool
+bool
is_fmt_type (enum fmt_type type)
{
return type < FMT_NUMBER_OF_FORMATS;
}
\f
-/* Creates and returns a new struct fmt_number_style,
- initializing all affixes to empty strings. */
-struct fmt_number_style *
-fmt_number_style_create (void)
+
+void
+fmt_number_style_init (struct fmt_number_style *style)
{
- struct fmt_number_style *style = xmalloc (sizeof *style);
style->neg_prefix = ss_empty ();
style->prefix = ss_empty ();
style->suffix = ss_empty ();
style->neg_suffix = ss_empty ();
style->decimal = '.';
style->grouping = 0;
- return style;
}
+
/* Destroys a struct fmt_number_style. */
void
fmt_number_style_destroy (struct fmt_number_style *style)
ss_dealloc (&style->prefix);
ss_dealloc (&style->suffix);
ss_dealloc (&style->neg_suffix);
- free (style);
}
}
/* Returns the number formatting style associated with the given
format TYPE. */
const struct fmt_number_style *
-fmt_get_style (enum fmt_type type)
+fmt_get_style (const struct fmt_number_style *styles, enum fmt_type type)
{
assert (is_fmt_type (type));
- assert (styles[type] != NULL);
- return styles[type];
+ return &styles[type];
}
-/* Sets STYLE as the number formatting style associated with the
- given format TYPE, transferring ownership of STYLE. */
+
+/* Checks that style is STYLE sane */
void
-fmt_set_style (enum fmt_type type, struct fmt_number_style *style)
+fmt_check_style (const struct fmt_number_style *style)
{
assert (ss_length (style->neg_prefix) <= FMT_STYLE_AFFIX_MAX);
assert (ss_length (style->prefix) <= FMT_STYLE_AFFIX_MAX);
assert (style->grouping == '.' || style->grouping == ','
|| style->grouping == 0);
assert (style->grouping != style->decimal);
-
- assert (fmt_get_category (type) == FMT_CAT_CUSTOM);
- assert (styles[type] != NULL);
-
- fmt_number_style_destroy (styles[type]);
- styles[type] = style;
}
+
/* Returns the total width of the standard prefix and suffix for
STYLE. */
int
return ss_length (style->neg_prefix) + ss_length (style->neg_suffix);
}
-/* Returns the decimal point character for the given format
- TYPE. */
-int
-fmt_decimal_char (enum fmt_type type)
-{
- return fmt_get_style (type)->decimal;
-}
-
-/* Returns the grouping character for the given format TYPE, or 0
- if the format type does not group digits. */
-int
-fmt_grouping_char (enum fmt_type type)
-{
- return fmt_get_style (type)->grouping;
-}
/* Sets the number style for TYPE to have the given standard
PREFIX and SUFFIX, "-" as prefix suffix, an empty negative
suffix, DECIMAL as the decimal point character, and GROUPING
as the grouping character. */
static void
-set_style (enum fmt_type type,
+set_style (struct fmt_number_style *styles, enum fmt_type type,
const char *prefix, const char *suffix,
char decimal, char grouping)
{
assert (is_fmt_type (type));
- fmt_number_style_destroy (styles[type]);
+ style = &styles[type] ;
+
+ fmt_number_style_destroy (style);
- style = styles[type] = fmt_number_style_create ();
ss_alloc_substring (&style->neg_prefix, ss_cstr ("-"));
ss_alloc_substring (&style->prefix, ss_cstr (prefix));
ss_alloc_substring (&style->suffix, ss_cstr (suffix));
style->grouping = grouping;
}
-/* Sets the number style for TYPE as with set_style, but only if
- TYPE has not already been initialized. */
-static void
-init_style (enum fmt_type type,
- const char *prefix, const char *suffix,
- char decimal, char grouping)
-{
- assert (is_fmt_type (type));
- if (styles[type] == NULL)
- set_style (type, prefix, suffix, decimal, grouping);
-}
-
/* Sets the decimal point character to DECIMAL. */
void
-fmt_set_decimal (char decimal)
+fmt_set_decimal (struct fmt_number_style *styles, char decimal)
{
int grouping = decimal == '.' ? ',' : '.';
assert (decimal == '.' || decimal == ',');
- set_style (FMT_F, "", "", decimal, 0);
- set_style (FMT_E, "", "", decimal, 0);
- set_style (FMT_COMMA, "", "", decimal, grouping);
- set_style (FMT_DOT, "", "", grouping, decimal);
- set_style (FMT_DOLLAR, "$", "", decimal, grouping);
- set_style (FMT_PCT, "", "%", decimal, 0);
-
- init_style (FMT_CCA, "", "", decimal, grouping);
- init_style (FMT_CCB, "", "", decimal, grouping);
- init_style (FMT_CCC, "", "", decimal, grouping);
- init_style (FMT_CCD, "", "", decimal, grouping);
- init_style (FMT_CCE, "", "", decimal, grouping);
+ set_style (styles, FMT_F, "", "", decimal, 0);
+ set_style (styles, FMT_E, "", "", decimal, 0);
+ set_style (styles, FMT_COMMA, "", "", decimal, grouping);
+ set_style (styles, FMT_DOT, "", "", grouping, decimal);
+ set_style (styles, FMT_DOLLAR, "$", "", decimal, grouping);
+ set_style (styles, FMT_PCT, "", "%", decimal, 0);
}
\f
/* Returns the struct fmt_desc for the given format TYPE. */
int d; /* Number of implied decimal places. */
};
+
+/* A numeric output style. */
+struct fmt_number_style
+ {
+ struct substring neg_prefix; /* Negative prefix. */
+ struct substring prefix; /* Prefix. */
+ struct substring suffix; /* Suffix. */
+ struct substring neg_suffix; /* Negative suffix. */
+ char decimal; /* Decimal point: '.' or ','. */
+ char grouping; /* Grouping character: ',', '.', or 0. */
+ };
+
+
+extern struct fmt_number_style *the_styles ;
+
+
/* Initialization. */
-void fmt_init (void);
-void fmt_done (void);
+struct fmt_number_style * fmt_create (void);
+void fmt_done (struct fmt_number_style *);
/* Constructing formats. */
struct fmt_spec fmt_for_input (enum fmt_type, int w, int d) PURE_FUNCTION;
bool fmt_from_io (int io, enum fmt_type *);
const char *fmt_date_template (enum fmt_type) PURE_FUNCTION;
-char *fmt_dollar_template (const struct fmt_spec *);
\f
/* Maximum length of prefix or suffix string in
struct fmt_number_style. */
#define FMT_STYLE_AFFIX_MAX 16
-/* A numeric output style. */
-struct fmt_number_style
- {
- struct substring neg_prefix; /* Negative prefix. */
- struct substring prefix; /* Prefix. */
- struct substring suffix; /* Suffix. */
- struct substring neg_suffix; /* Negative suffix. */
- char decimal; /* Decimal point: '.' or ','. */
- char grouping; /* Grouping character: ',', '.', or 0. */
- };
struct fmt_number_style *fmt_number_style_create (void);
void fmt_number_style_destroy (struct fmt_number_style *);
int fmt_affix_width (const struct fmt_number_style *);
int fmt_neg_affix_width (const struct fmt_number_style *);
-const struct fmt_number_style *fmt_get_style (enum fmt_type);
-void fmt_set_style (enum fmt_type, struct fmt_number_style *);
+bool is_fmt_type (enum fmt_type);
+
+const struct fmt_number_style *fmt_get_style (const struct fmt_number_style *, enum fmt_type);
+
+void fmt_check_style (const struct fmt_number_style *style);
-int fmt_decimal_char (enum fmt_type);
-int fmt_grouping_char (enum fmt_type);
+int fmt_grouping_char (const struct fmt_number_style *, enum fmt_type);
-void fmt_set_decimal (char);
+void fmt_set_decimal (struct fmt_number_style *, char);
#endif /* data/format.h */
#include "value.h"
#include "xalloc.h"
#include <libpspp/i18n.h>
+#include <libpspp/integer-format.h>
+#include <libpspp/message.h>
#include "error.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
-static int *viewlength = NULL;
-static int *viewwidth = NULL;
-
-static bool safer_mode = false;
-
-static bool do_echo = false;
-static bool include = true;
-
-static int epoch = -1;
-
-static bool errorbreak = false;
-
-static bool route_errors_to_terminal = true;
-static bool route_errors_to_listing = true;
-
-static bool scompress = true;
-
-static bool undefined = true;
-static double blanks = SYSMIS;
-
-static int mxwarns = 100;
-static int mxerrs = 100;
-
-static bool printback = true;
-static bool mprint = true;
-
-static int mxloops = 1;
+static int global_algorithm = ENHANCED;
-static bool nulline = true;
+struct settings
+{
+ /* Integer format used for IB and PIB input. */
+ enum integer_format input_integer_format;
+
+ /* Floating-point format used for RB and RBHEX input. */
+ enum float_format input_float_format;
+
+ /* Format of integers in output (SET WIB). */
+ enum integer_format output_integer_format;
+
+ /* Format of reals in output (SET WRB). */
+ enum float_format output_float_format;
+
+ int *viewlength;
+ int *viewwidth;
+ bool safer_mode;
+ bool do_echo;
+ bool include;
+ int epoch;
+ bool errorbreak;
+ bool route_errors_to_terminal;
+ bool route_errors_to_listing;
+ bool scompress;
+ bool undefined;
+ double blanks;
+ int mxwarns;
+ int mxerrs;
+ bool printback;
+ bool mprint;
+ int mxloops;
+ bool nulline;
+ char endcmd;
+ size_t workspace;
+ struct fmt_spec default_format;
+ bool testing_mode;
+
+ int cmd_algorithm;
+ int *algorithm;
+ int syntax;
+
+ struct fmt_number_style *styles;
+};
+
+static struct settings the_settings = {
+ /* input_integer_format */
+ INTEGER_NATIVE,
+ /* input_float_format */
+ FLOAT_NATIVE_DOUBLE,
+ /* output_integer_format */
+ INTEGER_NATIVE,
+ /* output_float_format */
+ FLOAT_NATIVE_DOUBLE,
+ /* viewlength */
+ NULL,
+ /* viewwidth */
+ NULL,
+ /* safer_mode */
+ false,
+ /* do_echo */
+ false,
+ /* include */
+ true,
+ /* epoch */
+ -1,
+ /* errorbreak */
+ false,
+ /* route_errors_to_terminal */
+ true,
+ /* route_errors_to_listing */
+ true,
+ /* scompress */
+ true,
+ /* undefined */
+ true,
+ /* blanks */
+ SYSMIS,
+ /* mxwarns */
+ 100,
+ /* mxerrs */
+ 100,
+ /* printback */
+ true,
+ /* mprint */
+ true,
+ /* mxloops */
+ 1,
+ /* nulline */
+ true,
+ /* endcmd */
+ '.',
+ /* workspace */
+ 4L * 1024 * 1024,
+ /* default_format */
+ {FMT_F, 8, 2},
+ /* testing_mode */
+ false,
+ /* cmd_algorithm */
+ ENHANCED,
+ /* algorithm */
+ &global_algorithm,
+ /* syntax */
+ ENHANCED,
+ /* styles */
+ NULL
+};
+
+static void init_viewport ( int *, int *);
-static char endcmd = '.';
+void
+settings_init (int *width, int *length)
+{
+ init_viewport (width, length);
+ settings_set_epoch (-1);
+ i18n_init ();
+ the_settings.styles = fmt_create ();
+}
-static size_t workspace = 4L * 1024 * 1024;
+void
+settings_done (void)
+{
+ fmt_done (the_settings.styles);
+ i18n_done ();
+}
-static struct fmt_spec default_format = {FMT_F, 8, 2};
+/* Returns the floating-point format used for RB and RBHEX
+ input. */
+enum float_format
+settings_get_input_float_format (void)
+{
+ return the_settings.input_float_format;
+}
-static bool testing_mode = false;
+/* Sets the floating-point format used for RB and RBHEX input to
+ FORMAT. */
+void
+settings_set_input_float_format ( enum float_format format)
+{
+ the_settings.input_float_format = format;
+}
-static int global_algorithm = ENHANCED;
-static int cmd_algorithm = ENHANCED;
-static int *algorithm = &global_algorithm;
+/* Returns the integer format used for IB and PIB input. */
+enum integer_format
+settings_get_input_integer_format (void)
+{
+ return the_settings.input_integer_format;
+}
-static int syntax = ENHANCED;
+/* Sets the integer format used for IB and PIB input to
+ FORMAT. */
+void
+settings_set_input_integer_format ( enum integer_format format)
+{
+ the_settings.input_integer_format = format;
+}
-static void init_viewport (int *, int *);
+/* Returns the current output integer format. */
+enum integer_format
+settings_get_output_integer_format (void)
+{
+ return the_settings.output_integer_format;
+}
+/* Sets the output integer format to INTEGER_FORMAT. */
void
-settings_init (int *width, int *length)
+settings_set_output_integer_format (
+ enum integer_format integer_format)
{
- init_viewport (width, length);
- i18n_init ();
+ the_settings.output_integer_format = integer_format;
+}
+
+/* Returns the current output float format. */
+enum float_format
+settings_get_output_float_format (void)
+{
+ return the_settings.output_float_format;
}
+/* Sets the output float format to FLOAT_FORMAT. */
void
-settings_done (void)
+settings_set_output_float_format ( enum float_format float_format)
{
- i18n_done ();
+ the_settings.output_float_format = float_format;
}
/* Screen length in lines. */
int
-get_viewlength (void)
+settings_get_viewlength (void)
{
- return *viewlength;
+ return *the_settings.viewlength;
}
/* Sets the view length. */
void
-set_viewlength (int viewlength_)
+settings_set_viewlength ( int viewlength_)
{
- *viewlength = viewlength_;
+ *the_settings.viewlength = viewlength_;
}
/* Screen width. */
int
-get_viewwidth(void)
+settings_get_viewwidth(void)
{
- return *viewwidth;
+ return *the_settings.viewwidth;
}
/* Sets the screen width. */
void
-set_viewwidth (int viewwidth_)
+settings_set_viewwidth ( int viewwidth_)
{
- *viewwidth = viewwidth_;
+ *the_settings.viewwidth = viewwidth_;
}
static void
-init_viewport (int *width, int *length)
+init_viewport ( int *width, int *length)
{
- viewwidth = width;
- viewlength = length;
+ the_settings.viewwidth = width;
+ the_settings.viewlength = length;
}
/* Whether PSPP can erase and overwrite files. */
bool
-get_safer_mode (void)
+settings_get_safer_mode (void)
{
- return safer_mode;
+ return the_settings.safer_mode;
}
/* Set safer mode. */
void
-set_safer_mode (void)
+settings_set_safer_mode (void)
{
- safer_mode = true;
+ the_settings.safer_mode = true;
}
/* Echo commands to the listing file/printer? */
bool
-get_echo (void)
+settings_get_echo (void)
{
- return do_echo;
+ return the_settings.do_echo;
}
/* Set echo. */
void
-set_echo (bool echo_)
+settings_set_echo ( bool echo)
{
- do_echo = echo_;
+ the_settings.do_echo = echo;
}
/* If echo is on, whether commands from include files are echoed. */
bool
-get_include (void)
+settings_get_include (void)
{
- return include;
+ return the_settings.include;
}
/* Set include file echo. */
void
-set_include (bool include_)
+settings_set_include ( bool include)
{
- include = include_;
+ the_settings.include = include;
}
/* What year to use as the start of the epoch. */
int
-get_epoch (void)
+settings_get_epoch (void)
+{
+ assert (the_settings.epoch >= 0);
+
+ return the_settings.epoch;
+}
+
+/* Sets the year that starts the epoch. */
+void
+settings_set_epoch ( int epoch)
{
if (epoch < 0)
{
epoch = (tm != NULL ? tm->tm_year + 1900 : 2000) - 69;
}
- return epoch;
-}
-
-/* Sets the year that starts the epoch. */
-void
-set_epoch (int epoch_)
-{
- epoch = epoch_;
+ the_settings.epoch = epoch;
+ assert (the_settings.epoch >= 0);
}
/* Does an error stop execution? */
bool
-get_errorbreak (void)
+settings_get_errorbreak (void)
{
- return errorbreak;
+ return the_settings.errorbreak;
}
/* Sets whether an error stops execution. */
void
-set_errorbreak (bool errorbreak_)
+settings_set_errorbreak ( bool errorbreak)
{
- errorbreak = errorbreak_;
+ the_settings.errorbreak = errorbreak;
}
/* Route error messages to terminal? */
bool
-get_error_routing_to_terminal (void)
+settings_get_error_routing_to_terminal (void)
{
- return route_errors_to_terminal;
+ return the_settings.route_errors_to_terminal;
}
/* Sets whether error messages should be routed to the
terminal. */
void
-set_error_routing_to_terminal (bool route_to_terminal)
+settings_set_error_routing_to_terminal ( bool route_to_terminal)
{
- route_errors_to_terminal = route_to_terminal;
+ the_settings.route_errors_to_terminal = route_to_terminal;
}
/* Route error messages to listing file? */
bool
-get_error_routing_to_listing (void)
+settings_get_error_routing_to_listing (void)
{
- return route_errors_to_listing;
+ return the_settings.route_errors_to_listing;
}
/* Sets whether error messages should be routed to the
listing file. */
void
-set_error_routing_to_listing (bool route_to_listing)
+settings_set_error_routing_to_listing ( bool route_to_listing)
{
- route_errors_to_listing = route_to_listing;
+ the_settings.route_errors_to_listing = route_to_listing;
}
/* Compress system files by default? */
bool
-get_scompression (void)
+settings_get_scompression (void)
{
- return scompress;
+ return the_settings.scompress;
}
/* Set system file default compression. */
void
-set_scompression (bool scompress_)
+settings_set_scompression ( bool scompress)
{
- scompress = scompress_;
+ the_settings.scompress = scompress;
}
/* Whether to warn on undefined values in numeric data. */
bool
-get_undefined (void)
+settings_get_undefined (void)
{
- return undefined;
+ return the_settings.undefined;
}
/* Set whether to warn on undefined values. */
void
-set_undefined (bool undefined_)
+settings_set_undefined ( bool undefined)
{
- undefined = undefined_;
+ the_settings.undefined = undefined;
}
/* The value that blank numeric fields are set to when read in. */
double
-get_blanks (void)
+settings_get_blanks (void)
{
- return blanks;
+ return the_settings.blanks;
}
/* Set the value that blank numeric fields are set to when read
in. */
void
-set_blanks (double blanks_)
+settings_set_blanks ( double blanks)
{
- blanks = blanks_;
+ the_settings.blanks = blanks;
}
/* Maximum number of warnings + errors. */
int
-get_mxwarns (void)
+settings_get_mxwarns (void)
{
- return mxwarns;
+ return the_settings.mxwarns;
}
/* Sets maximum number of warnings + errors. */
void
-set_mxwarns (int mxwarns_)
+settings_set_mxwarns ( int mxwarns)
{
- mxwarns = mxwarns_;
+ the_settings.mxwarns = mxwarns;
}
/* Maximum number of errors. */
int
-get_mxerrs (void)
+settings_get_mxerrs (void)
{
- return mxerrs;
+ return the_settings.mxerrs;
}
/* Sets maximum number of errors. */
void
-set_mxerrs (int mxerrs_)
+settings_set_mxerrs ( int mxerrs)
{
- mxerrs = mxerrs_;
+ the_settings.mxerrs = mxerrs;
}
/* Whether commands are written to the display. */
bool
-get_printback (void)
+settings_get_printback (void)
{
- return printback;
+ return the_settings.printback;
}
/* Sets whether commands are written to the display. */
void
-set_printback (bool printback_)
+settings_set_printback ( bool printback)
{
- printback = printback_;
+ the_settings.printback = printback;
}
/* Independent of get_printback, controls whether the commands
generated by macro invocations are displayed. */
bool
-get_mprint (void)
+settings_get_mprint (void)
{
- return mprint;
+ return the_settings.mprint;
}
/* Sets whether the commands generated by macro invocations are
displayed. */
void
-set_mprint (bool mprint_)
+settings_set_mprint ( bool mprint)
{
- mprint = mprint_;
+ the_settings.mprint = mprint;
}
/* Implied limit of unbounded loop. */
int
-get_mxloops (void)
+settings_get_mxloops (void)
{
- return mxloops;
+ return the_settings.mxloops;
}
/* Set implied limit of unbounded loop. */
void
-set_mxloops (int mxloops_)
+settings_set_mxloops ( int mxloops)
{
- mxloops = mxloops_;
+ the_settings.mxloops = mxloops;
}
/* Whether a blank line is a command terminator. */
bool
-get_nulline (void)
+settings_get_nulline (void)
{
- return nulline;
+ return the_settings.nulline;
}
/* Set whether a blank line is a command terminator. */
void
-set_nulline (bool nulline_)
+settings_set_nulline ( bool nulline)
{
- nulline = nulline_;
+ the_settings.nulline = nulline;
}
/* The character used to terminate commands. */
char
-get_endcmd (void)
+settings_get_endcmd (void)
{
- return endcmd;
+ return the_settings.endcmd;
}
/* Set the character used to terminate commands. */
void
-set_endcmd (char endcmd_)
+settings_set_endcmd ( char endcmd)
{
- endcmd = endcmd_;
+ the_settings.endcmd = endcmd;
}
/* Approximate maximum amount of memory to use for cases, in
bytes. */
size_t
-get_workspace (void)
+settings_get_workspace (void)
{
- return workspace;
+ return the_settings.workspace;
}
/* Approximate maximum number of cases to allocate in-core, given
that each case contains VALUE_CNT values. */
size_t
-get_workspace_cases (size_t value_cnt)
+settings_get_workspace_cases (size_t value_cnt)
{
size_t case_size = sizeof (union value) * value_cnt + 4 * sizeof (void *);
- size_t case_cnt = MAX (get_workspace () / case_size, 4);
+ size_t case_cnt = MAX (settings_get_workspace () / case_size, 4);
return case_cnt;
}
bytes. */
void
-set_workspace (size_t workspace_)
+settings_set_workspace ( size_t workspace)
{
- workspace = workspace_;
+ the_settings.workspace = workspace;
}
/* Default format for variables created by transformations and by
DATA LIST {FREE,LIST}. */
const struct fmt_spec *
-get_format (void)
+settings_get_format (void)
{
- return &default_format;
+ return &the_settings.default_format;
}
/* Set default format for variables created by transformations
and by DATA LIST {FREE,LIST}. */
void
-set_format (const struct fmt_spec *default_format_)
+settings_set_format ( const struct fmt_spec *default_format)
{
- default_format = *default_format_;
+ the_settings.default_format = *default_format;
}
/* Are we in testing mode? (e.g. --testing-mode command line
option) */
bool
-get_testing_mode (void)
+settings_get_testing_mode (void)
{
- return testing_mode;
+ return the_settings.testing_mode;
}
/* Set testing mode. */
void
-set_testing_mode (bool testing_mode_)
+settings_set_testing_mode ( bool testing_mode)
{
- testing_mode = testing_mode_;
+ the_settings.testing_mode = testing_mode;
}
/* Return the current algorithm setting */
enum behavior_mode
-get_algorithm (void)
+settings_get_algorithm (void)
{
- return *algorithm;
+ return *the_settings.algorithm;
}
/* Set the algorithm option globally. */
void
-set_algorithm (enum behavior_mode mode)
+settings_set_algorithm (enum behavior_mode mode)
{
global_algorithm = mode;
}
/* Set the algorithm option for this command only */
void
-set_cmd_algorithm (enum behavior_mode mode)
+settings_set_cmd_algorithm ( enum behavior_mode mode)
{
- cmd_algorithm = mode;
- algorithm = &cmd_algorithm;
+ the_settings.cmd_algorithm = mode;
+ the_settings.algorithm = &the_settings.cmd_algorithm;
}
/* Unset the algorithm option for this command */
void
unset_cmd_algorithm (void)
{
- algorithm = &global_algorithm;
+ the_settings.algorithm = &global_algorithm;
}
/* Get the current syntax setting */
enum behavior_mode
-get_syntax (void)
+settings_get_syntax (void)
{
- return syntax;
+ return the_settings.syntax;
}
/* Set the syntax option */
void
-set_syntax (enum behavior_mode mode)
+settings_set_syntax ( enum behavior_mode mode)
{
- syntax = mode;
+ the_settings.syntax = mode;
+}
+
+\f
+
+/* Find the grouping characters in CC_STRING and set CC's
+ grouping and decimal members appropriately. Returns true if
+ successful, false otherwise. */
+static bool
+find_cc_separators (const char *cc_string, struct fmt_number_style *cc)
+{
+ const char *sp;
+ int comma_cnt, dot_cnt;
+
+ /* Count commas and periods. There must be exactly three of
+ one or the other, except that an apostrophe escapes a
+ following comma or period. */
+ comma_cnt = dot_cnt = 0;
+ for (sp = cc_string; *sp; sp++)
+ if (*sp == ',')
+ comma_cnt++;
+ else if (*sp == '.')
+ dot_cnt++;
+ else if (*sp == '\'' && (sp[1] == '.' || sp[1] == ',' || sp[1] == '\''))
+ sp++;
+
+ if ((comma_cnt == 3) == (dot_cnt == 3))
+ return false;
+
+ if (comma_cnt == 3)
+ {
+ cc->decimal = '.';
+ cc->grouping = ',';
+ }
+ else
+ {
+ cc->decimal = ',';
+ cc->grouping = '.';
+ }
+ return true;
+}
+
+/* Extracts a token from IN into a newly allocated AFFIX. Tokens
+ are delimited by GROUPING. The token is truncated to at most
+ FMT_STYLE_AFFIX_MAX characters. Returns the first character
+ following the token. */
+static const char *
+extract_cc_token (const char *in, int grouping, struct substring *affix)
+{
+ size_t ofs = 0;
+ ss_alloc_uninit (affix, FMT_STYLE_AFFIX_MAX);
+ for (; *in != '\0' && *in != grouping; in++)
+ {
+ if (*in == '\'' && in[1] == grouping)
+ in++;
+ if (ofs < FMT_STYLE_AFFIX_MAX)
+ ss_data (*affix)[ofs++] = *in;
+ }
+ affix->length = ofs;
+
+ if (*in == grouping)
+ in++;
+ return in;
+}
+
+
+/* Sets custom currency specifier CC having name CC_NAME ('A' through
+ 'E') to correspond to the settings in CC_STRING. */
+bool
+settings_set_cc (const char *cc_string, enum fmt_type type)
+{
+ struct fmt_number_style *cc = &the_settings.styles[type];
+
+ assert (fmt_get_category (type) == FMT_CAT_CUSTOM);
+
+ /* Determine separators. */
+ if (!find_cc_separators (cc_string, cc))
+ {
+ msg (SE, _("%s: Custom currency string `%s' does not contain "
+ "exactly three periods or commas (or it contains both)."),
+ fmt_name (type), cc_string);
+ return false;
+ }
+
+ cc_string = extract_cc_token (cc_string, cc->grouping, &cc->neg_prefix);
+ cc_string = extract_cc_token (cc_string, cc->grouping, &cc->prefix);
+ cc_string = extract_cc_token (cc_string, cc->grouping, &cc->suffix);
+ cc_string = extract_cc_token (cc_string, cc->grouping, &cc->neg_suffix);
+
+ fmt_check_style (cc);
+
+ return true;
+}
+
+/* Returns the decimal point character for TYPE. */
+int
+settings_get_decimal_char (enum fmt_type type)
+{
+ return fmt_get_style (the_settings.styles, type)->decimal;
+}
+
+void
+settings_set_decimal_char (char decimal)
+{
+ fmt_set_decimal (the_settings.styles, decimal);
+}
+
+
+
+/* Returns the number formatting style associated with the given
+ format TYPE. */
+const struct fmt_number_style *
+settings_get_style (enum fmt_type type)
+{
+ assert (is_fmt_type (type));
+ return &the_settings.styles[type];
+}
+
+
+/* Returns a string of the form "$#,###.##" according to FMT,
+ which must be of type FMT_DOLLAR. The caller must free the
+ string. */
+char *
+settings_dollar_template (const struct fmt_spec *fmt)
+{
+ const struct fmt_number_style *styles = the_settings.styles;
+ struct string str = DS_EMPTY_INITIALIZER;
+ int c;
+ const struct fmt_number_style *fns ;
+
+ assert (fmt->type == FMT_DOLLAR);
+
+ fns = fmt_get_style (styles, fmt->type);
+
+ ds_put_char (&str, '$');
+ for (c = MAX (fmt->w - fmt->d - 1, 0); c > 0; )
+ {
+ ds_put_char (&str, '#');
+ if (--c % 4 == 0 && c > 0)
+ {
+ ds_put_char (&str, fns->grouping);
+ --c;
+ }
+ }
+ if (fmt->d > 0)
+ {
+ ds_put_char (&str, fns->decimal);
+ ds_put_char_multiple (&str, '#', fmt->d);
+ }
+
+ return ds_cstr (&str);
}
#include <stdbool.h>
#include <stddef.h>
+#include "format.h"
+
+struct settings;
+
void settings_init (int *, int *);
void settings_done (void);
-int get_viewlength (void);
-void set_viewlength (int);
+enum float_format settings_get_input_float_format (void);
+void settings_set_input_float_format ( enum float_format);
+
+/* Returns the integer format used for IB and PIB input. */
+enum integer_format settings_get_input_integer_format (void);
+
+/* Sets the integer format used for IB and PIB input to
+ FORMAT. */
+void settings_set_input_integer_format ( enum integer_format);
+
+
+/* Returns the current output integer format. */
+enum integer_format settings_get_output_integer_format (void);
+
+/* Sets the output integer format to INTEGER_FORMAT. */
+void settings_set_output_integer_format (enum integer_format integer_format);
+
+/* Returns the current output float format. */
+enum float_format settings_get_output_float_format (void);
+
+/* Sets the output float format to FLOAT_FORMAT. */
+void settings_set_output_float_format (enum float_format float_format);
-int get_viewwidth (void);
-void set_viewwidth (int);
-bool get_safer_mode (void);
-void set_safer_mode (void);
-bool get_echo (void);
-void set_echo (bool);
-bool get_include (void);
-void set_include (bool);
+int settings_get_viewlength (void);
+void settings_set_viewlength ( int);
-int get_epoch (void);
-void set_epoch (int);
+int settings_get_viewwidth (void);
+void settings_set_viewwidth ( int);
-bool get_errorbreak (void);
-void set_errorbreak (bool);
+bool settings_get_safer_mode (void);
+void settings_set_safer_mode (void);
-bool get_error_routing_to_terminal (void);
-void set_error_routing_to_terminal (bool);
-bool get_error_routing_to_listing (void);
-void set_error_routing_to_listing (bool);
+bool settings_get_echo (void);
+void settings_set_echo ( bool);
+bool settings_get_include (void);
+void settings_set_include ( bool);
-bool get_scompression (void);
-void set_scompression (bool);
+int settings_get_epoch (void);
+void settings_set_epoch ( int);
-bool get_undefined (void);
-void set_undefined (bool);
-double get_blanks (void);
-void set_blanks (double);
+bool settings_get_errorbreak (void);
+void settings_set_errorbreak ( bool);
-int get_mxwarns (void);
-void set_mxwarns (int);
-int get_mxerrs (void);
-void set_mxerrs (int);
+bool settings_get_error_routing_to_terminal (void);
+void settings_set_error_routing_to_terminal (bool);
+bool settings_get_error_routing_to_listing (void);
+void settings_set_error_routing_to_listing (bool);
-bool get_printback (void);
-void set_printback (bool);
-bool get_mprint (void);
-void set_mprint (bool);
+bool settings_get_scompression (void);
+void settings_set_scompression (bool);
-int get_mxloops (void);
-void set_mxloops (int);
+bool settings_get_undefined (void);
+void settings_set_undefined (bool);
+double settings_get_blanks (void);
+void settings_set_blanks (double);
-bool get_nulline (void);
-void set_nulline (bool);
+int settings_get_mxwarns (void);
+void settings_set_mxwarns ( int);
+int settings_get_mxerrs (void);
+void settings_set_mxerrs ( int);
-char get_endcmd (void);
-void set_endcmd (char);
+bool settings_get_printback (void);
+void settings_set_printback (bool);
+bool settings_get_mprint (void);
+void settings_set_mprint (bool);
-size_t get_workspace (void);
-size_t get_workspace_cases (size_t value_cnt);
-void set_workspace (size_t);
+int settings_get_mxloops (void);
+void settings_set_mxloops ( int);
-const struct fmt_spec *get_format (void);
-void set_format (const struct fmt_spec *);
+bool settings_get_nulline (void);
+void settings_set_nulline (bool);
-bool get_testing_mode (void);
-void set_testing_mode (bool);
+char settings_get_endcmd (void);
+void settings_set_endcmd (char);
+
+size_t settings_get_workspace (void);
+size_t settings_get_workspace_cases (size_t value_cnt);
+void settings_set_workspace ( size_t);
+
+const struct fmt_spec *settings_get_format (void);
+void settings_set_format ( const struct fmt_spec *);
+
+bool settings_get_testing_mode (void);
+void settings_set_testing_mode ( bool);
enum behavior_mode {
ENHANCED, /* Use improved PSPP behavior. */
COMPATIBLE /* Be as compatible as possible. */
};
-enum behavior_mode get_algorithm (void);
-void set_algorithm (enum behavior_mode);
-enum behavior_mode get_syntax (void);
-void set_syntax(enum behavior_mode);
-void set_cmd_algorithm (enum behavior_mode);
+enum behavior_mode settings_get_algorithm (void);
+void settings_set_algorithm (enum behavior_mode);
+enum behavior_mode settings_get_syntax (void);
+void settings_set_syntax (enum behavior_mode);
+
+void settings_set_cmd_algorithm (enum behavior_mode);
void unset_cmd_algorithm (void);
+bool settings_set_cc (const char *cc_string, enum fmt_type type);
+
+int settings_get_decimal_char (enum fmt_type type);
+void settings_set_decimal_char (char decimal);
+
+
+const struct fmt_number_style * settings_get_style (enum fmt_type type);
+
+char * settings_dollar_template (const struct fmt_spec *fmt);
+
#endif /* !settings_h */
struct sparse_cases *sc = xmalloc (sizeof *sc);
sc->column_cnt = column_cnt;
sc->default_columns = NULL;
- sc->max_memory_cases = get_workspace_cases (column_cnt);
+ sc->max_memory_cases = settings_get_workspace_cases (column_cnt);
sc->memory = sparse_array_create (sizeof (struct ccase));
sc->disk = NULL;
sc->disk_cases = NULL;
{
struct sfm_write_options opts;
opts.create_writeable = true;
- opts.compress = get_scompression ();
+ opts.compress = settings_get_scompression ();
opts.version = 3;
return opts;
}
result = CMD_NOT_IMPLEMENTED;
goto finish;
}
- else if ((command->flags & F_TESTING) && !get_testing_mode ())
+ else if ((command->flags & F_TESTING) && !settings_get_testing_mode ())
{
msg (SE, _("%s may be used only in testing mode."), command->name);
result = CMD_FAILURE;
goto finish;
}
- else if ((command->flags & F_ENHANCED) && get_syntax () != ENHANCED)
+ else if ((command->flags & F_ENHANCED) && settings_get_syntax () != ENHANCED)
{
msg (SE, _("%s may be used only in enhanced syntax mode."),
command->name);
for (; *cmd < commands + command_cnt; (*cmd)++)
if (!memcasecmp ((*cmd)->name, prefix, strlen (prefix))
- && (!((*cmd)->flags & F_TESTING) || get_testing_mode ())
- && (!((*cmd)->flags & F_ENHANCED) || get_syntax () == ENHANCED)
+ && (!((*cmd)->flags & F_TESTING) || settings_get_testing_mode ())
+ && (!((*cmd)->flags & F_ENHANCED) || settings_get_syntax () == ENHANCED)
&& !((*cmd)->flags & F_ABBREV)
&& ((*cmd)->function != NULL)
&& in_correct_state (*cmd, completion_state))
int
cmd_erase (struct lexer *lexer, struct dataset *ds UNUSED)
{
- if (get_safer_mode ())
+ if (settings_get_safer_mode ())
{
msg (SE, _("This command not allowed when the SAFER option is set."));
return CMD_FAILURE;
{
int look_ahead;
- if (get_safer_mode ())
+ if (settings_get_safer_mode ())
{
msg (SE, _("This command not allowed when the SAFER option is set."));
return CMD_FAILURE;
&& loop->index_var == NULL
&& loop->loop_condition == NULL
&& loop->end_loop_condition == NULL)
- loop->max_pass_count = get_mxloops ();
+ loop->max_pass_count = settings_get_mxloops ();
}
/* Parses an IF clause for LOOP or END LOOP and stores the
&command_ends_after_line);
if (recognize_do_repeat (ds_ss (&text)))
{
- if (get_syntax () == COMPATIBLE)
+ if (settings_get_syntax () == COMPATIBLE)
msg (SE, _("DO REPEAT may not nest in compatibility mode."));
else
nesting_level++;
/* Strip trailing whitespace, check for & remove terminal dot. */
ds_rtrim (line, ss_cstr (CC_SPACES));
- dot = ds_chomp (line, get_endcmd ());
-
+ dot = ds_chomp (line, settings_get_endcmd ());
input = ds_ss (line);
in_apos = in_quote = false;
while ((c = ss_first (input)) != EOF)
}
}
if (dot)
- ds_put_char (&output, get_endcmd ());
+ ds_put_char (&output, settings_get_endcmd ());
ds_swap (line, &output);
ds_destroy (&output);
{
lex_match (lexer, '*');
input = fmt_for_input (FMT_F, 8, 0);
- output = *get_format ();
+ output = *settings_get_format ();
}
for (i = 0; i < name_cnt; i++)
{
if (!cut_field (parser, reader, &s))
{
- if (get_undefined ())
+ if (settings_get_undefined ())
msg (SW, _("Missing value(s) for all variables from %s onward. "
"These will be filled with the system-missing value "
"or blanks, as appropriate."),
handle = fh_from_id (lex_tokid (lexer));
if (handle == NULL)
{
- if (lex_token (lexer) != T_ID || lex_tokid (lexer)[0] != '#' || get_syntax () != ENHANCED)
+ if (lex_token (lexer) != T_ID || lex_tokid (lexer)[0] != '#' || settings_get_syntax () != ENHANCED)
handle = fh_create_file (NULL, ds_cstr (lex_tokstr (lexer)),
fh_default_properties ());
else
+ tm->tm_sec);
}
else if (lex_match_id (lexer, "$LENGTH"))
- return expr_allocate_number (e, get_viewlength ());
+ return expr_allocate_number (e, settings_get_viewlength ());
else if (lex_match_id (lexer, "$WIDTH"))
- return expr_allocate_number (e, get_viewwidth ());
+ return expr_allocate_number (e, settings_get_viewwidth ());
else
{
msg (SE, _("Unknown system variable %s."), lex_tokid (lexer));
if (!validate_function_args (f, arg_cnt, min_valid))
goto fail;
- if ((f->flags & OPF_EXTENSION) && get_syntax () == COMPATIBLE)
+ if ((f->flags & OPF_EXTENSION) && settings_get_syntax () == COMPATIBLE)
msg (SW, _("%s is a PSPP extension."), f->prototype);
if (f->flags & OPF_UNIMPLEMENTED)
{
{
strip_comments (line);
ds_rtrim (line, ss_cstr (CC_SPACES));
- *line_ends_command = (ds_chomp (line, get_endcmd ())
- || (ds_is_empty (line) && get_nulline ()));
+ *line_ends_command = (ds_chomp (line, settings_get_endcmd ())
+ || (ds_is_empty (line) && settings_get_nulline ()));
*line_starts_command = false;
if (syntax == GETL_BATCH)
{
/* Now deal with the /ALGORITHM subcommand implicit to all commands */
- dump(1,"else if ( get_syntax() != COMPATIBLE && lex_match_id(lexer, \"ALGORITHM\"))");
+ dump(1,"else if ( settings_get_syntax () != COMPATIBLE && lex_match_id(lexer, \"ALGORITHM\"))");
dump(1,"{");
dump (0, "lex_match (lexer, '=');");
dump(1,"if (lex_match_id(lexer, \"COMPATIBLE\"))");
- dump(0,"set_cmd_algorithm(COMPATIBLE);");
+ dump(0,"settings_set_cmd_algorithm (COMPATIBLE);");
outdent();
dump(1,"else if (lex_match_id(lexer, \"ENHANCED\"))");
- dump(0,"set_cmd_algorithm(ENHANCED);");
+ dump(0,"settings_set_cmd_algorithm (ENHANCED);");
dump (-1, "}");
outdent ();
/* Allocate memory for many cases. */
case_bytes = flip->var_cnt * sizeof *input_buf;
- case_capacity = get_workspace () / case_bytes;
+ case_capacity = settings_get_workspace () / case_bytes;
if (case_capacity > flip->case_cnt * 2)
case_capacity = flip->case_cnt * 2;
if (case_capacity < 2)
vf->groups = NULL;
vf->width = var_get_width (v);
vf->print = *var_get_print_format (v);
- if (vf->width > MAX_SHORT_STRING && get_algorithm () == COMPATIBLE)
+ if (vf->width > MAX_SHORT_STRING && settings_get_algorithm () == COMPATIBLE)
{
enum fmt_type type = var_get_print_format (v)->type;
vf->width = MAX_SHORT_STRING;
double tp;
if ( percentiles[i].flag2 ) continue ;
- if ( get_algorithm() != COMPATIBLE )
+ if ( settings_get_algorithm () != COMPATIBLE )
tp =
(ft->valid_cases - 1) * percentiles[i].p;
else
double s;
double dummy;
- if ( get_algorithm() != COMPATIBLE )
+ if ( settings_get_algorithm () != COMPATIBLE )
{
s = modf((ft->valid_cases - 1) * percentiles[i].p , &dummy);
}
if (ordering == NULL)
return CMD_CASCADING_FAILURE;
- if (get_testing_mode () && lex_match (lexer, '/'))
+ if (settings_get_testing_mode () && lex_match (lexer, '/'))
{
if (!lex_force_match_id (lexer, "BUFFERS") || !lex_match (lexer, '=')
|| !lex_force_int (lexer))
while (sfs->ln == 1 && !memcmp (ds_cstr (line), "#!", 2));
/* Echo to listing file, if configured to do so. */
- if (get_echo ())
+ if (settings_get_echo ())
tab_output_text (TAB_LEFT | TAB_FIX, ds_cstr (line));
return true;
int
-change_permissions(const char *file_name, enum PER per)
+change_permissions (const char *file_name, enum PER per)
{
struct stat buf;
mode_t mode;
- if (get_safer_mode ())
+ if (settings_get_safer_mode ())
{
msg (SE, _("This command not allowed when the SAFER option is set."));
return CMD_FAILURE;
/* (functions) */
-static bool do_cc (const char *cc_string, enum fmt_type);
static enum integer_format stc_to_integer_format (int stc);
static enum float_format stc_to_float_format (int stc);
}
if (cmd.sbc_cca)
- do_cc (cmd.s_cca, FMT_CCA);
+ settings_set_cc ( cmd.s_cca, FMT_CCA);
if (cmd.sbc_ccb)
- do_cc (cmd.s_ccb, FMT_CCB);
+ settings_set_cc ( cmd.s_ccb, FMT_CCB);
if (cmd.sbc_ccc)
- do_cc (cmd.s_ccc, FMT_CCC);
+ settings_set_cc ( cmd.s_ccc, FMT_CCC);
if (cmd.sbc_ccd)
- do_cc (cmd.s_ccd, FMT_CCD);
+ settings_set_cc ( cmd.s_ccd, FMT_CCD);
if (cmd.sbc_cce)
- do_cc (cmd.s_cce, FMT_CCE);
+ settings_set_cc ( cmd.s_cce, FMT_CCE);
if (cmd.sbc_prompt)
prompt_set (PROMPT_FIRST, cmd.s_prompt);
prompt_set (PROMPT_DATA, cmd.s_dprompt);
if (cmd.sbc_decimal)
- fmt_set_decimal (cmd.dec == STC_DOT ? '.' : ',');
+ settings_set_decimal_char (cmd.dec == STC_DOT ? '.' : ',');
+
if (cmd.sbc_echo)
- set_echo (cmd.echo == STC_ON);
+ settings_set_echo (cmd.echo == STC_ON);
if (cmd.sbc_endcmd)
- set_endcmd (cmd.s_endcmd[0]);
+ settings_set_endcmd (cmd.s_endcmd[0]);
if (cmd.sbc_errorbreak)
- set_errorbreak (cmd.errbrk == STC_ON);
+ settings_set_errorbreak (cmd.errbrk == STC_ON);
if (cmd.sbc_errors)
{
bool both = cmd.errors == STC_BOTH || cmd.errors == STC_ON;
- set_error_routing_to_terminal (cmd.errors == STC_TERMINAL || both);
- set_error_routing_to_listing (cmd.errors == STC_LISTING || both);
+ settings_set_error_routing_to_terminal (cmd.errors == STC_TERMINAL || both);
+ settings_set_error_routing_to_listing (cmd.errors == STC_LISTING || both);
}
if (cmd.sbc_include)
- set_include (cmd.inc == STC_ON);
+ settings_set_include (cmd.inc == STC_ON);
if (cmd.sbc_mxerrs)
- set_mxerrs (cmd.n_mxerrs[0]);
+ settings_set_mxerrs (cmd.n_mxerrs[0]);
if (cmd.sbc_mxwarns)
- set_mxwarns (cmd.n_mxwarns[0]);
+ settings_set_mxwarns (cmd.n_mxwarns[0]);
if (cmd.sbc_nulline)
- set_nulline (cmd.null == STC_ON);
+ settings_set_nulline (cmd.null == STC_ON);
if (cmd.sbc_rib)
- data_in_set_integer_format (stc_to_integer_format (cmd.rib));
+ settings_set_input_integer_format (stc_to_integer_format (cmd.rib));
if (cmd.sbc_rrb)
- data_in_set_float_format (stc_to_float_format (cmd.rrb));
+ settings_set_input_float_format (stc_to_float_format (cmd.rrb));
if (cmd.sbc_safer)
- set_safer_mode ();
+ settings_set_safer_mode ();
if (cmd.sbc_scompression)
- set_scompression (cmd.scompress == STC_ON);
+ settings_set_scompression (cmd.scompress == STC_ON);
if (cmd.sbc_undefined)
- set_undefined (cmd.undef == STC_WARN);
+ settings_set_undefined (cmd.undef == STC_WARN);
if (cmd.sbc_wib)
- data_out_set_integer_format (stc_to_integer_format (cmd.wib));
+ settings_set_output_integer_format (stc_to_integer_format (cmd.wib));
if (cmd.sbc_wrb)
- data_out_set_float_format (stc_to_float_format (cmd.wrb));
+ settings_set_output_float_format (stc_to_float_format (cmd.wrb));
if (cmd.sbc_workspace)
- set_workspace (cmd.n_workspace[0] * 1024L);
+ settings_set_workspace (cmd.n_workspace[0] * 1024L);
if (cmd.sbc_block)
msg (SW, _("%s is obsolete."), "BLOCK");
NOT_REACHED ();
}
-/* Find the grouping characters in CC_STRING and set CC's
- grouping and decimal members appropriately. Returns true if
- successful, false otherwise. */
-static bool
-find_cc_separators (const char *cc_string, struct fmt_number_style *cc)
-{
- const char *sp;
- int comma_cnt, dot_cnt;
-
- /* Count commas and periods. There must be exactly three of
- one or the other, except that an apostrophe escapes a
- following comma or period. */
- comma_cnt = dot_cnt = 0;
- for (sp = cc_string; *sp; sp++)
- if (*sp == ',')
- comma_cnt++;
- else if (*sp == '.')
- dot_cnt++;
- else if (*sp == '\'' && (sp[1] == '.' || sp[1] == ',' || sp[1] == '\''))
- sp++;
-
- if ((comma_cnt == 3) == (dot_cnt == 3))
- return false;
- if (comma_cnt == 3)
- {
- cc->decimal = '.';
- cc->grouping = ',';
- }
- else
- {
- cc->decimal = ',';
- cc->grouping = '.';
- }
- return true;
-}
-
-/* Extracts a token from IN into a newly allocated AFFIX. Tokens
- are delimited by GROUPING. The token is truncated to at most
- FMT_STYLE_AFFIX_MAX characters. Returns the first character
- following the token. */
-static const char *
-extract_cc_token (const char *in, int grouping, struct substring *affix)
-{
- size_t ofs = 0;
- ss_alloc_uninit (affix, FMT_STYLE_AFFIX_MAX);
- for (; *in != '\0' && *in != grouping; in++)
- {
- if (*in == '\'' && in[1] == grouping)
- in++;
- if (ofs < FMT_STYLE_AFFIX_MAX)
- ss_data (*affix)[ofs++] = *in;
- }
- affix->length = ofs;
-
- if (*in == grouping)
- in++;
- return in;
-}
-
-/* Sets custom currency specifier CC having name CC_NAME ('A' through
- 'E') to correspond to the settings in CC_STRING. */
-static bool
-do_cc (const char *cc_string, enum fmt_type type)
-{
- struct fmt_number_style *cc = fmt_number_style_create ();
-
- /* Determine separators. */
- if (!find_cc_separators (cc_string, cc))
- {
- fmt_number_style_destroy (cc);
- msg (SE, _("%s: Custom currency string `%s' does not contain "
- "exactly three periods or commas (or it contains both)."),
- fmt_name (type), cc_string);
- return false;
- }
-
- cc_string = extract_cc_token (cc_string, cc->grouping, &cc->neg_prefix);
- cc_string = extract_cc_token (cc_string, cc->grouping, &cc->prefix);
- cc_string = extract_cc_token (cc_string, cc->grouping, &cc->suffix);
- cc_string = extract_cc_token (cc_string, cc->grouping, &cc->neg_suffix);
-
- fmt_set_style (type, cc);
-
- return true;
-}
/* Parses the BLANKS subcommand, which controls the value that
completely blank fields in numeric data imply. X, Wnd: Syntax is
if (lex_match_id (lexer, "SYSMIS"))
{
lex_get (lexer);
- set_blanks (SYSMIS);
+ settings_set_blanks (SYSMIS);
}
else
{
if (!lex_force_num (lexer))
return 0;
- set_blanks (lex_number (lexer));
+ settings_set_blanks (lex_number (lexer));
lex_get (lexer);
}
return 1;
{
lex_match (lexer, '=');
if (lex_match_id (lexer, "AUTOMATIC"))
- set_epoch (-1);
+ settings_set_epoch (-1);
else if (lex_is_integer (lexer))
{
int new_epoch = lex_integer (lexer);
msg (SE, _("EPOCH must be 1500 or later."));
return 0;
}
- set_epoch (new_epoch);
+ settings_set_epoch (new_epoch);
}
else
{
}
if (page_length != -1)
- set_viewlength (page_length);
+ settings_set_viewlength (page_length);
return 1;
}
{
lex_match (lexer, '=');
if (lex_match_id (lexer, "NARROW"))
- set_viewwidth (79);
+ settings_set_viewwidth (79);
else if (lex_match_id (lexer, "WIDE"))
- set_viewwidth (131);
+ settings_set_viewwidth (131);
else
{
if (!lex_force_int (lexer))
msg (SE, _("WIDTH must be at least 40."));
return 0;
}
- set_viewwidth (lex_integer (lexer));
+ settings_set_viewwidth (lex_integer (lexer));
lex_get (lexer);
}
return 0;
}
- set_format (&fmt);
+ settings_set_format (&fmt);
return 1;
}
static void
show_blanks (const struct dataset *ds UNUSED)
{
- if (get_blanks () == SYSMIS)
+ if (settings_get_blanks () == SYSMIS)
msg (SN, _("BLANKS is SYSMIS."));
else
- msg (SN, _("BLANKS is %g."), get_blanks ());
+ msg (SN, _("BLANKS is %g."), settings_get_blanks ());
}
static void
show_cc (enum fmt_type type)
{
- const struct fmt_number_style *cc = fmt_get_style (type);
+ const struct fmt_number_style *cc = settings_get_style (type);
char cc_string[FMT_STYLE_AFFIX_MAX * 4 * 2 + 3 + 1];
char *out;
static void
show_decimals (const struct dataset *ds UNUSED)
{
- msg (SN, _("DECIMAL is \"%c\"."), fmt_decimal_char (FMT_F));
+ msg (SN, _("DECIMAL is \"%c\"."), settings_get_decimal_char (FMT_F));
}
static void
show_endcmd (const struct dataset *ds UNUSED)
{
- msg (SN, _("ENDCMD is \"%c\"."), get_endcmd ());
+ msg (SN, _("ENDCMD is \"%c\"."), settings_get_endcmd ());
}
static void
show_errors (const struct dataset *ds UNUSED)
{
- bool terminal = get_error_routing_to_terminal ();
- bool listing = get_error_routing_to_listing ();
+ bool terminal = settings_get_error_routing_to_terminal ();
+ bool listing = settings_get_error_routing_to_listing ();
msg (SN, _("ERRORS is \"%s\"."),
terminal && listing ? "BOTH"
: terminal ? "TERMINAL"
show_format (const struct dataset *ds UNUSED)
{
char str[FMT_STRING_LEN_MAX + 1];
- msg (SN, _("FORMAT is %s."), fmt_to_string (get_format (), str));
+ msg (SN, _("FORMAT is %s."), fmt_to_string (settings_get_format (), str));
}
static void
show_length (const struct dataset *ds UNUSED)
{
- msg (SN, _("LENGTH is %d."), get_viewlength ());
+ msg (SN, _("LENGTH is %d."), settings_get_viewlength ());
}
static void
show_mxerrs (const struct dataset *ds UNUSED)
{
- msg (SN, _("MXERRS is %d."), get_mxerrs ());
+ msg (SN, _("MXERRS is %d."), settings_get_mxerrs ());
}
static void
show_mxloops (const struct dataset *ds UNUSED)
{
- msg (SN, _("MXLOOPS is %d."), get_mxloops ());
+ msg (SN, _("MXLOOPS is %d."), settings_get_mxloops ());
}
static void
show_mxwarns (const struct dataset *ds UNUSED)
{
- msg (SN, _("MXWARNS is %d."), get_mxwarns ());
+ msg (SN, _("MXWARNS is %d."), settings_get_mxwarns ());
}
/* Outputs that SETTING has the given INTEGER_FORMAT value. */
static void
show_rib (const struct dataset *ds UNUSED)
{
- show_integer_format ("RIB", data_in_get_integer_format ());
+ show_integer_format ("RIB", settings_get_input_integer_format ());
}
static void
show_rrb (const struct dataset *ds UNUSED)
{
- show_float_format ("RRB", data_in_get_float_format ());
+ show_float_format ("RRB", settings_get_input_float_format ());
}
static void
show_scompression (const struct dataset *ds UNUSED)
{
- if (get_scompression ())
+ if (settings_get_scompression ())
msg (SN, _("SCOMPRESSION is ON."));
else
msg (SN, _("SCOMPRESSION is OFF."));
static void
show_undefined (const struct dataset *ds UNUSED)
{
- if (get_undefined ())
+ if (settings_get_undefined ())
msg (SN, _("UNDEFINED is WARN."));
else
msg (SN, _("UNDEFINED is NOWARN."));
static void
show_weight (const struct dataset *ds)
{
- struct variable *var = dict_get_weight (dataset_dict (ds));
+ const struct variable *var = dict_get_weight (dataset_dict (ds));
if (var == NULL)
msg (SN, _("WEIGHT is off."));
else
static void
show_wib (const struct dataset *ds UNUSED)
{
- show_integer_format ("WIB", data_out_get_integer_format ());
+ show_integer_format ("WIB", settings_get_output_integer_format ());
}
static void
show_wrb (const struct dataset *ds UNUSED)
{
- show_float_format ("WRB", data_out_get_float_format ());
+ show_float_format ("WRB", settings_get_output_float_format ());
}
static void
show_width (const struct dataset *ds UNUSED)
{
- msg (SN, _("WIDTH is %d."), get_viewwidth ());
+ msg (SN, _("WIDTH is %d."), settings_get_viewwidth ());
}
struct show_sbc
pq = xmalloc (sizeof *pq);
pq->ordering = case_ordering_clone (ordering);
pq->record_cap
- = get_workspace_cases (case_ordering_get_value_cnt (ordering));
+ = settings_get_workspace_cases (case_ordering_get_value_cnt (ordering));
if (pq->record_cap > max_buffers)
pq->record_cap = max_buffers;
else if (pq->record_cap < min_buffers)
int margins = x->top_margin + x->bottom_margin + 1 + (x->headers ? 3 : 0);
if (x->auto_width)
- this->width = get_viewwidth ();
+ this->width = settings_get_viewwidth ();
if (x->auto_length)
- x->page_length = get_viewlength ();
+ x->page_length = settings_get_viewlength ();
this->length = x->page_length - margins;
return ds_cstr (&d->value);
if (!strcmp (key, "viewwidth"))
{
- sprintf (buf, "%d", get_viewwidth ());
+ sprintf (buf, "%d", settings_get_viewwidth ());
return buf;
}
else if (!strcmp (key, "viewlength"))
{
- sprintf (buf, "%d", get_viewlength ());
+ sprintf (buf, "%d", settings_get_viewlength ());
return buf;
}
else
void
outp_list_classes (void)
{
- int width = get_viewwidth();
+ int width = settings_get_viewwidth ();
struct outp_driver_class_list *c;
printf (_("Driver classes:\n\t"));
if ((int) strlen (c->class->name) + 1 > width)
{
printf ("\n\t");
- width = get_viewwidth() - 8;
+ width = settings_get_viewwidth () - 8;
}
else
putc (' ', stdout);
glade_init ();
gsl_set_error_handler_off ();
- fmt_init ();
fn_init ();
outp_init ();
settings_init (&viewer_width, &viewer_length);
for ( i = 0 ; i < sizeof (dollar_format)/sizeof (dollar_format[0]) ; ++i )
{
- char *template = fmt_dollar_template (&dollar_format[i]);
+ char *template = settings_dollar_template (&dollar_format[i]);
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
0, template,
/* Compatibility options */
case 'a':
if ( 0 == strcmp(optarg,"compatible") )
- set_algorithm(COMPATIBLE);
+ settings_set_algorithm(COMPATIBLE);
else if ( 0 == strcmp(optarg,"enhanced"))
- set_algorithm(ENHANCED);
+ settings_set_algorithm(ENHANCED);
else
{
usage ();
case 'x':
if ( 0 == strcmp(optarg,"compatible") )
- set_syntax(COMPATIBLE);
+ settings_set_syntax (COMPATIBLE);
else if ( 0 == strcmp(optarg,"enhanced"))
- set_syntax(ENHANCED);
+ settings_set_syntax (ENHANCED);
else
{
usage ();
process_statrc = false;
break;
case 's':
- set_safer_mode ();
+ settings_set_safer_mode ();
break;
case 'v':
verbose_increment_level ();
puts (legal);
return false;
case 'T':
- set_testing_mode (true);
+ settings_set_testing_mode (true);
break;
case '?':
usage ();
fpu_init ();
gsl_set_error_handler_off ();
- fmt_init ();
outp_init ();
fn_init ();
fh_init ();
if (parse_command_line (argc, argv, the_source_stream))
{
msg_ui_init (the_source_stream);
- if (!get_testing_mode ())
+ if (!settings_get_testing_mode ())
outp_read_devices ();
else
outp_configure_driver_line (
readln_uninitialize ();
outp_done ();
msg_ui_done ();
- fmt_done ();
}
}
{
if (!getl_is_interactive (ss))
{
- if (get_errorbreak () && error_count)
+ if (settings_get_errorbreak () && error_count)
msg (MN, _("Terminating execution of syntax file due to error."));
- else if (error_count > get_mxerrs() )
+ else if (error_count > settings_get_mxerrs () )
msg (MN, _("Errors (%d) exceeds limit (%d)."),
- error_count, get_mxerrs());
- else if (error_count + warning_count > get_mxwarns() )
+ error_count, settings_get_mxerrs ());
+ else if (error_count + warning_count > settings_get_mxwarns () )
msg (MN, _("Warnings (%d) exceed limit (%d)."),
- error_count + warning_count, get_mxwarns() );
+ error_count + warning_count, settings_get_mxwarns () );
else
return;
ds_put_cstr (&string, m->text);
- if (msg_file != stdout || get_error_routing_to_terminal ())
+ if (msg_file != stdout || settings_get_error_routing_to_terminal ())
dump_message (ds_cstr (&string),
- isatty (fileno (msg_file)) ? get_viewwidth () : INT_MAX, 8,
+ isatty (fileno (msg_file)) ? settings_get_viewwidth () : INT_MAX, 8,
write_stream, msg_file);
dump_message (ds_cstr (&string), 78, 0, write_journal, NULL);
- if (get_error_routing_to_listing ())
+ if (settings_get_error_routing_to_listing ())
{
/* Disable screen output devices, because the error should
already have been reported to the screen with the
initialised = false;
#if HAVE_READLINE
- if (history_file != NULL && false == get_testing_mode() )
+ if (history_file != NULL && false == settings_get_testing_mode () )
write_history (history_file);
clear_history ();
free (history_file);