1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20: #include <stdint.h>
21:
22:
23: typedef uint16_t gidx_t;
24:
25:
26: struct gconvcache_header
27: {
28: uint32_t magic;
29: gidx_t string_offset;
30: gidx_t hash_offset;
31: gidx_t hash_size;
32: gidx_t module_offset;
33: gidx_t otherconv_offset;
34: };
35:
36: struct hash_entry
37: {
38: gidx_t string_offset;
39: gidx_t module_idx;
40: };
41:
42: struct module_entry
43: {
44: gidx_t canonname_offset;
45: gidx_t fromdir_offset;
46: gidx_t fromname_offset;
47: gidx_t todir_offset;
48: gidx_t toname_offset;
49: gidx_t extra_offset;
50: };
51:
52: struct extra_entry
53: {
54: gidx_t module_cnt;
55: struct extra_entry_module
56: {
57: gidx_t outname_offset;
58: gidx_t dir_offset;
59: gidx_t name_offset;
60: } module[0];
61: };
62:
63:
64: #define GCONVCACHE_MAGIC 0x20010324
65:
66:
67: #define GCONV_MODULES_CACHE GCONV_DIR "/gconv-modules.cache"