VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/libWine/cptable.c@ 20612

Last change on this file since 20612 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 5.5 KB
Line 
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/*
22 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#include <stdlib.h>
31
32#include "wine/unicode.h"
33
34/* Everything below this line is generated automatically by cpmap.pl */
35/* ### cpmap begin ### */
36extern union cptable cptable_037;
37extern union cptable cptable_424;
38extern union cptable cptable_437;
39extern union cptable cptable_500;
40extern union cptable cptable_737;
41extern union cptable cptable_775;
42extern union cptable cptable_850;
43extern union cptable cptable_852;
44extern union cptable cptable_855;
45extern union cptable cptable_856;
46extern union cptable cptable_857;
47extern union cptable cptable_860;
48extern union cptable cptable_861;
49extern union cptable cptable_862;
50extern union cptable cptable_863;
51extern union cptable cptable_864;
52extern union cptable cptable_865;
53extern union cptable cptable_866;
54extern union cptable cptable_869;
55extern union cptable cptable_874;
56extern union cptable cptable_875;
57extern union cptable cptable_878;
58extern union cptable cptable_932;
59extern union cptable cptable_936;
60extern union cptable cptable_949;
61extern union cptable cptable_950;
62extern union cptable cptable_1006;
63extern union cptable cptable_1026;
64extern union cptable cptable_1250;
65extern union cptable cptable_1251;
66extern union cptable cptable_1252;
67extern union cptable cptable_1253;
68extern union cptable cptable_1254;
69extern union cptable cptable_1255;
70extern union cptable cptable_1256;
71extern union cptable cptable_1257;
72extern union cptable cptable_1258;
73extern union cptable cptable_1361;
74extern union cptable cptable_10000;
75extern union cptable cptable_10006;
76extern union cptable cptable_10007;
77extern union cptable cptable_10029;
78extern union cptable cptable_10079;
79extern union cptable cptable_10081;
80extern union cptable cptable_20127;
81extern union cptable cptable_20866;
82extern union cptable cptable_20932;
83extern union cptable cptable_21866;
84extern union cptable cptable_28591;
85extern union cptable cptable_28592;
86extern union cptable cptable_28593;
87extern union cptable cptable_28594;
88extern union cptable cptable_28595;
89extern union cptable cptable_28596;
90extern union cptable cptable_28597;
91extern union cptable cptable_28598;
92extern union cptable cptable_28599;
93extern union cptable cptable_28600;
94extern union cptable cptable_28603;
95extern union cptable cptable_28604;
96extern union cptable cptable_28605;
97extern union cptable cptable_28606;
98
99static const union cptable * const cptables[62] =
100{
101 &cptable_037,
102 &cptable_424,
103 &cptable_437,
104 &cptable_500,
105 &cptable_737,
106 &cptable_775,
107 &cptable_850,
108 &cptable_852,
109 &cptable_855,
110 &cptable_856,
111 &cptable_857,
112 &cptable_860,
113 &cptable_861,
114 &cptable_862,
115 &cptable_863,
116 &cptable_864,
117 &cptable_865,
118 &cptable_866,
119 &cptable_869,
120 &cptable_874,
121 &cptable_875,
122 &cptable_878,
123 &cptable_932,
124 &cptable_936,
125 &cptable_949,
126 &cptable_950,
127 &cptable_1006,
128 &cptable_1026,
129 &cptable_1250,
130 &cptable_1251,
131 &cptable_1252,
132 &cptable_1253,
133 &cptable_1254,
134 &cptable_1255,
135 &cptable_1256,
136 &cptable_1257,
137 &cptable_1258,
138 &cptable_1361,
139 &cptable_10000,
140 &cptable_10006,
141 &cptable_10007,
142 &cptable_10029,
143 &cptable_10079,
144 &cptable_10081,
145 &cptable_20127,
146 &cptable_20866,
147 &cptable_20932,
148 &cptable_21866,
149 &cptable_28591,
150 &cptable_28592,
151 &cptable_28593,
152 &cptable_28594,
153 &cptable_28595,
154 &cptable_28596,
155 &cptable_28597,
156 &cptable_28598,
157 &cptable_28599,
158 &cptable_28600,
159 &cptable_28603,
160 &cptable_28604,
161 &cptable_28605,
162 &cptable_28606,
163};
164/* ### cpmap end ### */
165/* Everything above this line is generated automatically by cpmap.pl */
166
167#define NB_CODEPAGES (sizeof(cptables)/sizeof(cptables[0]))
168
169
170static int cmp_codepage( const void *codepage, const void *entry )
171{
172 return *(const unsigned int *)codepage - (*(const union cptable *const *)entry)->info.codepage;
173}
174
175
176/* get the table of a given code page */
177const union cptable *wine_cp_get_table( unsigned int codepage )
178{
179 const union cptable **res;
180
181 if (!(res = bsearch( &codepage, cptables, NB_CODEPAGES,
182 sizeof(cptables[0]), cmp_codepage ))) return NULL;
183 return *res;
184}
185
186
187/* enum valid codepages */
188const union cptable *wine_cp_enum_table( unsigned int index )
189{
190 if (index >= NB_CODEPAGES) return NULL;
191 return cptables[index];
192}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette