| OLD | NEW |
| 1 /* | 1 /* |
| 2 ****************************************************************************** | 2 ****************************************************************************** |
| 3 * | 3 * |
| 4 * Copyright (C) 2003-2007, International Business Machines | 4 * Copyright (C) 2003-2007, International Business Machines |
| 5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
| 6 * | 6 * |
| 7 ****************************************************************************** | 7 ****************************************************************************** |
| 8 * file name: ucnv_ext.h | 8 * file name: ucnv_ext.h |
| 9 * encoding: US-ASCII | 9 * encoding: US-ASCII |
| 10 * tab size: 8 (not used) | 10 * tab size: 8 (not used) |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 U_CFUNC int32_t | 375 U_CFUNC int32_t |
| 376 ucnv_extSimpleMatchFromU(const int32_t *cx, | 376 ucnv_extSimpleMatchFromU(const int32_t *cx, |
| 377 UChar32 cp, uint32_t *pValue, | 377 UChar32 cp, uint32_t *pValue, |
| 378 UBool useFallback); | 378 UBool useFallback); |
| 379 | 379 |
| 380 U_CFUNC void | 380 U_CFUNC void |
| 381 ucnv_extContinueMatchFromU(UConverter *cnv, | 381 ucnv_extContinueMatchFromU(UConverter *cnv, |
| 382 UConverterFromUnicodeArgs *pArgs, int32_t srcIndex, | 382 UConverterFromUnicodeArgs *pArgs, int32_t srcIndex, |
| 383 UErrorCode *pErrorCode); | 383 UErrorCode *pErrorCode); |
| 384 | 384 |
| 385 /* |
| 386 * Add code points and strings to the set according to the extension mappings. |
| 387 * Limitation on the UConverterSetFilter: |
| 388 * The filters currently assume that they are used with 1:1 mappings. |
| 389 * They only apply to single input code points, and then they pass through |
| 390 * only mappings with single-charset-code results. |
| 391 * For example, the Shift-JIS filter only works for 2-byte results and tests |
| 392 * that those 2 bytes are in the JIS X 0208 range of Shift-JIS. |
| 393 */ |
| 385 U_CFUNC void | 394 U_CFUNC void |
| 386 ucnv_extGetUnicodeSet(const UConverterSharedData *sharedData, | 395 ucnv_extGetUnicodeSet(const UConverterSharedData *sharedData, |
| 387 const USetAdder *sa, | 396 const USetAdder *sa, |
| 388 UConverterUnicodeSet which, | 397 UConverterUnicodeSet which, |
| 398 UConverterSetFilter filter, |
| 389 UErrorCode *pErrorCode); | 399 UErrorCode *pErrorCode); |
| 390 | 400 |
| 391 /* toUnicode helpers -------------------------------------------------------- */ | 401 /* toUnicode helpers -------------------------------------------------------- */ |
| 392 | 402 |
| 393 #define UCNV_EXT_TO_U_BYTE_SHIFT 24 | 403 #define UCNV_EXT_TO_U_BYTE_SHIFT 24 |
| 394 #define UCNV_EXT_TO_U_VALUE_MASK 0xffffff | 404 #define UCNV_EXT_TO_U_VALUE_MASK 0xffffff |
| 395 #define UCNV_EXT_TO_U_MIN_CODE_POINT 0x1f0000 | 405 #define UCNV_EXT_TO_U_MIN_CODE_POINT 0x1f0000 |
| 396 #define UCNV_EXT_TO_U_MAX_CODE_POINT 0x2fffff | 406 #define UCNV_EXT_TO_U_MAX_CODE_POINT 0x2fffff |
| 397 #define UCNV_EXT_TO_U_ROUNDTRIP_FLAG ((uint32_t)1<<23) | 407 #define UCNV_EXT_TO_U_ROUNDTRIP_FLAG ((uint32_t)1<<23) |
| 398 #define UCNV_EXT_TO_U_INDEX_MASK 0x3ffff | 408 #define UCNV_EXT_TO_U_INDEX_MASK 0x3ffff |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 | 464 |
| 455 /* get length; masks away all other bits */ | 465 /* get length; masks away all other bits */ |
| 456 #define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LE
NGTH_SHIFT)&UCNV_EXT_MAX_BYTES) | 466 #define UCNV_EXT_FROM_U_GET_LENGTH(value) (int32_t)(((value)>>UCNV_EXT_FROM_U_LE
NGTH_SHIFT)&UCNV_EXT_MAX_BYTES) |
| 457 | 467 |
| 458 /* get bytes or bytes index */ | 468 /* get bytes or bytes index */ |
| 459 #define UCNV_EXT_FROM_U_GET_DATA(value) ((value)&UCNV_EXT_FROM_U_DATA_MASK) | 469 #define UCNV_EXT_FROM_U_GET_DATA(value) ((value)&UCNV_EXT_FROM_U_DATA_MASK) |
| 460 | 470 |
| 461 #endif | 471 #endif |
| 462 | 472 |
| 463 #endif | 473 #endif |
| OLD | NEW |