]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-iconvconfig-nxstack.patch
- added dirs for dz,km,mg messages
[packages/glibc.git] / glibc-iconvconfig-nxstack.patch
CommitLineData
1e5d4fb5
JB
1--- glibc-2.3.4/iconv/iconvconfig.c.orig 2004-12-20 00:23:42.000000000 +0100
2+++ glibc-2.3.4/iconv/iconvconfig.c 2005-02-20 11:43:58.447698464 +0100
3@@ -1013,6 +1013,34 @@
4 module name offset
5 (following last entry with step count 0)
6 */
7+
8+static struct hash_entry *hash_table;
9+static size_t hash_size;
10+
11+/* Function to insert the names. */
12+static void name_insert (const void *nodep, VISIT value, int level)
13+{
14+ struct name *name;
15+ unsigned int idx;
16+ unsigned int hval2;
17+
18+ if (value != leaf && value != postorder)
19+ return;
20+
21+ name = *(struct name **) nodep;
22+ idx = name->hashval % hash_size;
23+ hval2 = 1 + name->hashval % (hash_size - 2);
24+
25+ while (hash_table[idx].string_offset != 0)
26+ if ((idx += hval2) >= hash_size)
27+ idx -= hash_size;
28+
29+ hash_table[idx].string_offset = strtaboffset (name->strent);
30+
31+ assert (name->module_idx != -1);
32+ hash_table[idx].module_idx = name->module_idx;
33+}
34+
35 static int
36 write_output (void)
37 {
38@@ -1020,8 +1048,6 @@
39 char *string_table;
40 size_t string_table_size;
41 struct gconvcache_header header;
42- struct hash_entry *hash_table;
43- size_t hash_size;
44 struct module_entry *module_table;
45 char *extra_table;
46 char *cur_extra_table;
47@@ -1034,31 +1060,6 @@
48 char tmpfname[(output_file == NULL ? sizeof finalname : output_file_len + 1)
49 + strlen (".XXXXXX")];
50
51- /* Function to insert the names. */
52- auto void
53- name_insert (const void *nodep, VISIT value, int level)
54- {
55- struct name *name;
56- unsigned int idx;
57- unsigned int hval2;
58-
59- if (value != leaf && value != postorder)
60- return;
61-
62- name = *(struct name **) nodep;
63- idx = name->hashval % hash_size;
64- hval2 = 1 + name->hashval % (hash_size - 2);
65-
66- while (hash_table[idx].string_offset != 0)
67- if ((idx += hval2) >= hash_size)
68- idx -= hash_size;
69-
70- hash_table[idx].string_offset = strtaboffset (name->strent);
71-
72- assert (name->module_idx != -1);
73- hash_table[idx].module_idx = name->module_idx;
74- }
75-
76 /* Open the output file. */
77 if (output_file == NULL)
78 {
This page took 1.630872 seconds and 4 git commands to generate.