diff options
Diffstat (limited to 'locale/programs/ld-monetary.c')
-rw-r--r-- | locale/programs/ld-monetary.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c index 5efa969baa..2c5bb7385d 100644 --- a/locale/programs/ld-monetary.c +++ b/locale/programs/ld-monetary.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>. @@ -115,7 +115,7 @@ monetary_finish (struct localedef_t *locale) = locale->categories[LC_MONETARY].monetary; #define TEST_ELEM(cat) \ - if (monetary->cat == NULL) \ + if (monetary->cat == NULL && !be_quiet) \ error (0, 0, _("field `%s' in category `%s' not defined"), \ #cat, "LC_MONETARY") @@ -129,12 +129,13 @@ monetary_finish (struct localedef_t *locale) /* The international currency symbol must come from ISO 4217. */ if (monetary->int_curr_symbol != NULL) { - if (strlen (monetary->int_curr_symbol) != 4) + if (strlen (monetary->int_curr_symbol) != 4 && !be_quiet) error (0, 0, _("\ value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length")); else if (bsearch (monetary->int_curr_symbol, valid_int_curr, NR_VALID_INT_CURR, sizeof (const char *), - (comparison_fn_t) curr_strcmp) == NULL) + (comparison_fn_t) curr_strcmp) == NULL + && !be_quiet) error (0, 0, _("\ value of field `int_curr_symbol' in category `LC_MONETARY' does \ not correspond to a valid name in ISO 4217")); @@ -143,23 +144,23 @@ not correspond to a valid name in ISO 4217")); /* The decimal point must not be empty. This is not said explicitly in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be != "". */ - if (monetary->mon_decimal_point[0] == '\0') + if (monetary->mon_decimal_point[0] == '\0' && !be_quiet) { error (0, 0, _("\ value for field `%s' in category `%s' must not be the empty string"), "mon_decimal_point", "LC_MONETARY"); } - if (monetary->mon_grouping_act == 0) + if (monetary->mon_grouping_act == 0 && !be_quiet) error (0, 0, _("field `%s' in category `%s' not defined"), "mon_grouping", "LC_MONETARY"); #undef TEST_ELEM #define TEST_ELEM(cat, min, max) \ - if (monetary->cat == -2) \ + if (monetary->cat == -2 && !be_quiet) \ error (0, 0, _("field `%s' in category `%s' not defined"), \ #cat, "LC_MONETARY"); \ - else if (monetary->cat < min || monetary->cat > max) \ + else if ((monetary->cat < min || monetary->cat > max) && !be_quiet) \ error (0, 0, _("\ value for field `%s' in category `%s' must be in range %d...%d"), \ #cat, "LC_MONETARY", min, max) |