From 04fbc779fe06ebb697c7dfe02493ad2fc0f8e1e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 22 Jul 2000 21:22:08 +0000 Subject: Update. * iconv/gconv_trans.c: Correct a few bugs in the search loop. Remove remainders of hash table. * locale/categories.def: Remove remainders of transliteration hash table. * locale/langinfo.h: Likewise. * locale/programs/ld-ctype.c: Likewise. Fix code to write out transliteration tables. * locale/gen-translit.pl: New file. * locale/C-translit.h.in: New file. * locale/C-ctype.c: Include C-translit.h. Initialize transliteration data pointers with data from this file. * locale/Makefile (distribute): Add C-translit.h.in, C-translit.h, and gen-translit.pl. Add rule to generate C-translit.h. --- iconv/gconv_trans.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'iconv') diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c index db7c567..bb908176 100644 --- a/iconv/gconv_trans.c +++ b/iconv/gconv_trans.c @@ -41,7 +41,6 @@ __gconv_transliterate (struct __gconv_step *step, { /* Find out about the locale's transliteration. */ uint_fast32_t size; - uint_fast32_t layers; uint32_t *from_idx; uint32_t *from_tbl; uint32_t *to_idx; @@ -57,12 +56,11 @@ __gconv_transliterate (struct __gconv_step *step, /* If there is no transliteration information in the locale don't do anything and return the error. */ - size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_HASH_SIZE); + size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE); if (size == 0) goto no_rules; /* Get the rest of the values. */ - layers = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_HASH_LAYERS); from_idx = (uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TRANSLIT_FROM_IDX); from_tbl = (uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TRANSLIT_FROM_TBL); to_idx = (uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TRANSLIT_TO_IDX); @@ -148,9 +146,9 @@ __gconv_transliterate (struct __gconv_step *step, return __GCONV_INCOMPLETE_INPUT; if (winbuf + cnt >= winbufend || from_tbl[idx + cnt] < winbuf[cnt]) - low = idx; + low = med + 1; else - high = idx; + high = med; } no_rules: -- cgit v1.1