Lines Matching refs:mbcsTable

494 enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[],
505 row=mbcsTable->stateTable[state];
506 unicodeCodeUnits=mbcsTable->unicodeCodeUnits;
525 mbcsTable, stateProps, nextState,
668 ucnv_MBCSEnumToUnicode(UConverterMBCSTable *mbcsTable,
695 getStateProp(mbcsTable->stateTable, stateProps, 0);
697 for(state=0; state<mbcsTable->countStates; ++state) {
704 mbcsTable, stateProps, state, 0, 0,
717 const UConverterMBCSTable *mbcsTable;
726 mbcsTable=&sharedData->mbcs;
727 table=mbcsTable->fromUnicodeTable;
728 if(mbcsTable->unicodeMask&UCNV_HAS_SUPPLEMENTARY) {
736 if(mbcsTable->outputType==MBCS_OUTPUT_1) {
740 results=(const uint16_t *)mbcsTable->fromUnicodeBytes;
784 bytes=mbcsTable->fromUnicodeBytes;
788 switch(mbcsTable->outputType) {
1115 UConverterMBCSTable *mbcsTable;
1128 mbcsTable=&sharedData->mbcs;
1130 table=mbcsTable->fromUnicodeTable;
1131 bytes=mbcsTable->fromUnicodeBytes;
1141 (mbcsTable->outputType==MBCS_OUTPUT_1 || mbcsTable->outputType==MBCS_OUTPUT_2_SISO) &&
1142 mbcsTable->stateTable[0][EBCDIC_LF]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF) &&
1143 mbcsTable->stateTable[0][EBCDIC_NL]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL)
1148 if(mbcsTable->outputType==MBCS_OUTPUT_1) {
1173 if(mbcsTable->fromUBytesLength>0) {
1178 sizeofFromUBytes=mbcsTable->fromUBytesLength;
1204 mbcsTable->countStates*1024+
1215 uprv_memcpy(newStateTable, mbcsTable->stateTable, mbcsTable->countStates*1024);
1221 newResults=(uint16_t *)newStateTable[mbcsTable->countStates];
1225 if(mbcsTable->outputType==MBCS_OUTPUT_1) {
1243 if(mbcsTable->swapLFNLStateTable==NULL) {
1244 mbcsTable->swapLFNLStateTable=newStateTable;
1245 mbcsTable->swapLFNLFromUnicodeBytes=(uint8_t *)newResults;
1246 mbcsTable->swapLFNLName=name;
1264 UConverterMBCSTable *mbcsTable=(UConverterMBCSTable *)context;
1271 table=mbcsTable->fromUnicodeTable;
1272 bytes=(uint8_t *)mbcsTable->fromUnicodeBytes;
1275 switch(mbcsTable->outputType) {
1316 switch(mbcsTable->outputType) {
1340 reconstituteData(UConverterMBCSTable *mbcsTable,
1346 uint32_t dataLength=stage1Length*2+fullStage2Length*4+mbcsTable->fromUBytesLength;
1347 mbcsTable->reconstitutedData=(uint8_t *)uprv_malloc(dataLength);
1348 if(mbcsTable->reconstitutedData==NULL) {
1352 uprv_memset(mbcsTable->reconstitutedData, 0, dataLength);
1355 stage1=(uint16_t *)mbcsTable->reconstitutedData;
1356 uprv_memcpy(stage1, mbcsTable->fromUnicodeTable, stage1Length*2);
1360 mbcsTable->fromUnicodeTable+stage1Length,
1363 mbcsTable->fromUnicodeTable=stage1;
1364 mbcsTable->fromUnicodeBytes=(uint8_t *)(stage2+fullStage2Length);
1371 int32_t stageUTF8Length=((int32_t)mbcsTable->maxFastUChar+1)>>6;
1380 st3=mbcsTable->mbcsIndex[stageUTF8Index++];
1405 ucnv_MBCSEnumToUnicode(mbcsTable, writeStage3Roundtrip, mbcsTable, pErrorCode);
1416 UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
1433 mbcsTable->outputType=(uint8_t)header->flags;
1434 if(noFromU && mbcsTable->outputType==MBCS_OUTPUT_1) {
1442 mbcsTable->extIndexes=(const int32_t *)(raw+offset);
1445 if(mbcsTable->outputType==MBCS_OUTPUT_EXT_ONLY) {
1452 if((extIndexes=mbcsTable->extIndexes)==NULL) {
1503 uprv_memcpy(mbcsTable, &baseSharedData->mbcs, sizeof(UConverterMBCSTable));
1506 mbcsTable->baseSharedData=baseSharedData;
1507 mbcsTable->extIndexes=extIndexes;
1516 mbcsTable->swapLFNLStateTable=NULL;
1517 mbcsTable->swapLFNLFromUnicodeBytes=NULL;
1518 mbcsTable->swapLFNLName=NULL;
1524 mbcsTable->reconstitutedData=NULL;
1539 entry=mbcsTable->stateTable[0][0xe];
1544 mbcsTable->dbcsOnlyState=(uint8_t)MBCS_ENTRY_FINAL_STATE(entry);
1546 mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
1552 mbcsTable->countStates<=127
1560 count=mbcsTable->countStates;
1568 uprv_memcpy(newStateTable, mbcsTable->stateTable, count*1024);
1583 mbcsTable->stateTable=(const int32_t (*)[256])newStateTable;
1584 mbcsTable->countStates=(uint8_t)(count+1);
1585 mbcsTable->stateTableOwned=TRUE;
1587 mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
1601 switch(mbcsTable->outputType) {
1625 mbcsTable->countStates=(uint8_t)header->countStates;
1626 mbcsTable->countToUFallbacks=header->countToUFallbacks;
1627 mbcsTable->stateTable=(const int32_t (*)[256])(raw+headerLength*4);
1628 mbcsTable->toUFallbacks=(const _MBCSToUFallback *)(mbcsTable->stateTable+header->countStates);
1629 mbcsTable->unicodeCodeUnits=(const uint16_t *)(raw+header->offsetToUCodeUnits);
1631 mbcsTable->fromUnicodeTable=(const uint16_t *)(raw+header->offsetFromUTable);
1632 mbcsTable->fromUnicodeBytes=(const uint8_t *)(raw+header->offsetFromUBytes);
1633 mbcsTable->fromUBytesLength=header->fromUBytesLength;
1643 mbcsTable->unicodeMask=(uint8_t)(sharedData->staticData->unicodeMask&3);
1646 mbcsTable->unicodeMask=UCNV_HAS_SUPPLEMENTARY|UCNV_HAS_SURROGATES;
1658 (mbcsTable->unicodeMask&UCNV_HAS_SURROGATES)==0 &&
1659 (mbcsTable->countStates==1 ?
1664 mbcsTable->utf8Friendly=TRUE;
1666 if(mbcsTable->countStates==1) {
1674 mbcsTable->sbcsIndex[i]=mbcsTable->fromUnicodeTable[mbcsTable->fromUnicodeTable[i>>4]+((i<<2)&0x3c)];
1677 mbcsTable->maxFastUChar=SBCS_FAST_MAX;
1684 mbcsTable->mbcsIndex=(const uint16_t *)
1685 (mbcsTable->fromUnicodeBytes+
1686 (noFromU ? 0 : mbcsTable->fromUBytesLength));
1687 mbcsTable->maxFastUChar=(((UChar)header->version[2])<<8)|0xff;
1697 if(mbcsTable->stateTable[0][i]!=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, i)) {
1701 mbcsTable->asciiRoundtrips=asciiRoundtrips;
1706 mbcsTable->unicodeMask&UCNV_HAS_SUPPLEMENTARY ?
1711 reconstituteData(mbcsTable, stage1Length, stage2Length, header->fullStage2Length, pErrorCode);
1716 if(mbcsTable->utf8Friendly) {
1717 if(mbcsTable->countStates==1) {
1720 if(mbcsTable->outputType==MBCS_OUTPUT_2) {
1726 if(mbcsTable->outputType==MBCS_OUTPUT_DBCS_ONLY || mbcsTable->outputType==MBCS_OUTPUT_2_SISO) {
1731 mbcsTable->asciiRoundtrips=0;
1737 UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
1739 if(mbcsTable->swapLFNLStateTable!=NULL) {
1740 uprv_free(mbcsTable->swapLFNLStateTable);
1742 if(mbcsTable->stateTableOwned) {
1743 uprv_free((void *)mbcsTable->stateTable);
1745 if(mbcsTable->baseSharedData!=NULL) {
1746 ucnv_unload(mbcsTable->baseSharedData);
1748 if(mbcsTable->reconstitutedData!=NULL) {
1749 uprv_free(mbcsTable->reconstitutedData);
1757 UConverterMBCSTable *mbcsTable;
1766 mbcsTable=&cnv->sharedData->mbcs;
1767 outputType=mbcsTable->outputType;
1779 isCached=mbcsTable->swapLFNLStateTable!=NULL;
1815 extIndexes=mbcsTable->extIndexes;
1856 ucnv_MBCSGetFallback(UConverterMBCSTable *mbcsTable, uint32_t offset) {
1860 limit=mbcsTable->countToUFallbacks;
1863 toUFallbacks=mbcsTable->toUFallbacks;