summaryrefslogtreecommitdiff
path: root/locale/weight.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-20 00:07:20 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-20 00:07:20 +0000
commitdbfdf94429eec0dcf065f1abcc31a08799cf140f (patch)
tree2509691a724d26c38a399c3e8b56fdc1d5c77fab /locale/weight.h
parent6a07e1f8df9bee9a7d8bd87f27d796bd671a5109 (diff)
downloadglibc-dbfdf94429eec0dcf065f1abcc31a08799cf140f.tar.gz
Update.
2000-01-19 Ulrich Drepper <drepper@cygnus.com> * locale/weight.h (findidx): Little optimization. Correctly return offset in indirect table. * locale/programs/ld-collate.c (struct element_t): Add mblast and compute it where necessary. (insert_weights): Correctly handle missing weights in ellipsis expression. (handle_ellipsis): Correctly enqueue new element. (collate_output): Insert indirect references in the right order.
Diffstat (limited to 'locale/weight.h')
-rw-r--r--locale/weight.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/locale/weight.h b/locale/weight.h
index 356ee57855..cc634c253b 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -23,6 +23,7 @@ findidx (const unsigned char **cpp)
{
int_fast32_t i = table[*(*cpp)++];
const unsigned char *cp;
+ const unsigned char *usrc;
if (i >= 0)
/* This is an index into the weight table. Cool. */
@@ -31,10 +32,10 @@ findidx (const unsigned char **cpp)
/* Oh well, more than one sequence starting with this byte.
Search for the correct one. */
cp = &extra[-i];
+ usrc = *cpp;
while (1)
{
size_t nhere;
- const unsigned char *usrc = *cpp;
/* The first thing is the index. */
i = *((int32_t *) cp);
@@ -113,7 +114,7 @@ findidx (const unsigned char **cpp)
}
*cpp += nhere;
- return offset;
+ return indirect[-i + offset];
}
}