1 | /* $Id: uniconv.h,v 1.8 2001-05-19 08:23:41 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * OS/2 Unicode API definitions
|
---|
4 | *
|
---|
5 | * Copyright 1999 Achim Hasenmueller
|
---|
6 | * 1999 Przemyslaw Dobrowolski
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 | #ifndef _ULS_UCONV
|
---|
12 | #define _ULS_UCONV
|
---|
13 | #ifdef __cplusplus
|
---|
14 | extern "C" {
|
---|
15 | #endif
|
---|
16 | //@@@AH workaround for wrc bug
|
---|
17 | #ifndef RC_INVOKED
|
---|
18 | #include <stddef.h>
|
---|
19 | #include <time.h>
|
---|
20 | #endif
|
---|
21 | #define ULS_API_ERROR_BASE 0x00020400
|
---|
22 | #define ULS_API_ERROR(x) (ULS_API_ERROR_BASE | (x))
|
---|
23 | typedef enum _uls_return_codes {
|
---|
24 | ULS_SUCCESS = 0x00000000,
|
---|
25 | ULS_OTHER = ULS_API_ERROR(1),
|
---|
26 | ULS_ILLEGALSEQUENCE = ULS_API_ERROR(2),
|
---|
27 | ULS_MAXFILESPERPROC = ULS_API_ERROR(3),
|
---|
28 | ULS_MAXFILES = ULS_API_ERROR(4),
|
---|
29 | ULS_NOOP = ULS_API_ERROR(5),
|
---|
30 | ULS_TOOMANYKBD = ULS_API_ERROR(6),
|
---|
31 | ULS_KBDNOTFOUND = ULS_API_ERROR(7),
|
---|
32 | ULS_BADHANDLE = ULS_API_ERROR(8),
|
---|
33 | ULS_NODEAD = ULS_API_ERROR(9),
|
---|
34 | ULS_NOSCAN = ULS_API_ERROR(10),
|
---|
35 | ULS_INVALIDSCAN = ULS_API_ERROR(11),
|
---|
36 | ULS_NOTIMPLEMENTED = ULS_API_ERROR(12),
|
---|
37 | ULS_NOMEMORY = ULS_API_ERROR(13),
|
---|
38 | ULS_INVALID = ULS_API_ERROR(14),
|
---|
39 | ULS_BADOBJECT = ULS_API_ERROR(15),
|
---|
40 | ULS_NOTOKEN = ULS_API_ERROR(16),
|
---|
41 | ULS_NOMATCH = ULS_API_ERROR(17),
|
---|
42 | ULS_BUFFERFULL = ULS_API_ERROR(18),
|
---|
43 | ULS_RANGE = ULS_API_ERROR(19),
|
---|
44 | ULS_UNSUPPORTED = ULS_API_ERROR(20),
|
---|
45 | ULS_BADATTR = ULS_API_ERROR(21),
|
---|
46 | ULS_VERSION = ULS_API_ERROR(22)
|
---|
47 | } uls_error_t;
|
---|
48 | #ifndef UNI_SUCCESS
|
---|
49 | #define UNI_SUCCESS ULS_SUCCESS
|
---|
50 | #endif
|
---|
51 | #ifndef NO_ERROR
|
---|
52 | #define NO_ERROR 0
|
---|
53 | #endif
|
---|
54 | #ifndef UNI_UNSUPPORTED
|
---|
55 | #define UNI_UNSUPPORTED ULS_UNSUPPORTED
|
---|
56 | #endif
|
---|
57 | #ifndef UNI_NOMEMORY
|
---|
58 | #define UNI_NOMEMORY ULS_NOMEMORY
|
---|
59 | #endif
|
---|
60 | #ifndef UNI_INVALID
|
---|
61 | #define UNI_INVALID ULS_INVALID
|
---|
62 | #endif
|
---|
63 | #ifndef UNI_BADOBJ
|
---|
64 | #define UNI_BADOBJ ULS_BADOBJECT
|
---|
65 | #endif
|
---|
66 | #ifndef UNI_NOTOKEN
|
---|
67 | #define UNI_NOTOKEN ULS_NOTOKEN
|
---|
68 | #endif
|
---|
69 | #ifndef UNI_NOMATCH
|
---|
70 | #define UNI_NOMATCH ULS_NOMATCH
|
---|
71 | #endif
|
---|
72 | #ifndef UNI_BUFFER_FULL
|
---|
73 | #define UNI_BUFFER_FULL ULS_BUFFERFULL
|
---|
74 | #endif
|
---|
75 | #ifndef UNI_RANGE
|
---|
76 | #define UNI_RANGE ULS_RANGE
|
---|
77 | #endif
|
---|
78 | #ifndef ERR_NOOP
|
---|
79 | #define ERR_NOOP ULS_NOOP
|
---|
80 | #endif
|
---|
81 | #ifndef ERR_TOO_MANY_KBD
|
---|
82 | #define ERR_TOO_MANY_KBD ULS_TOOMANYKBD
|
---|
83 | #endif
|
---|
84 | #ifndef ERR_KBD_NOT_FOUND
|
---|
85 | #define ERR_KBD_NOT_FOUND ULS_KBDNOTFOUND
|
---|
86 | #endif
|
---|
87 | #ifndef ERR_KBD_INVALID
|
---|
88 | #define ERR_KBD_INVALID ULS_INVALID
|
---|
89 | #endif
|
---|
90 | #ifndef ERR_BAD_HANDLE
|
---|
91 | #define ERR_BAD_HANDLE ULS_BADHANDLE
|
---|
92 | #endif
|
---|
93 | #ifndef ERR_NO_DEAD
|
---|
94 | #define ERR_NO_DEAD ULS_NODEAD
|
---|
95 | #endif
|
---|
96 | #ifndef ERR_NO_SCAN
|
---|
97 | #define ERR_NO_SCAN ULS_NOSCAN
|
---|
98 | #endif
|
---|
99 | #ifndef ERR_INVALID_SCAN
|
---|
100 | #define ERR_INVALID_SCAN ULS_INVALIDSCAN
|
---|
101 | #endif
|
---|
102 | #ifndef ERR_NOT_IMPLEMENTED
|
---|
103 | #define ERR_NOT_IMPLEMENTED ULS_NOTIMPLEMENTED
|
---|
104 | #endif
|
---|
105 | #ifdef ERR_NO_MEMORY
|
---|
106 | #undef ERR_NO_MEMORY
|
---|
107 | #endif
|
---|
108 | #define ERR_NO_MEMORY ULS_NOMEMORY
|
---|
109 | typedef int LocaleItem;
|
---|
110 | #define D_T_FMT 1
|
---|
111 | #define D_FMT 2
|
---|
112 | #define T_FMT 3
|
---|
113 | #define AM_STR 4
|
---|
114 | #define PM_STR 5
|
---|
115 | #define ABDAY_1 6
|
---|
116 | #define ABDAY_2 7
|
---|
117 | #define ABDAY_3 8
|
---|
118 | #define ABDAY_4 9
|
---|
119 | #define ABDAY_5 10
|
---|
120 | #define ABDAY_6 11
|
---|
121 | #define ABDAY_7 12
|
---|
122 | #define DAY_1 13
|
---|
123 | #define DAY_2 14
|
---|
124 | #define DAY_3 15
|
---|
125 | #define DAY_4 16
|
---|
126 | #define DAY_5 17
|
---|
127 | #define DAY_6 18
|
---|
128 | #define DAY_7 19
|
---|
129 | #define ABMON_1 20
|
---|
130 | #define ABMON_2 21
|
---|
131 | #define ABMON_3 22
|
---|
132 | #define ABMON_4 23
|
---|
133 | #define ABMON_5 24
|
---|
134 | #define ABMON_6 25
|
---|
135 | #define ABMON_7 26
|
---|
136 | #define ABMON_8 27
|
---|
137 | #define ABMON_9 28
|
---|
138 | #define ABMON_10 29
|
---|
139 | #define ABMON_11 30
|
---|
140 | #define ABMON_12 31
|
---|
141 | #define MON_1 32
|
---|
142 | #define MON_2 33
|
---|
143 | #define MON_3 34
|
---|
144 | #define MON_4 35
|
---|
145 | #define MON_5 36
|
---|
146 | #define MON_6 37
|
---|
147 | #define MON_7 38
|
---|
148 | #define MON_8 39
|
---|
149 | #define MON_9 40
|
---|
150 | #define MON_10 41
|
---|
151 | #define MON_11 42
|
---|
152 | #define MON_12 43
|
---|
153 | #define RADIXCHAR 44
|
---|
154 | #define THOUSEP 45
|
---|
155 | #define YESSTR 46
|
---|
156 | #define NOSTR 47
|
---|
157 | #define CRNCYSTR 48
|
---|
158 | #define CODESET 49
|
---|
159 | #define T_FMT_AMPM 55
|
---|
160 | #define ERA 56
|
---|
161 | #define ERA_D_FMT 57
|
---|
162 | #define ERA_D_T_FMT 58
|
---|
163 | #define ERA_T_FMT 59
|
---|
164 | #define ALT_DIGITS 60
|
---|
165 | #define YESEXPR 61
|
---|
166 | #define NOEXPR 62
|
---|
167 | #define DATESEP 63
|
---|
168 | #define TIMESEP 64
|
---|
169 | #define LISTSEP 65
|
---|
170 | #ifndef _NL_NUM_ITEMS
|
---|
171 | #define _NL_NUM_ITEMS 66
|
---|
172 | #endif
|
---|
173 | // Evil UNI Items hackeckeur ;-)
|
---|
174 | // PD 21-07-99: Undefined Uni items!!!! Thanx IBM for undocumented items :-P
|
---|
175 | // Names like regedit2 uses:
|
---|
176 | #define XLOCALETOKEN 50
|
---|
177 | #define XWINLOCALE 51
|
---|
178 | #define ICURRENCY 75
|
---|
179 | #define IFIRSTDAYOFWEEK 81
|
---|
180 | #define INEGCURR 83
|
---|
181 | #define SINTLSYMBOL 87
|
---|
182 | #define SABBREVLANGNAME 88
|
---|
183 | #define SLANGUAGE 104
|
---|
184 | #define WTIMEFORMAT 123
|
---|
185 | #define WSHORTDATE 124
|
---|
186 | #define WLONGDATE 125
|
---|
187 | #define SENGCOUNTRYNAME 105
|
---|
188 | #define SENGLANGUAGE 103
|
---|
189 | #define SCOUNTRY 106 // Fixme or 107?
|
---|
190 | #define IANSICODEPAGE 110
|
---|
191 | #define ICODEPAGE 111
|
---|
192 | #define IALTCODEPAGE 112
|
---|
193 | #define IMACCODEPAGE 113
|
---|
194 | #define ICOUNTRY 108
|
---|
195 | #define SISO639LANGNAME 101
|
---|
196 | #define SISO3166CTRYNAME 102
|
---|
197 | #define SABBREVCTRYNAME 102
|
---|
198 | #define SNATIVEDIGITS 53
|
---|
199 |
|
---|
200 |
|
---|
201 | #if defined(__IBMCPP__) || defined(__IBMC__)
|
---|
202 | #define CALLCONV _System
|
---|
203 | #else
|
---|
204 | #define CALLCONV
|
---|
205 | #endif
|
---|
206 | typedef int ulsBool;
|
---|
207 | #ifndef TRUE
|
---|
208 | #define TRUE 1
|
---|
209 | #endif
|
---|
210 | #ifndef FALSE
|
---|
211 | #define FALSE 0
|
---|
212 | #endif
|
---|
213 | #ifndef _ULS_UNICHAR_DEFINED
|
---|
214 | typedef unsigned short UniChar ;
|
---|
215 | #define _ULS_UNICHAR_DEFINED
|
---|
216 | #endif
|
---|
217 | typedef void *LocaleObject;
|
---|
218 | typedef unsigned int LocaleToken;
|
---|
219 | typedef void *AttrObject;
|
---|
220 | typedef void *XformObject;
|
---|
221 | #define UNI_TOKEN_POINTER 1
|
---|
222 | #define UNI_MBS_STRING_POINTER 2
|
---|
223 | #define UNI_UCS_STRING_POINTER 3
|
---|
224 | #undef LANG
|
---|
225 | #undef LC_ALL
|
---|
226 | #undef LC_COLLATE
|
---|
227 | #undef LC_CTYPE
|
---|
228 | #undef LC_NUMERIC
|
---|
229 | #undef LC_MONETARY
|
---|
230 | #undef LC_TIME
|
---|
231 | #undef LC_MESSAGES
|
---|
232 | #define LANG (-2)
|
---|
233 | #define LC_ALL (-1)
|
---|
234 | #define LC_COLLATE 0
|
---|
235 | #define LC_CTYPE 1
|
---|
236 | #define LC_NUMERIC 2
|
---|
237 | #define LC_MONETARY 3
|
---|
238 | #define LC_TIME 4
|
---|
239 | #define LC_MESSAGES 5
|
---|
240 | struct UniLconv {
|
---|
241 | UniChar *decimal_point;
|
---|
242 | UniChar *thousands_sep;
|
---|
243 | short *grouping;
|
---|
244 | UniChar *int_curr_symbol;
|
---|
245 | UniChar *currency_symbol;
|
---|
246 | UniChar *mon_decimal_point;
|
---|
247 | UniChar *mon_thousands_sep;
|
---|
248 | short *mon_grouping;
|
---|
249 | UniChar *positive_sign;
|
---|
250 | UniChar *negative_sign;
|
---|
251 | short int_frac_digits;
|
---|
252 | short frac_digits;
|
---|
253 | short p_cs_precedes;
|
---|
254 | short p_sep_by_space;
|
---|
255 | short n_cs_precedes;
|
---|
256 | short n_sep_by_space;
|
---|
257 | short p_sign_posn;
|
---|
258 | short n_sign_posn;
|
---|
259 | short os2_mondecpt;
|
---|
260 | UniChar *debit_sign;
|
---|
261 | UniChar *credit_sign;
|
---|
262 | UniChar *left_parenthesis;
|
---|
263 | UniChar *right_parenthesis;
|
---|
264 | };
|
---|
265 | int CALLCONV UniCreateLocaleObject ( int locale_spec_type, const void *locale_spec,
|
---|
266 | LocaleObject *locale_object_ptr );
|
---|
267 | int CALLCONV UniQueryLocaleObject ( const LocaleObject locale_object, int category,
|
---|
268 | int locale_spec_type, void **locale_spec_ptr );
|
---|
269 | int CALLCONV UniFreeLocaleObject ( LocaleObject locale_object );
|
---|
270 | int CALLCONV UniFreeMem ( void *memory_ptr );
|
---|
271 | int CALLCONV UniLocaleStrToToken ( int locale_string_type, const void *locale_string,
|
---|
272 | LocaleToken *locale_token_ptr );
|
---|
273 | int CALLCONV UniLocaleTokenToStr ( const LocaleToken locale_token,
|
---|
274 | int locale_string_type, void **locale_string_ptr );
|
---|
275 | int CALLCONV UniQueryLocaleInfo ( const LocaleObject locale_object,
|
---|
276 | struct UniLconv **unilconv_addr_ptr );
|
---|
277 | int CALLCONV UniFreeLocaleInfo ( struct UniLconv *unilconv_addr );
|
---|
278 | int CALLCONV UniQueryLocaleItem ( const LocaleObject locale_object,
|
---|
279 | LocaleItem item,
|
---|
280 | UniChar **info_item_addr_ptr );
|
---|
281 | size_t CALLCONV UniStrftime ( const LocaleObject locale_object,
|
---|
282 | UniChar *ucs, size_t maxsize,
|
---|
283 | const UniChar *format, const struct tm *time_ptr );
|
---|
284 | UniChar * CALLCONV UniStrptime ( const LocaleObject locale_object,
|
---|
285 | const UniChar *buf, const UniChar *format,
|
---|
286 | struct tm *time_ptr );
|
---|
287 | int CALLCONV UniStrfmon ( const LocaleObject locale_object,
|
---|
288 | UniChar *ucs, size_t maxsize,
|
---|
289 | const UniChar *format, ... );
|
---|
290 | UniChar * CALLCONV UniStrcat ( UniChar *ucs1, const UniChar *ucs2 );
|
---|
291 | UniChar * CALLCONV UniStrchr ( const UniChar *ucs, UniChar uc );
|
---|
292 | int CALLCONV UniStrcmp ( const UniChar *ucs1, const UniChar *ucs2 );
|
---|
293 | UniChar * CALLCONV UniStrcpy ( UniChar *ucs1, const UniChar *ucs2 );
|
---|
294 | size_t CALLCONV UniStrcspn ( const UniChar *ucs1, const UniChar *ucs2 );
|
---|
295 | size_t CALLCONV UniStrlen ( const UniChar *ucs1 );
|
---|
296 | UniChar * CALLCONV UniStrncat ( UniChar *ucs1, const UniChar *ucs2, size_t n );
|
---|
297 | int CALLCONV UniStrncmp ( const UniChar *ucs1, const UniChar *ucs2, size_t n );
|
---|
298 | UniChar * CALLCONV UniStrncpy ( UniChar *ucs1, const UniChar *ucs2, size_t n );
|
---|
299 | UniChar * CALLCONV UniStrpbrk ( const UniChar *ucs1, const UniChar *ucs2 );
|
---|
300 | UniChar * CALLCONV UniStrrchr ( const UniChar *ucs, UniChar uc );
|
---|
301 | size_t CALLCONV UniStrspn ( const UniChar *ucs1, const UniChar *ucs2 );
|
---|
302 | UniChar * CALLCONV UniStrstr ( const UniChar *ucs1, const UniChar *ucs2 );
|
---|
303 | UniChar * CALLCONV UniStrtok ( UniChar *ucs1, const UniChar *ucs2 );
|
---|
304 | int CALLCONV UniCreateAttrObject ( const LocaleObject locale_object,
|
---|
305 | const UniChar *attr_name,
|
---|
306 | AttrObject *attr_object_ptr );
|
---|
307 | int CALLCONV UniQueryCharAttr ( AttrObject attr_object, UniChar uc );
|
---|
308 | int CALLCONV UniScanForAttr ( AttrObject attr_object, const UniChar *ucs,
|
---|
309 | size_t num_elems, ulsBool inverse_op,
|
---|
310 | size_t *offset_ptr );
|
---|
311 | int CALLCONV UniFreeAttrObject ( AttrObject attr_object );
|
---|
312 | int CALLCONV UniQueryAlnum ( const LocaleObject locale_object, UniChar uc );
|
---|
313 | int CALLCONV UniQueryAlpha ( const LocaleObject locale_object, UniChar uc );
|
---|
314 | int CALLCONV UniQueryBlank ( const LocaleObject locale_object, UniChar uc );
|
---|
315 | int CALLCONV UniQueryCntrl ( const LocaleObject locale_object, UniChar uc );
|
---|
316 | int CALLCONV UniQueryDigit ( const LocaleObject locale_object, UniChar uc );
|
---|
317 | int CALLCONV UniQueryGraph ( const LocaleObject locale_object, UniChar uc );
|
---|
318 | int CALLCONV UniQueryLower ( const LocaleObject locale_object, UniChar uc );
|
---|
319 | int CALLCONV UniQueryPrint ( const LocaleObject locale_object, UniChar uc );
|
---|
320 | int CALLCONV UniQueryPunct ( const LocaleObject locale_object, UniChar uc );
|
---|
321 | int CALLCONV UniQuerySpace ( const LocaleObject locale_object, UniChar uc );
|
---|
322 | int CALLCONV UniQueryUpper ( const LocaleObject locale_object, UniChar uc );
|
---|
323 | int CALLCONV UniQueryXdigit ( const LocaleObject locale_object, UniChar uc );
|
---|
324 | int CALLCONV UniCreateTransformObject ( const LocaleObject locale_object,
|
---|
325 | const UniChar *xtype,
|
---|
326 | XformObject *xform_object_ptr );
|
---|
327 | int CALLCONV UniTransformStr ( XformObject xform_object,
|
---|
328 | const UniChar *inp_buf, int *inp_size,
|
---|
329 | UniChar *out_buf, int *out_size );
|
---|
330 | int CALLCONV UniFreeTransformObject ( XformObject xform_object );
|
---|
331 | UniChar CALLCONV UniTransLower ( const LocaleObject locale_object, UniChar uc );
|
---|
332 | UniChar CALLCONV UniTransUpper ( const LocaleObject locale_object, UniChar uc );
|
---|
333 | int CALLCONV UniStrtod ( const LocaleObject locale_object, const UniChar *ucs,
|
---|
334 | UniChar **end_ptr, double *result_ptr );
|
---|
335 | int CALLCONV UniStrtol ( const LocaleObject locale_object, const UniChar *ucs,
|
---|
336 | UniChar **end_ptr, int base, long int *result_ptr );
|
---|
337 | int CALLCONV UniStrtoul ( const LocaleObject locale_object, const UniChar *ucs,
|
---|
338 | UniChar **end_ptr, int base, unsigned long int *result_ptr );
|
---|
339 | int CALLCONV UniStrcoll ( const LocaleObject locale_object,
|
---|
340 | const UniChar *ucs1, const UniChar *ucs2 );
|
---|
341 | size_t CALLCONV UniStrxfrm ( const LocaleObject locale_object,
|
---|
342 | UniChar *ucs1, const UniChar *ucs2, size_t n );
|
---|
343 | int CALLCONV UniStrcmpi ( const LocaleObject locale_object,
|
---|
344 | const UniChar *ucs1, const UniChar *ucs2 );
|
---|
345 | int CALLCONV UniStrncmpi ( const LocaleObject locale_object,
|
---|
346 | const UniChar *ucs1, const UniChar *ucs2, const size_t n );
|
---|
347 | UniChar CALLCONV UniToupper (UniChar uc);
|
---|
348 | UniChar CALLCONV UniTolower (UniChar uc);
|
---|
349 | UniChar * CALLCONV UniStrupr (UniChar *ucs);
|
---|
350 | UniChar * CALLCONV UniStrlwr (UniChar *ucs);
|
---|
351 | int CALLCONV UniMapCtryToLocale(unsigned long Country,
|
---|
352 | UniChar *LocaleName,
|
---|
353 | size_t n);
|
---|
354 | #ifndef _ULS_UCONVP
|
---|
355 | #define _ULS_UCONVP
|
---|
356 | typedef void * UconvObject;
|
---|
357 | #endif
|
---|
358 | #ifndef _ULS_UNICHAR_DEFINED
|
---|
359 | #define _ULS_UNICHAR_DEFINED
|
---|
360 | typedef unsigned short UniChar ;
|
---|
361 | #endif
|
---|
362 | #ifndef ULS_ATTR
|
---|
363 | #define ULS_ATTR
|
---|
364 | #define UCONV_OPTION_SUBSTITUTE_FROM_UNICODE 1
|
---|
365 | #define UCONV_OPTION_SUBSTITUTE_TO_UNICODE 2
|
---|
366 | #define UCONV_OPTION_SUBSTITUTE_BOTH 3
|
---|
367 | #define CVTTYPE_PATH 0x00000004 /* Treat string as a path */
|
---|
368 | #define CVTTYPE_CDRA 0x00000002 /* Use CDRA control mapping */
|
---|
369 | #define CVTTYPE_CTRL7F 0x00000001 /* Treat 0x7F as a control */
|
---|
370 | #define DSPMASK_DATA 0xffffffff
|
---|
371 | #define DSPMASK_DISPLAY 0x00000000
|
---|
372 | #define DSPMASK_TAB 0x00000200
|
---|
373 | #define DSPMASK_LF 0x00000400
|
---|
374 | #define DSPMASK_CR 0x00002000
|
---|
375 | #define DSPMASK_CRLF 0x00002400
|
---|
376 | enum uconv_esid {
|
---|
377 | ESID_sbcs_data = 0x2100,
|
---|
378 | ESID_sbcs_pc = 0x3100,
|
---|
379 | ESID_sbcs_ebcdic = 0x1100,
|
---|
380 | ESID_sbcs_iso = 0x4100,
|
---|
381 | ESID_sbcs_windows = 0x4105,
|
---|
382 | ESID_sbcs_alt = 0xF100,
|
---|
383 | ESID_dbcs_data = 0x2200,
|
---|
384 | ESID_dbcs_pc = 0x3200,
|
---|
385 | ESID_dbcs_ebcdic = 0x1200,
|
---|
386 | ESID_mbcs_data = 0x2300,
|
---|
387 | ESID_mbcs_pc = 0x3300,
|
---|
388 | ESID_mbcs_ebcdic = 0x1301,
|
---|
389 | ESID_ucs_2 = 0x7200,
|
---|
390 | ESID_ugl = 0x72FF,
|
---|
391 | ESID_utf_8 = 0x7807,
|
---|
392 | ESID_upf_8 = 0x78FF
|
---|
393 | };
|
---|
394 | #ifndef __conv_endian_t
|
---|
395 | #define __conv_endian_t
|
---|
396 | #define ENDIAN_SYSTEM 0x0000
|
---|
397 | #define ENDIAN_BIG 0xfeff
|
---|
398 | #define ENDIAN_LITTLE 0xfffe
|
---|
399 | typedef struct _conv_endian_rec {
|
---|
400 | unsigned short source;
|
---|
401 | unsigned short target;
|
---|
402 | } conv_endian_t;
|
---|
403 | #endif
|
---|
404 | typedef struct _uconv_attribute_t {
|
---|
405 | unsigned long version;
|
---|
406 | char mb_min_len;
|
---|
407 | char mb_max_len;
|
---|
408 | char usc_min_len;
|
---|
409 | char usc_max_len;
|
---|
410 | unsigned short esid;
|
---|
411 | char options;
|
---|
412 | char state;
|
---|
413 | conv_endian_t endian;
|
---|
414 | unsigned long displaymask;
|
---|
415 | unsigned long converttype;
|
---|
416 | unsigned short subchar_len;
|
---|
417 | unsigned short subuni_len;
|
---|
418 | char subchar[16];
|
---|
419 | UniChar subuni[8];
|
---|
420 | } uconv_attribute_t;
|
---|
421 | typedef struct {
|
---|
422 | unsigned short first;
|
---|
423 | unsigned short last;
|
---|
424 | } udcrange_t;
|
---|
425 | #endif
|
---|
426 | #define uconv_error_t int
|
---|
427 | int CALLCONV UniCreateUconvObject(
|
---|
428 | UniChar * code_set,
|
---|
429 | UconvObject * uobj );
|
---|
430 | int CALLCONV UniQueryUconvObject(
|
---|
431 | UconvObject uobj,
|
---|
432 | uconv_attribute_t * attr,
|
---|
433 | size_t size,
|
---|
434 | char first[256],
|
---|
435 | char other[256],
|
---|
436 | udcrange_t udcrange[32]);
|
---|
437 | int CALLCONV UniSetUconvObject(
|
---|
438 | UconvObject uobj,
|
---|
439 | uconv_attribute_t * attr);
|
---|
440 | int CALLCONV UniUconvToUcs(
|
---|
441 | UconvObject uobj,
|
---|
442 | void * * inbuf,
|
---|
443 | size_t * inbytes,
|
---|
444 | UniChar * * outbuf,
|
---|
445 | size_t * outchars,
|
---|
446 | size_t * subst );
|
---|
447 | int CALLCONV UniUconvFromUcs(
|
---|
448 | UconvObject uobj,
|
---|
449 | UniChar * * inbuf,
|
---|
450 | size_t * inchars,
|
---|
451 | void * * outbuf,
|
---|
452 | size_t * outbytes,
|
---|
453 | size_t * subst );
|
---|
454 | int CALLCONV UniFreeUconvObject(
|
---|
455 | UconvObject uobj );
|
---|
456 | int CALLCONV UniMapCpToUcsCp( unsigned long ulCodePage, UniChar *ucsCodePage, size_t n );
|
---|
457 | #define UCONV_EOTHER ULS_OTHER
|
---|
458 | #define UCONV_EILSEQ ULS_ILLEGALSEQUENCE
|
---|
459 | #define UCONV_EINVAL ULS_INVALID
|
---|
460 | #define UCONV_E2BIG ULS_BUFFERFULL
|
---|
461 | #define UCONV_ENOMEM ULS_NOMEMORY
|
---|
462 | #define UCONV_EBADF ULS_BADOBJECT
|
---|
463 | #define UCONV_BADATTR ULS_BADATTR
|
---|
464 | #define UCONV_EMFILE ULS_MAXFILESPERPROC
|
---|
465 | #define UCONV_ENFILE ULS_MAXFILES
|
---|
466 | #define UCONV_NOTIMPLEMENTED ULS_NOTIMPLEMENTED
|
---|
467 | #define IBM_437 (UniChar *)L"IBM-437"
|
---|
468 | #define IBM_819 (UniChar *)L"IBM-819"
|
---|
469 | #define IBM_850 (UniChar *)L"IBM-850"
|
---|
470 | #define UTF_8 (UniChar *)L"IBM-1208"
|
---|
471 | #define UCS_2 (UniChar *)L"IBM-1200"
|
---|
472 | #define ISO8859_1 (UniChar *)L"IBM-819"
|
---|
473 | #ifdef __cplusplus
|
---|
474 | }
|
---|
475 | #endif
|
---|
476 |
|
---|
477 | #ifdef __cplusplus
|
---|
478 |
|
---|
479 | //Wrappers for unicode api
|
---|
480 | #include <os2sel.h>
|
---|
481 |
|
---|
482 | inline int _UniCreateLocaleObject(int a, const void *b, LocaleObject *c)
|
---|
483 | {
|
---|
484 | int yyrc;
|
---|
485 | USHORT sel = RestoreOS2FS();
|
---|
486 |
|
---|
487 | yyrc = UniCreateLocaleObject(a, b, c);
|
---|
488 | SetFS(sel);
|
---|
489 |
|
---|
490 | return yyrc;
|
---|
491 | }
|
---|
492 |
|
---|
493 | #undef UniCreateLocaleObject
|
---|
494 | #define UniCreateLocaleObject _UniCreateLocaleObject
|
---|
495 |
|
---|
496 | inline int _UniQueryLocaleObject(const LocaleObject a, int b, int c, void **d)
|
---|
497 | {
|
---|
498 | int yyrc;
|
---|
499 | USHORT sel = RestoreOS2FS();
|
---|
500 |
|
---|
501 | yyrc = UniQueryLocaleObject(a, b, c, d);
|
---|
502 | SetFS(sel);
|
---|
503 |
|
---|
504 | return yyrc;
|
---|
505 | }
|
---|
506 |
|
---|
507 | #undef UniQueryLocaleObject
|
---|
508 | #define UniQueryLocaleObject _UniQueryLocaleObject
|
---|
509 |
|
---|
510 | inline int _UniFreeLocaleObject(LocaleObject a)
|
---|
511 | {
|
---|
512 | int yyrc;
|
---|
513 | USHORT sel = RestoreOS2FS();
|
---|
514 |
|
---|
515 | yyrc = UniFreeLocaleObject(a);
|
---|
516 | SetFS(sel);
|
---|
517 |
|
---|
518 | return yyrc;
|
---|
519 | }
|
---|
520 |
|
---|
521 | #undef UniFreeLocaleObject
|
---|
522 | #define UniFreeLocaleObject _UniFreeLocaleObject
|
---|
523 |
|
---|
524 | inline int _UniFreeMem(void *a)
|
---|
525 | {
|
---|
526 | int yyrc;
|
---|
527 | USHORT sel = RestoreOS2FS();
|
---|
528 |
|
---|
529 | yyrc = UniFreeMem(a);
|
---|
530 | SetFS(sel);
|
---|
531 |
|
---|
532 | return yyrc;
|
---|
533 | }
|
---|
534 |
|
---|
535 | #undef UniFreeMem
|
---|
536 | #define UniFreeMem _UniFreeMem
|
---|
537 |
|
---|
538 | inline int _UniLocaleStrToToken(int a, const void *b, LocaleToken *c)
|
---|
539 | {
|
---|
540 | int yyrc;
|
---|
541 | USHORT sel = RestoreOS2FS();
|
---|
542 |
|
---|
543 | yyrc = UniLocaleStrToToken(a, b, c);
|
---|
544 | SetFS(sel);
|
---|
545 |
|
---|
546 | return yyrc;
|
---|
547 | }
|
---|
548 |
|
---|
549 | #undef UniLocaleStrToToken
|
---|
550 | #define UniLocaleStrToToken _UniLocaleStrToToken
|
---|
551 |
|
---|
552 | inline int _UniLocaleTokenToStr(const LocaleToken a, int b, void **c)
|
---|
553 | {
|
---|
554 | int yyrc;
|
---|
555 | USHORT sel = RestoreOS2FS();
|
---|
556 |
|
---|
557 | yyrc = UniLocaleTokenToStr(a, b, c);
|
---|
558 | SetFS(sel);
|
---|
559 |
|
---|
560 | return yyrc;
|
---|
561 | }
|
---|
562 |
|
---|
563 | #undef UniLocaleTokenToStr
|
---|
564 | #define UniLocaleTokenToStr _UniLocaleTokenToStr
|
---|
565 |
|
---|
566 | inline int _UniQueryLocaleInfo(const LocaleObject a, UniLconv **b)
|
---|
567 | {
|
---|
568 | int yyrc;
|
---|
569 | USHORT sel = RestoreOS2FS();
|
---|
570 |
|
---|
571 | yyrc = UniQueryLocaleInfo(a, b);
|
---|
572 | SetFS(sel);
|
---|
573 |
|
---|
574 | return yyrc;
|
---|
575 | }
|
---|
576 |
|
---|
577 | #undef UniQueryLocaleInfo
|
---|
578 | #define UniQueryLocaleInfo _UniQueryLocaleInfo
|
---|
579 |
|
---|
580 | inline int _UniFreeLocaleInfo(struct UniLconv *a)
|
---|
581 | {
|
---|
582 | int yyrc;
|
---|
583 | USHORT sel = RestoreOS2FS();
|
---|
584 |
|
---|
585 | yyrc = UniFreeLocaleInfo(a);
|
---|
586 | SetFS(sel);
|
---|
587 |
|
---|
588 | return yyrc;
|
---|
589 | }
|
---|
590 |
|
---|
591 | #undef UniFreeLocaleInfo
|
---|
592 | #define UniFreeLocaleInfo _UniFreeLocaleInfo
|
---|
593 |
|
---|
594 | inline int _UniQueryLocaleItem(const LocaleObject a, LocaleItem b, UniChar **c)
|
---|
595 | {
|
---|
596 | int yyrc;
|
---|
597 | USHORT sel = RestoreOS2FS();
|
---|
598 |
|
---|
599 | yyrc = UniQueryLocaleItem(a, b, c);
|
---|
600 | SetFS(sel);
|
---|
601 |
|
---|
602 | return yyrc;
|
---|
603 | }
|
---|
604 |
|
---|
605 | #undef UniQueryLocaleItem
|
---|
606 | #define UniQueryLocaleItem _UniQueryLocaleItem
|
---|
607 |
|
---|
608 | inline size_t _UniStrftime(const LocaleObject a, UniChar *b, size_t c, const UniChar *d, const struct tm *e)
|
---|
609 | {
|
---|
610 | size_t yyrc;
|
---|
611 | USHORT sel = RestoreOS2FS();
|
---|
612 |
|
---|
613 | yyrc = UniStrftime(a, b, c, d, e);
|
---|
614 | SetFS(sel);
|
---|
615 |
|
---|
616 | return yyrc;
|
---|
617 | }
|
---|
618 |
|
---|
619 | #undef UniStrftime
|
---|
620 | #define UniStrftime _UniStrftime
|
---|
621 |
|
---|
622 | inline UniChar *_UniStrptime(const LocaleObject a, const UniChar *b, const UniChar *c, struct tm *d)
|
---|
623 | {
|
---|
624 | UniChar * yyrc;
|
---|
625 | USHORT sel = RestoreOS2FS();
|
---|
626 |
|
---|
627 | yyrc = UniStrptime(a, b, c, d);
|
---|
628 | SetFS(sel);
|
---|
629 |
|
---|
630 | return yyrc;
|
---|
631 | }
|
---|
632 |
|
---|
633 | #undef UniStrptime
|
---|
634 | #define UniStrptime _UniStrptime
|
---|
635 |
|
---|
636 | inline UniChar *_UniStrcat(UniChar *a, const UniChar *b)
|
---|
637 | {
|
---|
638 | UniChar * yyrc;
|
---|
639 | USHORT sel = RestoreOS2FS();
|
---|
640 |
|
---|
641 | yyrc = UniStrcat(a, b);
|
---|
642 | SetFS(sel);
|
---|
643 |
|
---|
644 | return yyrc;
|
---|
645 | }
|
---|
646 |
|
---|
647 | #undef UniStrcat
|
---|
648 | #define UniStrcat _UniStrcat
|
---|
649 |
|
---|
650 | inline UniChar *_UniStrchr(const UniChar *a, UniChar b)
|
---|
651 | {
|
---|
652 | UniChar * yyrc;
|
---|
653 | USHORT sel = RestoreOS2FS();
|
---|
654 |
|
---|
655 | yyrc = UniStrchr(a, b);
|
---|
656 | SetFS(sel);
|
---|
657 |
|
---|
658 | return yyrc;
|
---|
659 | }
|
---|
660 |
|
---|
661 | #undef UniStrchr
|
---|
662 | #define UniStrchr _UniStrchr
|
---|
663 |
|
---|
664 | inline int _UniStrcmp(const UniChar *a, const UniChar *b)
|
---|
665 | {
|
---|
666 | int yyrc;
|
---|
667 | USHORT sel = RestoreOS2FS();
|
---|
668 |
|
---|
669 | yyrc = UniStrcmp(a, b);
|
---|
670 | SetFS(sel);
|
---|
671 |
|
---|
672 | return yyrc;
|
---|
673 | }
|
---|
674 |
|
---|
675 | #undef UniStrcmp
|
---|
676 | #define UniStrcmp _UniStrcmp
|
---|
677 |
|
---|
678 | inline UniChar *_UniStrcpy(UniChar *a, const UniChar *b)
|
---|
679 | {
|
---|
680 | UniChar * yyrc;
|
---|
681 | USHORT sel = RestoreOS2FS();
|
---|
682 |
|
---|
683 | yyrc = UniStrcpy(a, b);
|
---|
684 | SetFS(sel);
|
---|
685 |
|
---|
686 | return yyrc;
|
---|
687 | }
|
---|
688 |
|
---|
689 | #undef UniStrcpy
|
---|
690 | #define UniStrcpy _UniStrcpy
|
---|
691 |
|
---|
692 | inline size_t _UniStrcspn(const UniChar *a, const UniChar *b)
|
---|
693 | {
|
---|
694 | size_t yyrc;
|
---|
695 | USHORT sel = RestoreOS2FS();
|
---|
696 |
|
---|
697 | yyrc = UniStrcspn(a, b);
|
---|
698 | SetFS(sel);
|
---|
699 |
|
---|
700 | return yyrc;
|
---|
701 | }
|
---|
702 |
|
---|
703 | #undef UniStrcspn
|
---|
704 | #define UniStrcspn _UniStrcspn
|
---|
705 |
|
---|
706 | inline size_t _UniStrlen(const UniChar *a)
|
---|
707 | {
|
---|
708 | size_t yyrc;
|
---|
709 | USHORT sel = RestoreOS2FS();
|
---|
710 |
|
---|
711 | yyrc = UniStrlen(a);
|
---|
712 | SetFS(sel);
|
---|
713 |
|
---|
714 | return yyrc;
|
---|
715 | }
|
---|
716 |
|
---|
717 | #undef UniStrlen
|
---|
718 | #define UniStrlen _UniStrlen
|
---|
719 |
|
---|
720 | inline UniChar *_UniStrncat(UniChar *a, const UniChar *b, size_t c)
|
---|
721 | {
|
---|
722 | UniChar * yyrc;
|
---|
723 | USHORT sel = RestoreOS2FS();
|
---|
724 |
|
---|
725 | yyrc = UniStrncat(a, b, c);
|
---|
726 | SetFS(sel);
|
---|
727 |
|
---|
728 | return yyrc;
|
---|
729 | }
|
---|
730 |
|
---|
731 | #undef UniStrncat
|
---|
732 | #define UniStrncat _UniStrncat
|
---|
733 |
|
---|
734 | inline int _UniStrncmp(const UniChar *a, const UniChar *b, size_t c)
|
---|
735 | {
|
---|
736 | int yyrc;
|
---|
737 | USHORT sel = RestoreOS2FS();
|
---|
738 |
|
---|
739 | yyrc = UniStrncmp(a, b, c);
|
---|
740 | SetFS(sel);
|
---|
741 |
|
---|
742 | return yyrc;
|
---|
743 | }
|
---|
744 |
|
---|
745 | #undef UniStrncmp
|
---|
746 | #define UniStrncmp _UniStrncmp
|
---|
747 |
|
---|
748 | inline UniChar *_UniStrncpy(UniChar *a, const UniChar *b, size_t c)
|
---|
749 | {
|
---|
750 | UniChar * yyrc;
|
---|
751 | USHORT sel = RestoreOS2FS();
|
---|
752 |
|
---|
753 | yyrc = UniStrncpy(a, b, c);
|
---|
754 | SetFS(sel);
|
---|
755 |
|
---|
756 | return yyrc;
|
---|
757 | }
|
---|
758 |
|
---|
759 | #undef UniStrncpy
|
---|
760 | #define UniStrncpy _UniStrncpy
|
---|
761 |
|
---|
762 | inline UniChar *_UniStrpbrk(const UniChar *a, const UniChar *b)
|
---|
763 | {
|
---|
764 | UniChar * yyrc;
|
---|
765 | USHORT sel = RestoreOS2FS();
|
---|
766 |
|
---|
767 | yyrc = UniStrpbrk(a, b);
|
---|
768 | SetFS(sel);
|
---|
769 |
|
---|
770 | return yyrc;
|
---|
771 | }
|
---|
772 |
|
---|
773 | #undef UniStrpbrk
|
---|
774 | #define UniStrpbrk _UniStrpbrk
|
---|
775 |
|
---|
776 | inline UniChar *_UniStrrchr(const UniChar *a, UniChar b)
|
---|
777 | {
|
---|
778 | UniChar * yyrc;
|
---|
779 | USHORT sel = RestoreOS2FS();
|
---|
780 |
|
---|
781 | yyrc = UniStrrchr(a, b);
|
---|
782 | SetFS(sel);
|
---|
783 |
|
---|
784 | return yyrc;
|
---|
785 | }
|
---|
786 |
|
---|
787 | #undef UniStrrchr
|
---|
788 | #define UniStrrchr _UniStrrchr
|
---|
789 |
|
---|
790 | inline size_t _UniStrspn(const UniChar *a, const UniChar *b)
|
---|
791 | {
|
---|
792 | size_t yyrc;
|
---|
793 | USHORT sel = RestoreOS2FS();
|
---|
794 |
|
---|
795 | yyrc = UniStrspn(a, b);
|
---|
796 | SetFS(sel);
|
---|
797 |
|
---|
798 | return yyrc;
|
---|
799 | }
|
---|
800 |
|
---|
801 | #undef UniStrspn
|
---|
802 | #define UniStrspn _UniStrspn
|
---|
803 |
|
---|
804 | inline UniChar *_UniStrstr(const UniChar *a, const UniChar *b)
|
---|
805 | {
|
---|
806 | UniChar * yyrc;
|
---|
807 | USHORT sel = RestoreOS2FS();
|
---|
808 |
|
---|
809 | yyrc = UniStrstr(a, b);
|
---|
810 | SetFS(sel);
|
---|
811 |
|
---|
812 | return yyrc;
|
---|
813 | }
|
---|
814 |
|
---|
815 | #undef UniStrstr
|
---|
816 | #define UniStrstr _UniStrstr
|
---|
817 |
|
---|
818 | inline UniChar *_UniStrtok(UniChar *a, const UniChar *b)
|
---|
819 | {
|
---|
820 | UniChar * yyrc;
|
---|
821 | USHORT sel = RestoreOS2FS();
|
---|
822 |
|
---|
823 | yyrc = UniStrtok(a, b);
|
---|
824 | SetFS(sel);
|
---|
825 |
|
---|
826 | return yyrc;
|
---|
827 | }
|
---|
828 |
|
---|
829 | #undef UniStrtok
|
---|
830 | #define UniStrtok _UniStrtok
|
---|
831 |
|
---|
832 | inline int _UniCreateAttrObject(const LocaleObject a, const UniChar *b, AttrObject *c)
|
---|
833 | {
|
---|
834 | int yyrc;
|
---|
835 | USHORT sel = RestoreOS2FS();
|
---|
836 |
|
---|
837 | yyrc = UniCreateAttrObject(a, b, c);
|
---|
838 | SetFS(sel);
|
---|
839 |
|
---|
840 | return yyrc;
|
---|
841 | }
|
---|
842 |
|
---|
843 | #undef UniCreateAttrObject
|
---|
844 | #define UniCreateAttrObject _UniCreateAttrObject
|
---|
845 |
|
---|
846 | inline int _UniQueryCharAttr(AttrObject a, UniChar b)
|
---|
847 | {
|
---|
848 | int yyrc;
|
---|
849 | USHORT sel = RestoreOS2FS();
|
---|
850 |
|
---|
851 | yyrc = UniQueryCharAttr(a, b);
|
---|
852 | SetFS(sel);
|
---|
853 |
|
---|
854 | return yyrc;
|
---|
855 | }
|
---|
856 |
|
---|
857 | #undef UniQueryCharAttr
|
---|
858 | #define UniQueryCharAttr _UniQueryCharAttr
|
---|
859 |
|
---|
860 | inline int _UniScanForAttr(AttrObject a, const UniChar *b, size_t c, ulsBool d, size_t *e)
|
---|
861 | {
|
---|
862 | int yyrc;
|
---|
863 | USHORT sel = RestoreOS2FS();
|
---|
864 |
|
---|
865 | yyrc = UniScanForAttr(a, b, c, d, e);
|
---|
866 | SetFS(sel);
|
---|
867 |
|
---|
868 | return yyrc;
|
---|
869 | }
|
---|
870 |
|
---|
871 | #undef UniScanForAttr
|
---|
872 | #define UniScanForAttr _UniScanForAttr
|
---|
873 |
|
---|
874 | inline int _UniFreeAttrObject(AttrObject a)
|
---|
875 | {
|
---|
876 | int yyrc;
|
---|
877 | USHORT sel = RestoreOS2FS();
|
---|
878 |
|
---|
879 | yyrc = UniFreeAttrObject(a);
|
---|
880 | SetFS(sel);
|
---|
881 |
|
---|
882 | return yyrc;
|
---|
883 | }
|
---|
884 |
|
---|
885 | #undef UniFreeAttrObject
|
---|
886 | #define UniFreeAttrObject _UniFreeAttrObject
|
---|
887 |
|
---|
888 | inline int _UniQueryAlnum(const LocaleObject a, UniChar b)
|
---|
889 | {
|
---|
890 | int yyrc;
|
---|
891 | USHORT sel = RestoreOS2FS();
|
---|
892 |
|
---|
893 | yyrc = UniQueryAlnum(a, b);
|
---|
894 | SetFS(sel);
|
---|
895 |
|
---|
896 | return yyrc;
|
---|
897 | }
|
---|
898 |
|
---|
899 | #undef UniQueryAlnum
|
---|
900 | #define UniQueryAlnum _UniQueryAlnum
|
---|
901 |
|
---|
902 | inline int _UniQueryAlpha(const LocaleObject a, UniChar b)
|
---|
903 | {
|
---|
904 | int yyrc;
|
---|
905 | USHORT sel = RestoreOS2FS();
|
---|
906 |
|
---|
907 | yyrc = UniQueryAlpha(a, b);
|
---|
908 | SetFS(sel);
|
---|
909 |
|
---|
910 | return yyrc;
|
---|
911 | }
|
---|
912 |
|
---|
913 | #undef UniQueryAlpha
|
---|
914 | #define UniQueryAlpha _UniQueryAlpha
|
---|
915 |
|
---|
916 | inline int _UniQueryBlank(const LocaleObject a, UniChar b)
|
---|
917 | {
|
---|
918 | int yyrc;
|
---|
919 | USHORT sel = RestoreOS2FS();
|
---|
920 |
|
---|
921 | yyrc = UniQueryBlank(a, b);
|
---|
922 | SetFS(sel);
|
---|
923 |
|
---|
924 | return yyrc;
|
---|
925 | }
|
---|
926 |
|
---|
927 | #undef UniQueryBlank
|
---|
928 | #define UniQueryBlank _UniQueryBlank
|
---|
929 |
|
---|
930 | inline int _UniQueryCntrl(const LocaleObject a, UniChar b)
|
---|
931 | {
|
---|
932 | int yyrc;
|
---|
933 | USHORT sel = RestoreOS2FS();
|
---|
934 |
|
---|
935 | yyrc = UniQueryCntrl(a, b);
|
---|
936 | SetFS(sel);
|
---|
937 |
|
---|
938 | return yyrc;
|
---|
939 | }
|
---|
940 |
|
---|
941 | #undef UniQueryCntrl
|
---|
942 | #define UniQueryCntrl _UniQueryCntrl
|
---|
943 |
|
---|
944 | inline int _UniQueryDigit(const LocaleObject a, UniChar b)
|
---|
945 | {
|
---|
946 | int yyrc;
|
---|
947 | USHORT sel = RestoreOS2FS();
|
---|
948 |
|
---|
949 | yyrc = UniQueryDigit(a, b);
|
---|
950 | SetFS(sel);
|
---|
951 |
|
---|
952 | return yyrc;
|
---|
953 | }
|
---|
954 |
|
---|
955 | #undef UniQueryDigit
|
---|
956 | #define UniQueryDigit _UniQueryDigit
|
---|
957 |
|
---|
958 | inline int _UniQueryGraph(const LocaleObject a, UniChar b)
|
---|
959 | {
|
---|
960 | int yyrc;
|
---|
961 | USHORT sel = RestoreOS2FS();
|
---|
962 |
|
---|
963 | yyrc = UniQueryGraph(a, b);
|
---|
964 | SetFS(sel);
|
---|
965 |
|
---|
966 | return yyrc;
|
---|
967 | }
|
---|
968 |
|
---|
969 | #undef UniQueryGraph
|
---|
970 | #define UniQueryGraph _UniQueryGraph
|
---|
971 |
|
---|
972 | inline int _UniQueryLower(const LocaleObject a, UniChar b)
|
---|
973 | {
|
---|
974 | int yyrc;
|
---|
975 | USHORT sel = RestoreOS2FS();
|
---|
976 |
|
---|
977 | yyrc = UniQueryLower(a, b);
|
---|
978 | SetFS(sel);
|
---|
979 |
|
---|
980 | return yyrc;
|
---|
981 | }
|
---|
982 |
|
---|
983 | #undef UniQueryLower
|
---|
984 | #define UniQueryLower _UniQueryLower
|
---|
985 |
|
---|
986 | inline int _UniQueryPrint(const LocaleObject a, UniChar b)
|
---|
987 | {
|
---|
988 | int yyrc;
|
---|
989 | USHORT sel = RestoreOS2FS();
|
---|
990 |
|
---|
991 | yyrc = UniQueryPrint(a, b);
|
---|
992 | SetFS(sel);
|
---|
993 |
|
---|
994 | return yyrc;
|
---|
995 | }
|
---|
996 |
|
---|
997 | #undef UniQueryPrint
|
---|
998 | #define UniQueryPrint _UniQueryPrint
|
---|
999 |
|
---|
1000 | inline int _UniQueryPunct(const LocaleObject a, UniChar b)
|
---|
1001 | {
|
---|
1002 | int yyrc;
|
---|
1003 | USHORT sel = RestoreOS2FS();
|
---|
1004 |
|
---|
1005 | yyrc = UniQueryPunct(a, b);
|
---|
1006 | SetFS(sel);
|
---|
1007 |
|
---|
1008 | return yyrc;
|
---|
1009 | }
|
---|
1010 |
|
---|
1011 | #undef UniQueryPunct
|
---|
1012 | #define UniQueryPunct _UniQueryPunct
|
---|
1013 |
|
---|
1014 | inline int _UniQuerySpace(const LocaleObject a, UniChar b)
|
---|
1015 | {
|
---|
1016 | int yyrc;
|
---|
1017 | USHORT sel = RestoreOS2FS();
|
---|
1018 |
|
---|
1019 | yyrc = UniQuerySpace(a, b);
|
---|
1020 | SetFS(sel);
|
---|
1021 |
|
---|
1022 | return yyrc;
|
---|
1023 | }
|
---|
1024 |
|
---|
1025 | #undef UniQuerySpace
|
---|
1026 | #define UniQuerySpace _UniQuerySpace
|
---|
1027 |
|
---|
1028 | inline int _UniQueryUpper(const LocaleObject a, UniChar b)
|
---|
1029 | {
|
---|
1030 | int yyrc;
|
---|
1031 | USHORT sel = RestoreOS2FS();
|
---|
1032 |
|
---|
1033 | yyrc = UniQueryUpper(a, b);
|
---|
1034 | SetFS(sel);
|
---|
1035 |
|
---|
1036 | return yyrc;
|
---|
1037 | }
|
---|
1038 |
|
---|
1039 | #undef UniQueryUpper
|
---|
1040 | #define UniQueryUpper _UniQueryUpper
|
---|
1041 |
|
---|
1042 | inline int _UniQueryXdigit(const LocaleObject a, UniChar b)
|
---|
1043 | {
|
---|
1044 | int yyrc;
|
---|
1045 | USHORT sel = RestoreOS2FS();
|
---|
1046 |
|
---|
1047 | yyrc = UniQueryXdigit(a, b);
|
---|
1048 | SetFS(sel);
|
---|
1049 |
|
---|
1050 | return yyrc;
|
---|
1051 | }
|
---|
1052 |
|
---|
1053 | #undef UniQueryXdigit
|
---|
1054 | #define UniQueryXdigit _UniQueryXdigit
|
---|
1055 |
|
---|
1056 | inline int _UniCreateTransformObject(const LocaleObject a, const UniChar *b, XformObject *c)
|
---|
1057 | {
|
---|
1058 | int yyrc;
|
---|
1059 | USHORT sel = RestoreOS2FS();
|
---|
1060 |
|
---|
1061 | yyrc = UniCreateTransformObject(a, b, c);
|
---|
1062 | SetFS(sel);
|
---|
1063 |
|
---|
1064 | return yyrc;
|
---|
1065 | }
|
---|
1066 |
|
---|
1067 | #undef UniCreateTransformObject
|
---|
1068 | #define UniCreateTransformObject _UniCreateTransformObject
|
---|
1069 |
|
---|
1070 | inline int _UniTransformStr(XformObject a, const UniChar *b, int *c, UniChar *d, int *e)
|
---|
1071 | {
|
---|
1072 | int yyrc;
|
---|
1073 | USHORT sel = RestoreOS2FS();
|
---|
1074 |
|
---|
1075 | yyrc = UniTransformStr(a, b, c, d, e);
|
---|
1076 | SetFS(sel);
|
---|
1077 |
|
---|
1078 | return yyrc;
|
---|
1079 | }
|
---|
1080 |
|
---|
1081 | #undef UniTransformStr
|
---|
1082 | #define UniTransformStr _UniTransformStr
|
---|
1083 |
|
---|
1084 | inline int _UniFreeTransformObject(XformObject a)
|
---|
1085 | {
|
---|
1086 | int yyrc;
|
---|
1087 | USHORT sel = RestoreOS2FS();
|
---|
1088 |
|
---|
1089 | yyrc = UniFreeTransformObject(a);
|
---|
1090 | SetFS(sel);
|
---|
1091 |
|
---|
1092 | return yyrc;
|
---|
1093 | }
|
---|
1094 |
|
---|
1095 | #undef UniFreeTransformObject
|
---|
1096 | #define UniFreeTransformObject _UniFreeTransformObject
|
---|
1097 |
|
---|
1098 | inline UniChar _UniTransLower(const LocaleObject a, UniChar b)
|
---|
1099 | {
|
---|
1100 | UniChar yyrc;
|
---|
1101 | USHORT sel = RestoreOS2FS();
|
---|
1102 |
|
---|
1103 | yyrc = UniTransLower(a, b);
|
---|
1104 | SetFS(sel);
|
---|
1105 |
|
---|
1106 | return yyrc;
|
---|
1107 | }
|
---|
1108 |
|
---|
1109 | #undef UniTransLower
|
---|
1110 | #define UniTransLower _UniTransLower
|
---|
1111 |
|
---|
1112 | inline UniChar _UniTransUpper(const LocaleObject a, UniChar b)
|
---|
1113 | {
|
---|
1114 | UniChar yyrc;
|
---|
1115 | USHORT sel = RestoreOS2FS();
|
---|
1116 |
|
---|
1117 | yyrc = UniTransUpper(a, b);
|
---|
1118 | SetFS(sel);
|
---|
1119 |
|
---|
1120 | return yyrc;
|
---|
1121 | }
|
---|
1122 |
|
---|
1123 | #undef UniTransUpper
|
---|
1124 | #define UniTransUpper _UniTransUpper
|
---|
1125 |
|
---|
1126 | inline int _UniStrtod(const LocaleObject a, const UniChar *b, UniChar **c, double *d)
|
---|
1127 | {
|
---|
1128 | int yyrc;
|
---|
1129 | USHORT sel = RestoreOS2FS();
|
---|
1130 |
|
---|
1131 | yyrc = UniStrtod(a, b, c, d);
|
---|
1132 | SetFS(sel);
|
---|
1133 |
|
---|
1134 | return yyrc;
|
---|
1135 | }
|
---|
1136 |
|
---|
1137 | #undef UniStrtod
|
---|
1138 | #define UniStrtod _UniStrtod
|
---|
1139 |
|
---|
1140 | inline int _UniStrtol(const LocaleObject a, const UniChar *b, UniChar **c, int d, long *e)
|
---|
1141 | {
|
---|
1142 | int yyrc;
|
---|
1143 | USHORT sel = RestoreOS2FS();
|
---|
1144 |
|
---|
1145 | yyrc = UniStrtol(a, b, c, d, e);
|
---|
1146 | SetFS(sel);
|
---|
1147 |
|
---|
1148 | return yyrc;
|
---|
1149 | }
|
---|
1150 |
|
---|
1151 | #undef UniStrtol
|
---|
1152 | #define UniStrtol _UniStrtol
|
---|
1153 |
|
---|
1154 | inline int _UniStrtoul(const LocaleObject a, const UniChar *b, UniChar **c, int d, unsigned long *e)
|
---|
1155 | {
|
---|
1156 | int yyrc;
|
---|
1157 | USHORT sel = RestoreOS2FS();
|
---|
1158 |
|
---|
1159 | yyrc = UniStrtoul(a, b, c, d, e);
|
---|
1160 | SetFS(sel);
|
---|
1161 |
|
---|
1162 | return yyrc;
|
---|
1163 | }
|
---|
1164 |
|
---|
1165 | #undef UniStrtoul
|
---|
1166 | #define UniStrtoul _UniStrtoul
|
---|
1167 |
|
---|
1168 | inline int _UniStrcoll(const LocaleObject a, const UniChar *b, const UniChar *c)
|
---|
1169 | {
|
---|
1170 | int yyrc;
|
---|
1171 | USHORT sel = RestoreOS2FS();
|
---|
1172 |
|
---|
1173 | yyrc = UniStrcoll(a, b, c);
|
---|
1174 | SetFS(sel);
|
---|
1175 |
|
---|
1176 | return yyrc;
|
---|
1177 | }
|
---|
1178 |
|
---|
1179 | #undef UniStrcoll
|
---|
1180 | #define UniStrcoll _UniStrcoll
|
---|
1181 |
|
---|
1182 | inline size_t _UniStrxfrm(const LocaleObject a, UniChar *b, const UniChar *c, size_t d)
|
---|
1183 | {
|
---|
1184 | size_t yyrc;
|
---|
1185 | USHORT sel = RestoreOS2FS();
|
---|
1186 |
|
---|
1187 | yyrc = UniStrxfrm(a, b, c, d);
|
---|
1188 | SetFS(sel);
|
---|
1189 |
|
---|
1190 | return yyrc;
|
---|
1191 | }
|
---|
1192 |
|
---|
1193 | #undef UniStrxfrm
|
---|
1194 | #define UniStrxfrm _UniStrxfrm
|
---|
1195 |
|
---|
1196 | inline int _UniStrcmpi(const LocaleObject a, const UniChar *b, const UniChar *c)
|
---|
1197 | {
|
---|
1198 | int yyrc;
|
---|
1199 | USHORT sel = RestoreOS2FS();
|
---|
1200 |
|
---|
1201 | yyrc = UniStrcmpi(a, b, c);
|
---|
1202 | SetFS(sel);
|
---|
1203 |
|
---|
1204 | return yyrc;
|
---|
1205 | }
|
---|
1206 |
|
---|
1207 | #undef UniStrcmpi
|
---|
1208 | #define UniStrcmpi _UniStrcmpi
|
---|
1209 |
|
---|
1210 | inline int _UniStrncmpi(const LocaleObject a, const UniChar *b, const UniChar *c, const size_t d)
|
---|
1211 | {
|
---|
1212 | int yyrc;
|
---|
1213 | USHORT sel = RestoreOS2FS();
|
---|
1214 |
|
---|
1215 | yyrc = UniStrncmpi(a, b, c, d);
|
---|
1216 | SetFS(sel);
|
---|
1217 |
|
---|
1218 | return yyrc;
|
---|
1219 | }
|
---|
1220 |
|
---|
1221 | #undef UniStrncmpi
|
---|
1222 | #define UniStrncmpi _UniStrncmpi
|
---|
1223 |
|
---|
1224 | inline UniChar _UniToupper(UniChar a)
|
---|
1225 | {
|
---|
1226 | UniChar yyrc;
|
---|
1227 | USHORT sel = RestoreOS2FS();
|
---|
1228 |
|
---|
1229 | yyrc = UniToupper(a);
|
---|
1230 | SetFS(sel);
|
---|
1231 |
|
---|
1232 | return yyrc;
|
---|
1233 | }
|
---|
1234 |
|
---|
1235 | #undef UniToupper
|
---|
1236 | #define UniToupper _UniToupper
|
---|
1237 |
|
---|
1238 | inline UniChar _UniTolower(UniChar a)
|
---|
1239 | {
|
---|
1240 | UniChar yyrc;
|
---|
1241 | USHORT sel = RestoreOS2FS();
|
---|
1242 |
|
---|
1243 | yyrc = UniTolower(a);
|
---|
1244 | SetFS(sel);
|
---|
1245 |
|
---|
1246 | return yyrc;
|
---|
1247 | }
|
---|
1248 |
|
---|
1249 | #undef UniTolower
|
---|
1250 | #define UniTolower _UniTolower
|
---|
1251 |
|
---|
1252 | inline UniChar *_UniStrupr(UniChar *a)
|
---|
1253 | {
|
---|
1254 | UniChar * yyrc;
|
---|
1255 | USHORT sel = RestoreOS2FS();
|
---|
1256 |
|
---|
1257 | yyrc = UniStrupr(a);
|
---|
1258 | SetFS(sel);
|
---|
1259 |
|
---|
1260 | return yyrc;
|
---|
1261 | }
|
---|
1262 |
|
---|
1263 | #undef UniStrupr
|
---|
1264 | #define UniStrupr _UniStrupr
|
---|
1265 |
|
---|
1266 | inline UniChar *_UniStrlwr(UniChar *a)
|
---|
1267 | {
|
---|
1268 | UniChar * yyrc;
|
---|
1269 | USHORT sel = RestoreOS2FS();
|
---|
1270 |
|
---|
1271 | yyrc = UniStrlwr(a);
|
---|
1272 | SetFS(sel);
|
---|
1273 |
|
---|
1274 | return yyrc;
|
---|
1275 | }
|
---|
1276 |
|
---|
1277 | #undef UniStrlwr
|
---|
1278 | #define UniStrlwr _UniStrlwr
|
---|
1279 |
|
---|
1280 | inline int _UniMapCtryToLocale(long a, UniChar *b, size_t c)
|
---|
1281 | {
|
---|
1282 | int yyrc;
|
---|
1283 | USHORT sel = RestoreOS2FS();
|
---|
1284 |
|
---|
1285 | yyrc = UniMapCtryToLocale(a, b, c);
|
---|
1286 | SetFS(sel);
|
---|
1287 |
|
---|
1288 | return yyrc;
|
---|
1289 | }
|
---|
1290 |
|
---|
1291 | #undef UniMapCtryToLocale
|
---|
1292 | #define UniMapCtryToLocale _UniMapCtryToLocale
|
---|
1293 |
|
---|
1294 | inline int _UniCreateUconvObject(UniChar *a, UconvObject *b)
|
---|
1295 | {
|
---|
1296 | int yyrc;
|
---|
1297 | USHORT sel = RestoreOS2FS();
|
---|
1298 |
|
---|
1299 | yyrc = UniCreateUconvObject(a, b);
|
---|
1300 | SetFS(sel);
|
---|
1301 |
|
---|
1302 | return yyrc;
|
---|
1303 | }
|
---|
1304 |
|
---|
1305 | #undef UniCreateUconvObject
|
---|
1306 | #define UniCreateUconvObject _UniCreateUconvObject
|
---|
1307 |
|
---|
1308 | inline int _UniQueryUconvObject(UconvObject a, uconv_attribute_t *b, size_t c, char d[256], char e[256], udcrange_t f[32])
|
---|
1309 | {
|
---|
1310 | int yyrc;
|
---|
1311 | USHORT sel = RestoreOS2FS();
|
---|
1312 |
|
---|
1313 | yyrc = UniQueryUconvObject(a, b, c, d, e, f);
|
---|
1314 | SetFS(sel);
|
---|
1315 |
|
---|
1316 | return yyrc;
|
---|
1317 | }
|
---|
1318 |
|
---|
1319 | #undef UniQueryUconvObject
|
---|
1320 | #define UniQueryUconvObject _UniQueryUconvObject
|
---|
1321 |
|
---|
1322 | inline int _UniSetUconvObject(UconvObject a, uconv_attribute_t *b)
|
---|
1323 | {
|
---|
1324 | int yyrc;
|
---|
1325 | USHORT sel = RestoreOS2FS();
|
---|
1326 |
|
---|
1327 | yyrc = UniSetUconvObject(a, b);
|
---|
1328 | SetFS(sel);
|
---|
1329 |
|
---|
1330 | return yyrc;
|
---|
1331 | }
|
---|
1332 |
|
---|
1333 | #undef UniSetUconvObject
|
---|
1334 | #define UniSetUconvObject _UniSetUconvObject
|
---|
1335 |
|
---|
1336 | inline int _UniUconvToUcs(UconvObject a, void **b, size_t *c, UniChar **d, size_t *e, size_t *f)
|
---|
1337 | {
|
---|
1338 | int yyrc;
|
---|
1339 | USHORT sel = RestoreOS2FS();
|
---|
1340 |
|
---|
1341 | yyrc = UniUconvToUcs(a, b, c, d, e, f);
|
---|
1342 | SetFS(sel);
|
---|
1343 |
|
---|
1344 | return yyrc;
|
---|
1345 | }
|
---|
1346 |
|
---|
1347 | #undef UniUconvToUcs
|
---|
1348 | #define UniUconvToUcs _UniUconvToUcs
|
---|
1349 |
|
---|
1350 | inline int _UniUconvFromUcs(UconvObject a, UniChar **b, size_t *c, void **d, size_t *e, size_t *f)
|
---|
1351 | {
|
---|
1352 | int yyrc;
|
---|
1353 | USHORT sel = RestoreOS2FS();
|
---|
1354 |
|
---|
1355 | yyrc = UniUconvFromUcs(a, b, c, d, e, f);
|
---|
1356 | SetFS(sel);
|
---|
1357 |
|
---|
1358 | return yyrc;
|
---|
1359 | }
|
---|
1360 |
|
---|
1361 | #undef UniUconvFromUcs
|
---|
1362 | #define UniUconvFromUcs _UniUconvFromUcs
|
---|
1363 |
|
---|
1364 | inline int _UniFreeUconvObject(UconvObject a)
|
---|
1365 | {
|
---|
1366 | int yyrc;
|
---|
1367 | USHORT sel = RestoreOS2FS();
|
---|
1368 |
|
---|
1369 | yyrc = UniFreeUconvObject(a);
|
---|
1370 | SetFS(sel);
|
---|
1371 |
|
---|
1372 | return yyrc;
|
---|
1373 | }
|
---|
1374 |
|
---|
1375 | #undef UniFreeUconvObject
|
---|
1376 | #define UniFreeUconvObject _UniFreeUconvObject
|
---|
1377 | #endif //__cplusplus
|
---|
1378 |
|
---|
1379 | #endif
|
---|