diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-12-26 07:29:11 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-12-26 07:29:11 +0000 |
commit | 5358d026c74d1227271c190f0070fc90ef789829 (patch) | |
tree | 8bf430b052065cfa6568bc6737e298d03ba2301a /locale | |
parent | 450bf66ef223ad83e7032920652445817865770b (diff) | |
download | glibc-5358d026c74d1227271c190f0070fc90ef789829.tar.gz glibc-5358d026c74d1227271c190f0070fc90ef789829.tar.xz glibc-5358d026c74d1227271c190f0070fc90ef789829.zip |
Update.
* locale/programs/ld-collate.c (read_directions): Fix a few messages. (collate_finish): Test that position is used in all sections for a level or in none. * string/strxfrm.c: Optimize a bit. We don't need the highest bit of the index returned by findidx. * string/strcoll.c: Complete rewrite for new collate implementation. * wcsmbs/wcscoll.c: Don't use strcoll.c, implement dummy implementation locally.
Diffstat (limited to 'locale')
-rw-r--r-- | locale/programs/ld-collate.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index c629bd477a..c4ffd2b831 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -381,7 +381,7 @@ read_directions (struct linereader *ldfile, struct token *arg, if (! warned) { lr_error (ldfile, _("\ -%s: `%s' mentioned twice in definition of weight %d"), +%s: `%s' mentioned more than once in definition of weight %d"), "LC_COLLATE", "forward", cnt + 1); } } @@ -407,7 +407,7 @@ read_directions (struct linereader *ldfile, struct token *arg, if (! warned) { lr_error (ldfile, _("\ -%s: `%s' mentioned twice in definition of weight %d"), +%s: `%s' mentioned more than once in definition of weight %d"), "LC_COLLATE", "backward", cnt + 1); } } @@ -423,7 +423,7 @@ read_directions (struct linereader *ldfile, struct token *arg, if (! warned) { lr_error (ldfile, _("\ -%s: `%s' mentioned twice in definition of weight %d"), +%s: `%s' mentioned more than once in definition of weight %d"), "LC_COLLATE", "position", cnt + 1); } } @@ -1379,6 +1379,19 @@ collate_finish (struct localedef_t *locale, struct charmap_t *charmap) /* If this assertion is hit change the type in `element_t'. */ assert (nrules <= sizeof (runp->used_in_level) * 8); + /* Make sure that the `position' rule is used either in all sections + or in none. */ + for (i = 0; i < nrules; ++i) + for (sect = collate->sections; sect != NULL; sect = sect->next) + if ((sect->rules[i] & sort_position) + != (collate->sections->rules[i] & sort_position)) + { + error (0, 0, _("\ +%s: `position' must be used for a specific level in all sections or now"), + "LC_COLLATE"); + break; + } + /* Find out which elements are used at which level. At the same time we find out whether we have any undefined symbols. */ runp = collate->start; |