Lines Matching refs:mbcs
121 * These contain the base table name between the MBCS header and the extension
139 * For more details about old versions of the MBCS data structure, see
288 * MBCS version 2 added:
357 * MBCS version 2 added:
660 * Internal function enumerating the toUnicode data of an MBCS converter.
726 mbcsTable=&sharedData->mbcs;
924 sharedData->mbcs.outputType==MBCS_OUTPUT_DBCS_ONLY ?
972 if( (cx=sharedData->mbcs.extIndexes)!=NULL &&
1037 if( (cx=sharedData->mbcs.extIndexes)!=NULL &&
1128 mbcsTable=&sharedData->mbcs;
1408 /* MBCS setup functions ----------------------------------------------------- */
1416 UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
1485 baseSharedData->mbcs.baseSharedData!=NULL
1503 uprv_memcpy(mbcsTable, &baseSharedData->mbcs, sizeof(UConverterMBCSTable));
1534 if(baseSharedData->mbcs.outputType==MBCS_OUTPUT_2_SISO) {
1651 * Check for the header version, SBCS vs. MBCS, and for whether the
1680 * MBCS: Stage 3 is allocated in 64-entry blocks for U+0000..MBCS_FAST_MAX or higher.
1737 UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
1766 mbcsTable=&cnv->sharedData->mbcs;
1846 if((cnv->options&UCNV_OPTION_SWAP_LFNL)!=0 && cnv->sharedData->mbcs.swapLFNLName!=NULL) {
1847 return cnv->sharedData->mbcs.swapLFNLName;
1853 /* MBCS-to-Unicode conversion functions ------------------------------------- */
1910 stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable;
1912 stateTable=cnv->sharedData->mbcs.stateTable;
2061 stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable;
2063 stateTable=cnv->sharedData->mbcs.stateTable;
2354 if(cnv->sharedData->mbcs.countStates==1) {
2355 if(!(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
2371 stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable;
2373 stateTable=cnv->sharedData->mbcs.stateTable;
2375 unicodeCodeUnits=cnv->sharedData->mbcs.unicodeCodeUnits;
2384 * then load the DBCS state from the MBCS data
2388 state=cnv->sharedData->mbcs.dbcsOnlyState;
2542 if(UCNV_TO_U_USE_FALLBACK(cnv) && (entry=(int32_t)ucnv_MBCSGetFallback(&cnv->sharedData->mbcs, offset))!=0xfffe) {
2636 if(cnv->sharedData->mbcs.dbcsOnlyState==0) {
2678 UBool isDBCSOnly=(UBool)(cnv->sharedData->mbcs.dbcsOnlyState!=0);
2748 stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable;
2750 stateTable=cnv->sharedData->mbcs.stateTable;
2842 if(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SURROGATES) {
2849 } else if(cnv->sharedData->mbcs.countStates==1) {
2858 stateTable=(const int32_t (*)[256])cnv->sharedData->mbcs.swapLFNLStateTable;
2860 stateTable=cnv->sharedData->mbcs.stateTable;
2862 unicodeCodeUnits=cnv->sharedData->mbcs.unicodeCodeUnits;
2869 * then load the DBCS state from the MBCS data
2873 state=cnv->sharedData->mbcs.dbcsOnlyState;
2918 if(UCNV_TO_U_USE_FALLBACK(cnv) && (c=ucnv_MBCSGetFallback(&cnv->sharedData->mbcs, offset))!=0xfffe) {
2957 if(cnv->sharedData->mbcs.dbcsOnlyState!=0) {
3015 UBool isDBCSOnly=(UBool)(cnv->sharedData->mbcs.dbcsOnlyState!=0);
3063 entry=sharedData->mbcs.stateTable[0][b];
3137 * conversions, i.e., that sharedData->mbcs.countStates==1 is still true.
3141 if(sharedData->mbcs.countStates==1) {
3151 stateTable=sharedData->mbcs.stateTable;
3152 unicodeCodeUnits=sharedData->mbcs.unicodeCodeUnits;
3156 state=sharedData->mbcs.dbcsOnlyState;
3180 c=ucnv_MBCSGetFallback(&sharedData->mbcs, offset);
3245 const int32_t *cx=sharedData->mbcs.extIndexes;
3254 /* MBCS-from-Unicode conversion functions ----------------------------------- */
3281 unicodeMask=cnv->sharedData->mbcs.unicodeMask;
3290 table=cnv->sharedData->mbcs.fromUnicodeTable;
3291 mbcsIndex=cnv->sharedData->mbcs.mbcsIndex;
3293 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3295 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
3297 asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
3516 table=cnv->sharedData->mbcs.fromUnicodeTable;
3518 results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3520 results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes;
3530 hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY);
3663 * for various MBCS and SBCS optimizations.
3692 table=cnv->sharedData->mbcs.fromUnicodeTable;
3694 results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3696 results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes;
3698 asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
3969 outputType=cnv->sharedData->mbcs.outputType;
3970 unicodeMask=cnv->sharedData->mbcs.unicodeMask;
3978 } else if(outputType==MBCS_OUTPUT_2 && cnv->sharedData->mbcs.utf8Friendly) {
3990 table=cnv->sharedData->mbcs.fromUnicodeTable;
3991 if(cnv->sharedData->mbcs.utf8Friendly) {
3992 mbcsIndex=cnv->sharedData->mbcs.mbcsIndex;
3997 bytes=cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
3999 bytes=cnv->sharedData->mbcs.fromUnicodeBytes;
4001 asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
4690 if(c<=0xffff || (sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
4691 table=sharedData->mbcs.fromUnicodeTable;
4694 if(sharedData->mbcs.outputType==MBCS_OUTPUT_1) {
4695 value=MBCS_SINGLE_RESULT_FROM_U(table, (uint16_t *)sharedData->mbcs.fromUnicodeBytes, c);
4705 switch(sharedData->mbcs.outputType) {
4707 value=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
4718 value=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
4728 p=MBCS_POINTER_3_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
4739 value=MBCS_VALUE_4_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
4751 value=MBCS_VALUE_2_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
4766 p=MBCS_POINTER_3_FROM_STAGE_2(sharedData->mbcs.fromUnicodeBytes, stage2Entry, c);
4805 cx=sharedData->mbcs.extIndexes;
4837 if(c>=0x10000 && !(sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY)) {
4842 table=sharedData->mbcs.fromUnicodeTable;
4845 value=MBCS_SINGLE_RESULT_FROM_U(table, (uint16_t *)sharedData->mbcs.fromUnicodeBytes, c);
4855 /* MBCS-from-UTF-8 conversion functions ------------------------------------- */
4894 table=cnv->sharedData->mbcs.fromUnicodeTable;
4895 sbcsIndex=cnv->sharedData->mbcs.sbcsIndex;
4897 results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
4899 results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes;
4901 asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
4910 hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY);
5201 table=cnv->sharedData->mbcs.fromUnicodeTable;
5202 mbcsIndex=cnv->sharedData->mbcs.mbcsIndex;
5204 results=(uint16_t *)cnv->sharedData->mbcs.swapLFNLFromUnicodeBytes;
5206 results=(uint16_t *)cnv->sharedData->mbcs.fromUnicodeBytes;
5208 asciiRoundtrips=cnv->sharedData->mbcs.asciiRoundtrips;
5210 hasSupplementary=(UBool)(cnv->sharedData->mbcs.unicodeMask&UCNV_HAS_SUPPLEMENTARY);
5490 state0=cnv->sharedData->mbcs.stateTable[cnv->sharedData->mbcs.dbcsOnlyState];
5503 return (UBool)MBCS_ENTRY_IS_TRANSITION(sharedData->mbcs.stateTable[0][(uint8_t)byte]);
5517 (cnv->sharedData->mbcs.extIndexes!=NULL ?
5521 /* select subChar1 if it is set (not 0) and the unmappable Unicode code point is up to U+00ff (IBM MBCS behavior) */
5533 if (cnv->sharedData->mbcs.outputType == MBCS_OUTPUT_2_SISO) {
5568 /* SBCS, DBCS, and EBCDIC_STATEFUL are replaced by MBCS, but here we cheat a little */
5569 if(converter->sharedData->mbcs.countStates==1) {
5571 } else if((converter->sharedData->mbcs.outputType&0xff)==MBCS_OUTPUT_2_SISO) {