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