From 17955ae22c472c79abfa6bb9b94ec551336b46a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 24 Jun 2000 18:49:37 +0000 Subject: Update. * locale/programs/ld-address.c (iso639): Correct length of string elements. * sysdeps/unix/sysv/linux/i386/sys/elf.h (elf_fpxregset_t): Define. * sysdeps/unix/sysv/linux/i386/sys/user.h (struct user_fpxregs_struct): Define. --- locale/programs/ld-address.c | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) (limited to 'locale/programs/ld-address.c') diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c index da801d09d4..3e94e117cb 100644 --- a/locale/programs/ld-address.c +++ b/locale/programs/ld-address.c @@ -48,9 +48,9 @@ static struct static struct { - const char ab[2]; - const char term[3]; - const char lib[3]; + const char ab[3]; + const char term[4]; + const char lib[4]; } iso639[] = { #define DEFINE_LANGUAGE_CODE(Name, Ab, Term, Lib) \ @@ -499,12 +499,48 @@ address_read (struct linereader *ldfile, struct localedef_t *result, STR_ELEM (country_ab2); STR_ELEM (country_ab3); STR_ELEM (country_car); - STR_ELEM (country_isbn); STR_ELEM (lang_name); STR_ELEM (lang_ab); STR_ELEM (lang_term); STR_ELEM (lang_lib); +#define INT_STR_ELEM(cat) \ + case tok_##cat: \ + /* Ignore the rest of the line if we don't need the input of \ + this line. */ \ + if (ignore_content) \ + { \ + lr_ignore_rest (ldfile, 0); \ + break; \ + } \ + \ + arg = lr_token (ldfile, charmap, NULL); \ + if (arg->tok != tok_string && arg->tok != tok_number) \ + goto err_label; \ + if (address->cat != NULL) \ + lr_error (ldfile, _("\ +%s: field `%s' declared more than once"), "LC_ADDRESS", #cat); \ + else if (!ignore_content && arg->val.str.startmb == NULL) \ + { \ + lr_error (ldfile, _("\ +%s: unknown character in field `%s'"), "LC_ADDRESS", #cat); \ + address->cat = ""; \ + } \ + else if (!ignore_content) \ + { \ + if (arg->tok == tok_string) \ + address->cat = arg->val.str.startmb; \ + else \ + { \ + char *numbuf = (char *) xmalloc (11); \ + snprintf (numbuf, 11, "%ld", arg->val.num); \ + address->cat = numbuf; \ + } \ + } \ + break + + INT_STR_ELEM (country_isbn); + #define INT_ELEM(cat) \ case tok_##cat: \ /* Ignore the rest of the line if we don't need the input of \ -- cgit 1.4.1