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. --- locale/programs/ld-ctype.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'locale/programs') diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index e297aeb254..5dfcec3339 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -173,13 +173,11 @@ struct locale_ctype_t unsigned char *width; uint32_t mb_cur_max; const char *codeset_name; - uint32_t translit_hash_size; - uint32_t translit_hash_layers; uint32_t *translit_from_idx; uint32_t *translit_from_tbl; uint32_t *translit_to_idx; uint32_t *translit_to_tbl; - size_t translit_idx_size; + uint32_t translit_idx_size; size_t translit_from_tbl_size; size_t translit_to_tbl_size; @@ -866,7 +864,7 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap, { #define CTYPE_EMPTY(name) \ case name: \ - iov[2 + elem + offset].iov_base = ""; \ + iov[2 + elem + offset].iov_base = (void *) ""; \ iov[2 + elem + offset].iov_len = 0; \ idx[elem + 1] = idx[elem]; \ break @@ -911,14 +909,12 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap, ctype->names, (ctype->plane_size * ctype->plane_cnt * sizeof (uint32_t))); - CTYPE_DATA (_NL_CTYPE_TRANSLIT_HASH_SIZE, - &ctype->translit_hash_size, sizeof (uint32_t)); - CTYPE_DATA (_NL_CTYPE_TRANSLIT_HASH_LAYERS, - &ctype->translit_hash_layers, sizeof (uint32_t)); + CTYPE_DATA (_NL_CTYPE_TRANSLIT_TAB_SIZE, + &ctype->translit_idx_size, sizeof (uint32_t)); CTYPE_DATA (_NL_CTYPE_TRANSLIT_FROM_IDX, ctype->translit_from_idx, - ctype->translit_idx_size); + ctype->translit_idx_size * sizeof (uint32_t)); CTYPE_DATA (_NL_CTYPE_TRANSLIT_FROM_TBL, ctype->translit_from_tbl, @@ -926,7 +922,7 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap, CTYPE_DATA (_NL_CTYPE_TRANSLIT_TO_IDX, ctype->translit_to_idx, - ctype->translit_idx_size); + ctype->translit_idx_size * sizeof (uint32_t)); CTYPE_DATA (_NL_CTYPE_TRANSLIT_TO_TBL, ctype->translit_to_tbl, ctype->translit_to_tbl_size); @@ -3664,7 +3660,7 @@ Computing table size for character classes might take a while..."), } /* Store the information about the length. */ - ctype->translit_idx_size = number * sizeof (uint32_t); + ctype->translit_idx_size = number; ctype->translit_from_tbl_size = from_len * sizeof (uint32_t); ctype->translit_to_tbl_size = to_len * sizeof (uint32_t); } -- cgit 1.4.1