/* PSPP - computes sample statistics.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
static bool safer_mode = false;
-static char decimal = '.';
-static char grouping = ',';
-
static bool echo = false;
static bool include = true;
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 struct fmt_spec default_format = {FMT_F, 8, 2};
-#define CC_INITIALIZER {"-", "", "", "", '.', ','}
-static struct custom_currency cc[CC_CNT] =
- {
- CC_INITIALIZER,
- CC_INITIALIZER,
- CC_INITIALIZER,
- CC_INITIALIZER,
- CC_INITIALIZER,
- };
-
static bool testing_mode = false;
static int global_algorithm = ENHANCED;
safer_mode = true;
}
-/* The character used for a decimal point: ',' or '.'. Only
- respected for data input and output. */
-char
-get_decimal (void)
-{
- return decimal;
-}
-
-/* Sets the character used for a decimal point, which must be
- either ',' or '.'. */
-void
-set_decimal (char decimal_)
-{
- assert (decimal_ == '.' || decimal_ == ',');
- decimal = decimal_;
-}
-
-/* The character used for grouping in numbers: '.' or ','; the
- opposite of set_decimal. Only used in COMMA data input and
- output. */
-char
-get_grouping (void)
-{
- return grouping;
-}
-
-/* Sets the character used for grouping, which must be either ','
- or '.'. */
-void
-set_grouping (char grouping_)
-{
- assert (grouping_ == '.' || grouping_ == ',');
- grouping = grouping_;
-}
-
/* Echo commands to the listing file/printer? */
bool
get_echo (void)
errorbreak = errorbreak_;
}
+/* Route error messages to terminal? */
+bool
+get_error_routing_to_terminal (void)
+{
+ return route_errors_to_terminal;
+}
+
+/* Sets whether error messages should be routed to the
+ terminal. */
+void
+set_error_routing_to_terminal (bool route_to_terminal)
+{
+ route_errors_to_terminal = route_to_terminal;
+}
+
+/* Route error messages to listing file? */
+bool
+get_error_routing_to_listing (void)
+{
+ return 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)
+{
+ route_errors_to_listing = route_to_listing;
+}
+
/* Compress system files by default? */
bool
get_scompression (void)
default_format = *default_format_;
}
-/* Gets the custom currency specification with the given IDX. */
-const struct custom_currency *
-get_cc (int idx)
-{
- assert (idx >= 0 && idx < CC_CNT);
- return &cc[idx];
-}
-
-/* Gets custom currency specification IDX to CC. */
-void
-set_cc (int idx, const struct custom_currency *cc_)
-{
- assert (idx >= 0 && idx < CC_CNT);
- cc[idx] = *cc_;
-}
-
/* Are we in testing mode? (e.g. --testing-mode command line
option) */
bool