#include <string.h>
#include "wine/unicode.h"
Go to the source code of this file.
|
unsigned int | wine_decompose (int flags, WCHAR ch, WCHAR *dst, unsigned int dstlen) DECLSPEC_HIDDEN |
|
static int | is_private_use_area_char (WCHAR code) |
|
static int | check_invalid_chars_sbcs (const struct sbcs_table *table, int flags, const unsigned char *src, unsigned int srclen) |
|
static int | mbstowcs_sbcs (const struct sbcs_table *table, int flags, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen) |
|
static int | mbstowcs_sbcs_decompose (const struct sbcs_table *table, int flags, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen) |
|
static int | get_length_dbcs (const struct dbcs_table *table, const unsigned char *src, unsigned int srclen) |
|
static int | check_invalid_chars_dbcs (const struct dbcs_table *table, const unsigned char *src, unsigned int srclen) |
|
static int | mbstowcs_dbcs (const struct dbcs_table *table, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen) |
|
static int | mbstowcs_dbcs_decompose (const struct dbcs_table *table, const unsigned char *src, unsigned int srclen, WCHAR *dst, unsigned int dstlen) |
|
int | wine_cp_mbstowcs (const union cptable *table, int flags, const char *s, int srclen, WCHAR *dst, int dstlen) |
|
◆ check_invalid_chars_dbcs()
Definition at line 162 of file mbtowc.c.
164{
166 const unsigned char *
const cp2uni_lb =
table->cp2uni_leadbytes;
167 const WCHAR def_unicode_char =
table->info.def_unicode_char;
168 const unsigned short def_char =
table->uni2cp_low[
table->uni2cp_high[def_unicode_char >> 8]
169 + (def_unicode_char & 0xff)];
171 {
172 unsigned char off = cp2uni_lb[*
src];
173 if (off)
174 {
176 if (
cp2uni[(off << 8) +
src[1]] == def_unicode_char &&
177 ((
src[0] << 8) |
src[1]) != def_char)
break;
180 }
181 else if ((
cp2uni[*
src] == def_unicode_char && *
src != def_char) ||
185 }
187}
static const WCHAR cp2uni[256]
static DWORD LPDWORD LPCSTR DWORD srclen
Referenced by wine_cp_mbstowcs().
◆ check_invalid_chars_sbcs()
Definition at line 35 of file mbtowc.c.
37{
39 const WCHAR def_unicode_char =
table->info.def_unicode_char;
40 const unsigned char def_char =
table->uni2cp_low[
table->uni2cp_high[def_unicode_char >> 8]
41 + (def_unicode_char & 0xff)];
43 {
44 if ((
cp2uni[*
src] == def_unicode_char && *
src != def_char) ||
48 }
50}
Referenced by wine_cp_mbstowcs().
◆ get_length_dbcs()
Definition at line 144 of file mbtowc.c.
146{
147 const unsigned char *
const cp2uni_lb =
table->cp2uni_leadbytes;
149
151 {
153 {
156 }
157 }
159}
Referenced by mbstowcs_dbcs().
◆ is_private_use_area_char()
static int is_private_use_area_char |
( |
WCHAR |
code | ) |
|
|
inlinestatic |
◆ mbstowcs_dbcs()
Definition at line 191 of file mbtowc.c.
194{
196 const unsigned char *
const cp2uni_lb =
table->cp2uni_leadbytes;
198
200
202 {
203 unsigned char off = cp2uni_lb[*
src];
205 {
209 }
211 }
214}
Referenced by wine_cp_mbstowcs().
◆ mbstowcs_dbcs_decompose()
Definition at line 218 of file mbtowc.c.
221{
223 const unsigned char *
const cp2uni_lb =
table->cp2uni_leadbytes;
226
228 {
231 {
232 unsigned char off = cp2uni_lb[*
src];
234 {
238 }
241 }
243 }
244
246 {
247 unsigned char off = cp2uni_lb[*
src];
249 {
253 }
258 }
261}
Referenced by wine_cp_mbstowcs().
◆ mbstowcs_sbcs()
Definition at line 54 of file mbtowc.c.
57{
60
62 {
63
66 }
67
69 {
89 }
90
91
95 {
111 case 0: break;
112 }
114}
Referenced by wine_cp_mbstowcs().
◆ mbstowcs_sbcs_decompose()
◆ wine_cp_mbstowcs()
Definition at line 265 of file mbtowc.c.
268{
269 const unsigned char *
src = (
const unsigned char*)
s;
270
271 if (
table->info.char_size == 1)
272 {
274 {
276 }
278 {
281 }
283 }
284 else
285 {
287 {
289 }
292 else
294 }
295}
#define MB_ERR_INVALID_CHARS
Referenced by MultiByteToWideChar().
◆ wine_decompose()