The [windows] section is in win.ini not in ~/.wine/config.
[wine.git] / unicode / cptable.c
blob0fd2c3ffe5092891b85ab6ad56c477b938b2a08b
1 /*
2 * Codepage tables
4 * Copyright 2000 Alexandre Julliard
5 */
7 #include <stdlib.h>
9 #include "wine/unicode.h"
11 /* Everything below this line is generated automatically by cpmap.pl */
12 /* ### cpmap begin ### */
13 extern union cptable cptable_037;
14 extern union cptable cptable_042;
15 extern union cptable cptable_424;
16 extern union cptable cptable_437;
17 extern union cptable cptable_500;
18 extern union cptable cptable_737;
19 extern union cptable cptable_775;
20 extern union cptable cptable_850;
21 extern union cptable cptable_852;
22 extern union cptable cptable_855;
23 extern union cptable cptable_856;
24 extern union cptable cptable_857;
25 extern union cptable cptable_860;
26 extern union cptable cptable_861;
27 extern union cptable cptable_862;
28 extern union cptable cptable_863;
29 extern union cptable cptable_864;
30 extern union cptable cptable_865;
31 extern union cptable cptable_866;
32 extern union cptable cptable_869;
33 extern union cptable cptable_874;
34 extern union cptable cptable_875;
35 extern union cptable cptable_878;
36 extern union cptable cptable_932;
37 extern union cptable cptable_936;
38 extern union cptable cptable_949;
39 extern union cptable cptable_950;
40 extern union cptable cptable_1006;
41 extern union cptable cptable_1026;
42 extern union cptable cptable_1250;
43 extern union cptable cptable_1251;
44 extern union cptable cptable_1252;
45 extern union cptable cptable_1253;
46 extern union cptable cptable_1254;
47 extern union cptable cptable_1255;
48 extern union cptable cptable_1256;
49 extern union cptable cptable_1257;
50 extern union cptable cptable_1258;
51 extern union cptable cptable_10000;
52 extern union cptable cptable_10006;
53 extern union cptable cptable_10007;
54 extern union cptable cptable_10029;
55 extern union cptable cptable_10079;
56 extern union cptable cptable_10081;
57 extern union cptable cptable_20866;
58 extern union cptable cptable_28591;
59 extern union cptable cptable_28592;
60 extern union cptable cptable_28593;
61 extern union cptable cptable_28594;
62 extern union cptable cptable_28595;
63 extern union cptable cptable_28596;
64 extern union cptable cptable_28597;
65 extern union cptable cptable_28598;
66 extern union cptable cptable_28599;
67 extern union cptable cptable_28600;
68 extern union cptable cptable_28603;
69 extern union cptable cptable_28604;
70 extern union cptable cptable_28605;
72 static const union cptable * const cptables[58] =
74 &cptable_037,
75 &cptable_042,
76 &cptable_424,
77 &cptable_437,
78 &cptable_500,
79 &cptable_737,
80 &cptable_775,
81 &cptable_850,
82 &cptable_852,
83 &cptable_855,
84 &cptable_856,
85 &cptable_857,
86 &cptable_860,
87 &cptable_861,
88 &cptable_862,
89 &cptable_863,
90 &cptable_864,
91 &cptable_865,
92 &cptable_866,
93 &cptable_869,
94 &cptable_874,
95 &cptable_875,
96 &cptable_878,
97 &cptable_932,
98 &cptable_936,
99 &cptable_949,
100 &cptable_950,
101 &cptable_1006,
102 &cptable_1026,
103 &cptable_1250,
104 &cptable_1251,
105 &cptable_1252,
106 &cptable_1253,
107 &cptable_1254,
108 &cptable_1255,
109 &cptable_1256,
110 &cptable_1257,
111 &cptable_1258,
112 &cptable_10000,
113 &cptable_10006,
114 &cptable_10007,
115 &cptable_10029,
116 &cptable_10079,
117 &cptable_10081,
118 &cptable_20866,
119 &cptable_28591,
120 &cptable_28592,
121 &cptable_28593,
122 &cptable_28594,
123 &cptable_28595,
124 &cptable_28596,
125 &cptable_28597,
126 &cptable_28598,
127 &cptable_28599,
128 &cptable_28600,
129 &cptable_28603,
130 &cptable_28604,
131 &cptable_28605,
133 /* ### cpmap end ### */
134 /* Everything above this line is generated automatically by cpmap.pl */
136 #define NB_CODEPAGES (sizeof(cptables)/sizeof(cptables[0]))
139 static int cmp_codepage( const void *codepage, const void *entry )
141 return (unsigned int)codepage - (*(union cptable **)entry)->info.codepage;
145 /* get the table of a given code page */
146 const union cptable *cp_get_table( unsigned int codepage )
148 const union cptable **res;
150 if (!(res = bsearch( (void *)codepage, cptables, NB_CODEPAGES,
151 sizeof(cptables[0]), cmp_codepage ))) return NULL;
152 return *res;
156 /* enum valid codepages */
157 const union cptable *cp_enum_table( unsigned int index )
159 if (index >= NB_CODEPAGES) return NULL;
160 return cptables[index];