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.
This commit is contained in:
Ulrich Drepper 2001-08-08 18:52:29 +00:00
parent 121f86f245
commit 443470c336
2 changed files with 26 additions and 28 deletions

View File

@ -1,11 +1,12 @@
2001-08-08 Ulrich Drepper <drepper@redhat.com>
* 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 <aj@suse.de>
@ -15,7 +16,7 @@
2001-08-07 Ulrich Drepper <drepper@redhat.com>
* 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 <jakub@redhat.com>
@ -64,7 +65,7 @@
2001-08-06 Ulrich Drepper <drepper@redhat.com>
* manual/locale.texi: Add documentation of rpmatch.
* manual/locale.texi: Add documentation for rpmatch.
Patch by Jochen Hein <jochen@jochen.org>.
2001-08-06 Jakub Jelinek <jakub@redhat.com>

View File

@ -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)