aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-02 15:54:15 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-02 15:54:15 +0000
commit80e069e0b276a729ba26997a8684e4746e974cc9 (patch)
tree63e907ba6c0cff3923933f714c5fd91ecde08b8b
parent95bddc0c3bb35a234635f05ccdd88a442ead9a65 (diff)
downloadglibc-80e069e0b276a729ba26997a8684e4746e974cc9.zip
glibc-80e069e0b276a729ba26997a8684e4746e974cc9.tar.gz
glibc-80e069e0b276a729ba26997a8684e4746e974cc9.tar.bz2
[BZ #645]
2007-10-02 Ulrich Drepper <drepper@redhat.com> [BZ #645] * locale/programs/ld-collate.c (collate_finish): Compare against last used section which is known to have rules defined. (collate_read): After order_start, correctly record order of sections and queue sections up.
-rw-r--r--ChangeLog8
-rw-r--r--locale/programs/ld-collate.c14
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index bc484ce..028a126 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-10-02 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #645]
+ * locale/programs/ld-collate.c (collate_finish): Compare against last
+ used section which is known to have rules defined.
+ (collate_read): After order_start, correctly record order of sections
+ and queue sections up.
+
2007-10-01 Ulrich Drepper <drepper@redhat.com>
[BZ #5071]
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 1332660..d6c3de0 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -1545,9 +1545,10 @@ collate_finish (struct localedef_t *locale, const struct charmap_t *charmap)
or in none. */
for (i = 0; i < nrules; ++i)
for (sect = collate->sections; sect != NULL; sect = sect->next)
- if (sect->rules != NULL
+ if (sect != collate->current_section
+ && sect->rules != NULL
&& ((sect->rules[i] & sort_position)
- != (collate->sections->rules[i] & sort_position)))
+ != (collate->current_section->rules[i] & sort_position)))
{
WITH_CUR_LOCALE (error (0, 0, _("\
%s: `position' must be used for a specific level in all sections or none"),
@@ -3214,13 +3215,16 @@ error while adding equivalent collating symbol"));
{
/* Insert sp in the collate->sections list,
right after collate->current_section. */
- if (collate->current_section == NULL)
- collate->current_section = sp;
- else
+ if (collate->current_section != NULL)
{
sp->next = collate->current_section->next;
collate->current_section->next = sp;
}
+ else if (collate->sections == NULL)
+ /* This is the first section to be defined. */
+ collate->sections = sp;
+
+ collate->current_section = sp;
}
/* Next should come the end of the line or a semicolon. */