diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1998-04-30 18:52:38 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-30 18:52:38 +0000 |
| commit | 12a9fabe52b88bdb75e305bbe485573d34bfbc24 (patch) | |
| tree | 1ca0bd207f63fc1ea0202aad84cd1e7c8c744b8c | |
| parent | 69f155d4fc11f2f0e1dd1bfcd804192303ba1627 (diff) | |
| download | glibc-12a9fabe52b88bdb75e305bbe485573d34bfbc24.tar.xz glibc-12a9fabe52b88bdb75e305bbe485573d34bfbc24.zip | |
Update.
* locale/programs/locfile.c: Interpret I18NPATH value as base of
path, extended with "/locales/".
79 files changed, 542 insertions, 324 deletions
@@ -21,6 +21,9 @@ * locale/programs/locfile.h: Likewise. * locale/programs/stringtrans.c: Likewise. + * locale/programs/locfile.c: Interpret I18NPATH value as base of + path, extended with "/locales/". + 1998-04-18 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/arm/memset.S: Fix off by one error. diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c index 7114a237a0..e11df1cf29 100644 --- a/locale/programs/charmap.c +++ b/locale/programs/charmap.c @@ -211,8 +211,6 @@ parse_charmap (const char *filename) memset (result, '\0', sizeof (struct charset_t)); /* The default DEFAULT_WIDTH is 1. */ result->width_default = 1; - /* Let the user overwrite the repertoire map we use. */ - result->repertoiremap = repertoiremap; #define obstack_chunk_alloc malloc #define obstack_chunk_free free @@ -269,17 +267,6 @@ parse_charmap (const char *filename) lr_ignore_rest (cmfile, 1); - /* Read the repertoire map now. */ - if (result->repertoiremap == NULL) - /* This is fatal. */ - error (4, 0, _("no repertoire map specified: cannot proceed")); - - result->repertoire = repertoire_read (result->repertoiremap); - if (result->repertoire == NULL) - /* This is also fatal. */ - error (4, errno, _("cannot read repertoire map `%s'"), - result->repertoiremap); - state = 2; continue; } @@ -288,7 +275,7 @@ parse_charmap (const char *filename) && nowtok != tok_mb_cur_min && nowtok != tok_escape_char && nowtok != tok_comment_char && nowtok != tok_g0esc && nowtok != tok_g1esc && nowtok != tok_g2esc - && nowtok != tok_g3esc && nowtok != tok_repertoiremap) + && nowtok != tok_g3esc) { lr_error (cmfile, _("syntax error in prolog: %s"), _("illegal definition")); @@ -320,18 +307,6 @@ parse_charmap (const char *filename) lr_ignore_rest (cmfile, 1); continue; - case tok_repertoiremap: - if (arg->tok != tok_ident) - goto badarg; - - if (result->repertoiremap == NULL) - result->repertoiremap = obstack_copy0 (&result->mem_pool, - arg->val.str.start, - arg->val.str.len); - - lr_ignore_rest (cmfile, 1); - continue; - case tok_mb_cur_max: case tok_mb_cur_min: if (arg->tok != tok_number) diff --git a/locale/programs/charset.h b/locale/programs/charset.h index db93f16306..8f066b115b 100644 --- a/locale/programs/charset.h +++ b/locale/programs/charset.h @@ -37,9 +37,6 @@ struct width_rule struct charset_t { - const char *repertoiremap; - struct repertoire_t *repertoire; - const char *code_set_name; int mb_cur_min; int mb_cur_max; diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index ad7e9d5fb4..5a3fc25e3d 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -58,6 +58,7 @@ char *xstrdup (const char *__str); struct localedef_t * locfile_read (const char *filename, struct charset_t *charset) { + struct repertoire_t *repertoire = NULL; struct linereader *ldfile; struct localedef_t *result; int state; @@ -80,7 +81,8 @@ locfile_read (const char *filename, struct charset_t *charset) char *i18npath = __secure_getenv ("I18NPATH"); if (i18npath != NULL && *i18npath != '\0') { - char path[strlen (filename) + 1 + strlen (i18npath) + 1]; + char path[strlen (filename) + 1 + strlen (i18npath) + + sizeof ("/locales/") - 1]; char *next; i18npath = strdupa (i18npath); @@ -88,7 +90,7 @@ locfile_read (const char *filename, struct charset_t *charset) while (ldfile == NULL && (next = strsep (&i18npath, ":")) != NULL) { - stpcpy (stpcpy (stpcpy (path, next), "/"), filename); + stpcpy (stpcpy (stpcpy (path, next), "/locales/"), filename); ldfile = lr_open (path, locfile_hash); } @@ -249,27 +251,132 @@ argument to `%s' must be a single character"), ldfile->comment_char = *arg->val.str.start; |
