X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsettings.c;h=1885f6ca07b17b5eba16da2dcc5cc74887bafdd2;hb=3e15bceda1caf57a898ed98e147a6bc176d8b1fb;hp=37fda6006ee3e99858abb9c7bbb1b1014cb17ffe;hpb=655bf3a3917cdf16f99fcbb680d2bf3159126a93;p=pspp-builds.git diff --git a/src/data/settings.c b/src/data/settings.c index 37fda600..1885f6ca 100644 --- a/src/data/settings.c +++ b/src/data/settings.c @@ -1,5 +1,5 @@ /* 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 . This program is free software; you can redistribute it and/or @@ -33,9 +33,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 +40,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 +64,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 +182,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 +245,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 +451,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