4 * Copyright 2000 Alexandre Julliard
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_424;
15 extern union cptable cptable_437;
16 extern union cptable cptable_500;
17 extern union cptable cptable_737;
18 extern union cptable cptable_775;
19 extern union cptable cptable_850;
20 extern union cptable cptable_852;
21 extern union cptable cptable_855;
22 extern union cptable cptable_856;
23 extern union cptable cptable_857;
24 extern union cptable cptable_860;
25 extern union cptable cptable_861;
26 extern union cptable cptable_862;
27 extern union cptable cptable_863;
28 extern union cptable cptable_864;
29 extern union cptable cptable_865;
30 extern union cptable cptable_866;
31 extern union cptable cptable_869;
32 extern union cptable cptable_874;
33 extern union cptable cptable_875;
34 extern union cptable cptable_878;
35 extern union cptable cptable_932;
36 extern union cptable cptable_936;
37 extern union cptable cptable_949;
38 extern union cptable cptable_950;
39 extern union cptable cptable_1006;
40 extern union cptable cptable_1026;
41 extern union cptable cptable_1250;
42 extern union cptable cptable_1251;
43 extern union cptable cptable_1252;
44 extern union cptable cptable_1253;
45 extern union cptable cptable_1254;
46 extern union cptable cptable_1255;
47 extern union cptable cptable_1256;
48 extern union cptable cptable_1257;
49 extern union cptable cptable_1258;
50 extern union cptable cptable_10000;
51 extern union cptable cptable_10006;
52 extern union cptable cptable_10007;
53 extern union cptable cptable_10029;
54 extern union cptable cptable_10079;
55 extern union cptable cptable_10081;
56 extern union cptable cptable_20866;
57 extern union cptable cptable_28591;
58 extern union cptable cptable_28592;
59 extern union cptable cptable_28593;
60 extern union cptable cptable_28594;
61 extern union cptable cptable_28595;
62 extern union cptable cptable_28596;
63 extern union cptable cptable_28597;
64 extern union cptable cptable_28598;
65 extern union cptable cptable_28599;
67 static const union cptable * const cptables[53] =
123 /* ### cpmap end ### */
124 /* Everything above this line is generated automatically by cpmap.pl */
126 #define NB_CODEPAGES (sizeof(cptables)/sizeof(cptables[0]))
129 static int cmp_codepage( const void *codepage, const void *entry )
131 return (unsigned int)codepage - (*(union cptable **)entry)->info.codepage;
135 /* get the table of a given code page */
136 const union cptable *cp_get_table( unsigned int codepage )
138 const union cptable **res;
140 if (!(res = bsearch( (void *)codepage, cptables, NB_CODEPAGES,
141 sizeof(cptables[0]), cmp_codepage ))) return NULL;
146 /* enum valid codepages */
147 const union cptable *cp_enum_table( unsigned int index )
149 if (index >= NB_CODEPAGES) return NULL;
150 return cptables[index];