VirtualBox

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

Last change on this file since 33085 was 22496, checked in by vboxsync, 15 years ago

crOpenGL: update wine to 1.1.27 and better fix for depthstencil surface refcounting

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

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