Remove "Written by Ben Pfaff <blp@gnu.org>" lines everywhere.
[pspp-builds.git] / src / data / settings.c
index 37fda6006ee3e99858abb9c7bbb1b1014cb17ffe..3248324ea3a42640d95acf697a2813d21df123f6 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
+   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -33,9 +32,6 @@ static bool long_view = false;
 
 static bool safer_mode = false;
 
-static char decimal = '.';
-static char grouping = ',';
-
 static bool echo = false;
 static bool include = true;
 
@@ -43,6 +39,9 @@ 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;
@@ -64,16 +63,6 @@ static size_t workspace = 4L * 1024 * 1024;
 
 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;
@@ -192,41 +181,6 @@ set_safer_mode (void)
   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)
@@ -290,6 +244,36 @@ set_errorbreak (bool errorbreak_)
   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)
@@ -466,22 +450,6 @@ set_format (const struct fmt_spec *default_format_)
   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