ReactOS 0.4.15-dev-7907-g95bf896
cptable.c
Go to the documentation of this file.
1/*
2 * Codepage tables
3 *
4 * Copyright 2000 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <stdlib.h>
22
23#include "wine/unicode.h"
24
25#ifndef ARRAY_SIZE
26#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
27#endif
28
29/* Everything below this line is generated automatically by make_unicode */
30/* ### cpmap begin ### */
31extern union cptable cptable_037;
32extern union cptable cptable_424;
33extern union cptable cptable_437;
34extern union cptable cptable_500;
35extern union cptable cptable_737;
36extern union cptable cptable_775;
37extern union cptable cptable_850;
38extern union cptable cptable_852;
39extern union cptable cptable_855;
40extern union cptable cptable_856;
41extern union cptable cptable_857;
42extern union cptable cptable_860;
43extern union cptable cptable_861;
44extern union cptable cptable_862;
45extern union cptable cptable_863;
46extern union cptable cptable_864;
47extern union cptable cptable_865;
48extern union cptable cptable_866;
49extern union cptable cptable_869;
50extern union cptable cptable_874;
51extern union cptable cptable_875;
52extern union cptable cptable_878;
53extern union cptable cptable_932;
54extern union cptable cptable_936;
55extern union cptable cptable_949;
56extern union cptable cptable_950;
57extern union cptable cptable_1006;
58extern union cptable cptable_1026;
59extern union cptable cptable_1250;
60extern union cptable cptable_1251;
61extern union cptable cptable_1252;
62extern union cptable cptable_1253;
63extern union cptable cptable_1254;
64extern union cptable cptable_1255;
65extern union cptable cptable_1256;
66extern union cptable cptable_1257;
67extern union cptable cptable_1258;
68extern union cptable cptable_1361;
69extern union cptable cptable_10000;
70extern union cptable cptable_10001;
71extern union cptable cptable_10002;
72extern union cptable cptable_10003;
73extern union cptable cptable_10004;
74extern union cptable cptable_10005;
75extern union cptable cptable_10006;
76extern union cptable cptable_10007;
77extern union cptable cptable_10008;
78extern union cptable cptable_10010;
79extern union cptable cptable_10017;
80extern union cptable cptable_10021;
81extern union cptable cptable_10029;
82extern union cptable cptable_10079;
83extern union cptable cptable_10081;
84extern union cptable cptable_10082;
85extern union cptable cptable_20127;
86extern union cptable cptable_20866;
87extern union cptable cptable_20932;
88extern union cptable cptable_21866;
89extern union cptable cptable_28591;
90extern union cptable cptable_28592;
91extern union cptable cptable_28593;
92extern union cptable cptable_28594;
93extern union cptable cptable_28595;
94extern union cptable cptable_28596;
95extern union cptable cptable_28597;
96extern union cptable cptable_28598;
97extern union cptable cptable_28599;
98extern union cptable cptable_28600;
99extern union cptable cptable_28601;
100extern union cptable cptable_28603;
101extern union cptable cptable_28604;
102extern union cptable cptable_28605;
103extern union cptable cptable_28606;
104
105static const union cptable * const cptables[73] =
106{
180};
181/* ### cpmap end ### */
182/* Everything above this line is generated automatically by make_unicode */
183
184
185static int cmp_codepage( const void *codepage, const void *entry )
186{
187 return *(const unsigned int *)codepage - (*(const union cptable *const *)entry)->info.codepage;
188}
189
190
191/* get the table of a given code page */
192const union cptable *wine_cp_get_table( unsigned int codepage )
193{
194 const union cptable **res;
195
197 sizeof(cptables[0]), cmp_codepage ))) return NULL;
198 return *res;
199}
200
201
202/* enum valid codepages */
203const union cptable *wine_cp_enum_table( unsigned int index )
204{
205 if (index >= ARRAY_SIZE( cptables )) return NULL;
206 return cptables[index];
207}
#define index(s, c)
Definition: various.h:29
union cptable cptable_28594
Definition: c_28594.c:685
static int cmp_codepage(const void *codepage, const void *entry)
Definition: cptable.c:185
union cptable cptable_10000
Definition: c_10000.c:685
union cptable cptable_10007
Definition: c_10007.c:753
union cptable cptable_10017
Definition: c_10017.c:753
union cptable cptable_10001
Definition: c_10001.c:5646
union cptable cptable_20866
Definition: c_20866.c:753
union cptable cptable_863
Definition: c_863.c:723
const union cptable * wine_cp_enum_table(unsigned int index)
Definition: cptable.c:203
union cptable cptable_20932
Definition: c_20932.c:6268
union cptable cptable_20127
Definition: c_20127.c:684
union cptable cptable_1251
Definition: c_1251.c:415
union cptable cptable_857
Definition: c_857.c:746
union cptable cptable_28597
Definition: c_28597.c:718
union cptable cptable_1254
Definition: c_1254.c:579
union cptable cptable_28596
Definition: c_28596.c:749
union cptable cptable_28592
Definition: c_28592.c:685
union cptable cptable_10006
Definition: c_10006.c:690
#define ARRAY_SIZE(x)
Definition: cptable.c:26
union cptable cptable_737
Definition: c_737.c:723
static const union cptable *const cptables[73]
Definition: cptable.c:105
union cptable cptable_874
Definition: c_874.c:422
union cptable cptable_862
Definition: c_862.c:754
union cptable cptable_10021
Definition: c_10021.c:718
union cptable cptable_28598
Definition: c_28598.c:746
union cptable cptable_10003
Definition: c_10003.c:8246
union cptable cptable_865
Definition: c_865.c:723
union cptable cptable_037
Definition: c_037.c:685
union cptable cptable_10081
Definition: c_10081.c:713
union cptable cptable_860
Definition: c_860.c:723
union cptable cptable_21866
Definition: c_21866.c:753
union cptable cptable_1361
Definition: c_1361.c:8660
union cptable cptable_10082
Definition: c_10082.c:718
union cptable cptable_424
Definition: c_424.c:716
union cptable cptable_1253
Definition: c_1253.c:427
union cptable cptable_28604
Definition: c_28604.c:685
union cptable cptable_437
Definition: c_437.c:723
union cptable cptable_949
Definition: c_949.c:9098
union cptable cptable_1256
Definition: c_1256.c:354
union cptable cptable_856
Definition: c_856.c:716
union cptable cptable_28593
Definition: c_28593.c:718
union cptable cptable_1250
Definition: c_1250.c:579
union cptable cptable_852
Definition: c_852.c:718
union cptable cptable_10029
Definition: c_10029.c:685
union cptable cptable_850
Definition: c_850.c:718
const union cptable * wine_cp_get_table(unsigned int codepage)
Definition: cptable.c:192
union cptable cptable_878
Definition: c_878.c:753
union cptable cptable_1257
Definition: c_1257.c:278
union cptable cptable_936
Definition: c_936.c:7940
union cptable cptable_855
Definition: c_855.c:786
union cptable cptable_10079
Definition: c_10079.c:685
union cptable cptable_775
Definition: c_775.c:718
union cptable cptable_932
Definition: c_932.c:5591
union cptable cptable_28599
Definition: c_28599.c:685
union cptable cptable_500
Definition: c_500.c:685
union cptable cptable_10005
Definition: c_10005.c:780
union cptable cptable_10002
Definition: c_10002.c:6541
union cptable cptable_1252
Definition: c_1252.c:577
union cptable cptable_861
Definition: c_861.c:723
union cptable cptable_28606
Definition: c_28606.c:685
union cptable cptable_1006
Definition: c_1006.c:722
union cptable cptable_866
Definition: c_866.c:786
union cptable cptable_28595
Definition: c_28595.c:753
union cptable cptable_1258
Definition: c_1258.c:312
union cptable cptable_10004
Definition: c_10004.c:763
union cptable cptable_10008
Definition: c_10008.c:6304
union cptable cptable_950
Definition: c_950.c:8347
union cptable cptable_28603
Definition: c_28603.c:685
union cptable cptable_28601
Definition: c_28601.c:718
union cptable cptable_869
Definition: c_869.c:723
union cptable cptable_864
Definition: c_864.c:745
union cptable cptable_28591
Definition: c_28591.c:685
union cptable cptable_10010
Definition: c_10010.c:718
union cptable cptable_28605
Definition: c_28605.c:685
union cptable cptable_1026
Definition: c_1026.c:685
union cptable cptable_1255
Definition: c_1255.c:320
union cptable cptable_875
Definition: c_875.c:690
union cptable cptable_28600
Definition: c_28600.c:685
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613
GLuint index
Definition: glext.h:6031
uint32_t entry
Definition: isohybrid.c:63
#define bsearch
int codepage
Definition: win_iconv.c:156