From 443470c3360d5d4ffb8f3078f47cda55fd5cffbd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Aug 2001 18:52:29 +0000 Subject: Update. for CRNCYSTR. * locale/programs/ld-monetary.c (monetary_finish): Likewise. functionality. call me(). If in the middle of initializing, return NULL or * manual/locale.texi: Add documentation for rpmatch. --- ChangeLog | 9 +++++---- locale/programs/ld-monetary.c | 45 ++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd8297e855..e3473c891f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,12 @@ 2001-08-08 Ulrich Drepper * locale/C-monetary.c (_nl_C_LC_MONETARY): Provide correct value - of CRNCYSTR. + for CRNCYSTR. * locale/programs/ld-messages.c (messages_finish): Provide POSIX locale compliant default values for fields without definition. * locale/programs/ld-time.c (time_finish): Likewise. + * locale/programs/ld-monetary.c (monetary_finish): Likewise. 2001-08-08 Andreas Jaeger @@ -15,7 +16,7 @@ 2001-08-07 Ulrich Drepper * sysdeps/ia64/memusage.h (GETTIME): Define using hp-timing.h - funcationality. + functionality. * sysdeps/ia64/hp-timing.h (HP_TIMING_NOW): Fix comment. @@ -25,7 +26,7 @@ (init): If not yet initialized, call me(). (me): Do all dlsym calls here. (malloc, realloc, calloc, free): If not yet initialized, - call me(). If in the middle of initializing, return NULL or + call me(). If in the middle of initializing, return NULL or do nothing. 2001-08-07 Jakub Jelinek @@ -64,7 +65,7 @@ 2001-08-06 Ulrich Drepper - * manual/locale.texi: Add documentation of rpmatch. + * manual/locale.texi: Add documentation for rpmatch. Patch by Jochen Hein . 2001-08-06 Jakub Jelinek diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c index aa20c5203e..08a10fdcc1 100644 --- a/locale/programs/ld-monetary.c +++ b/locale/programs/ld-monetary.c @@ -199,21 +199,21 @@ monetary_finish (struct localedef_t *locale, struct charmap_t *charmap) } } -#define TEST_ELEM(cat) \ +#define TEST_ELEM(cat, initval) \ if (monetary->cat == NULL) \ { \ if (! be_quiet && ! nothing) \ error (0, 0, _("%s: field `%s' not defined"), \ "LC_MONETARY", #cat); \ - monetary->cat = ""; \ + monetary->cat = initval; \ } - TEST_ELEM (int_curr_symbol); - TEST_ELEM (currency_symbol); - TEST_ELEM (mon_decimal_point); - TEST_ELEM (mon_thousands_sep); - TEST_ELEM (positive_sign); - TEST_ELEM (negative_sign); + TEST_ELEM (int_curr_symbol, ""); + TEST_ELEM (currency_symbol, ""); + TEST_ELEM (mon_decimal_point, "."); + TEST_ELEM (mon_thousands_sep, ""); + TEST_ELEM (positive_sign, ""); + TEST_ELEM (negative_sign, ""); /* The international currency symbol must come from ISO 4217. */ if (monetary->int_curr_symbol != NULL) @@ -243,7 +243,7 @@ not correspond to a valid name in ISO 4217"), if (! be_quiet && ! nothing) error (0, 0, _("%s: field `%s' not defined"), "LC_MONETARY", "mon_decimal_point"); - monetary->mon_decimal_point = ""; + monetary->mon_decimal_point = "."; } else if (monetary->mon_decimal_point[0] == '\0' && ! be_quiet && ! nothing) { @@ -265,31 +265,28 @@ not correspond to a valid name in ISO 4217"), } #undef TEST_ELEM -#define TEST_ELEM(cat, min, max) \ +#define TEST_ELEM(cat, min, max, initval) \ if (monetary->cat == -2) \ { \ if (! be_quiet && ! nothing) \ error (0, 0, _("%s: field `%s' not defined"), \ "LC_MONETARY", #cat); \ + monetary->cat = initval; \ } \ - else if ((monetary->cat < min || monetary->cat > max) && !be_quiet \ - && !nothing) \ + else if ((monetary->cat < min || monetary->cat > max) \ + && !be_quiet && !nothing) \ error (0, 0, _(" \ %s: value for field `%s' must be in range %d...%d"), \ "LC_MONETARY", #cat, min, max) -#if 0 -/* The following two test are not really necessary because all values - the variable could have are valid. */ - TEST_ELEM (int_frac_digits, -128, 127); /* No range check. */ - TEST_ELEM (frac_digits, -128, 127); /* No range check. */ -#endif - TEST_ELEM (p_cs_precedes, -1, 1); - TEST_ELEM (p_sep_by_space, -1, 2); - TEST_ELEM (n_cs_precedes, -1, 1); - TEST_ELEM (n_sep_by_space, -1, 2); - TEST_ELEM (p_sign_posn, -1, 4); - TEST_ELEM (n_sign_posn, -1, 4); + TEST_ELEM (int_frac_digits, -128, 127, -1); + TEST_ELEM (frac_digits, -128, 127, -1); + TEST_ELEM (p_cs_precedes, -1, 1, -1); + TEST_ELEM (p_sep_by_space, -1, 2, -1); + TEST_ELEM (n_cs_precedes, -1, 1, -1); + TEST_ELEM (n_sep_by_space, -1, 2, -1); + TEST_ELEM (p_sign_posn, -1, 4, -1); + TEST_ELEM (n_sign_posn, -1, 4, -1); /* The non-POSIX.2 extensions are optional. */ if (monetary->duo_int_curr_symbol == NULL) -- cgit v1.2.3