From 816e6eb5a786594223586976c08e337bc08b6f4e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Oct 1998 13:33:29 +0000 Subject: Update. 1998-10-19 13:24 Ulrich Drepper * locale/programs/ld-collate.c (collate_startup): Clear bit for this category in copy_posix. (collate_finish): Don't warn about UNDEFINED not being defined. * locale/programs/ld-ctype.c (ctype_startup): Clear bit for this category in copy_posix. * locale/programs/ld-messages.c (messages_startup): Likewise. * locale/programs/ld-monetary.c (monetary_startup): Likewise. * locale/programs/ld-numeric.c (numeric_startup): Likewise. * locale/programs/ld-time.c (time_startup): Likewise. * locale/programs/localedef.c: Move copy_def_list_t definition into locales.h. Define copy_posix variable. (main): Before processing copy list add ©_posix to copy_list. * locale/programs/locales.h: Add definition of copy_def_list_t. * locale/programs/locfile.c: Clear bit for appropriate category in case of an copy instruction. --- locale/programs/ld-monetary.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'locale/programs/ld-monetary.c') diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c index d202d76399..4aede4691f 100644 --- a/locale/programs/ld-monetary.c +++ b/locale/programs/ld-monetary.c @@ -84,6 +84,9 @@ monetary_startup (struct linereader *lr, struct localedef_t *locale, { struct locale_monetary_t *monetary; + /* We have a definition for LC_MONETARY. */ + copy_posix.mask &= ~(1 << LC_MONETARY); + /* It is important that we always use UCS1 encoding for strings now. */ encoding_method = ENC_UCS1; @@ -129,15 +132,17 @@ 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 + && monetary->int_curr_symbol[0] != '\0') { if (!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 + else if (monetary->int_curr_symbol[0] != '\0' + && bsearch (monetary->int_curr_symbol, valid_int_curr, + NR_VALID_INT_CURR, sizeof (const char *), + (comparison_fn_t) curr_strcmp) == NULL && !be_quiet) error (0, 0, _("\ value of field `int_curr_symbol' in category `LC_MONETARY' does \ @@ -336,6 +341,8 @@ field `%s' in category `%s' declared more than once"), \ lr_error (lr, _("\ field `%s' in category `%s' declared more than once"), \ #cat, "LC_MONETARY"); \ + else if (code->tok == tok_minus1) \ + monetary->cat = -1; \ else \ monetary->cat = code->val.num; \ break -- cgit v1.2.1