Lines Matching defs:mbcsTable
631 enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[],
642 row=mbcsTable->stateTable[state];
643 unicodeCodeUnits=mbcsTable->unicodeCodeUnits;
662 mbcsTable, stateProps, nextState,
805 ucnv_MBCSEnumToUnicode(UConverterMBCSTable *mbcsTable,
832 getStateProp(mbcsTable->stateTable, stateProps, 0);
834 for(state=0; state<mbcsTable->countStates; ++state) {
841 mbcsTable, stateProps, state, 0, 0,
854 const UConverterMBCSTable *mbcsTable;
863 mbcsTable=&sharedData->mbcs;
864 table=mbcsTable->fromUnicodeTable;
865 if(mbcsTable
873 if(mbcsTable->outputType==MBCS_OUTPUT_1) {
877 results=(const uint16_t *)mbcsTable->fromUnicodeBytes;
921 bytes=mbcsTable->fromUnicodeBytes;
925 switch(mbcsTable->outputType) {
1252 UConverterMBCSTable *mbcsTable;
1265 mbcsTable=&sharedData->mbcs;
1267 table=mbcsTable->fromUnicodeTable;
1268 bytes=mbcsTable->fromUnicodeBytes;
1278 (mbcsTable->outputType==MBCS_OUTPUT_1 || mbcsTable->outputType==MBCS_OUTPUT_2_SISO) &&
1279 mbcsTable->stateTable[0][EBCDIC_LF]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF) &&
1280 mbcsTable->stateTable[0][EBCDIC_NL]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL)
1285 if(mbcsTable->outputType==MBCS_OUTPUT_1) {
1310 if(mbcsTable->fromUBytesLength>0) {
1315 sizeofFromUBytes=mbcsTable->fromUBytesLength;
1341 mbcsTable->countStates*1024+
1352 uprv_memcpy(newStateTable, mbcsTable->stateTable, mbcsTable->countStates*1024);
1358 newResults=(uint16_t *)newStateTable[mbcsTable->countStates];
1362 if(mbcsTable->outputType==MBCS_OUTPUT_1) {
1380 if(mbcsTable->swapLFNLStateTable==NULL) {
1381 mbcsTable->swapLFNLStateTable=newStateTable;
1382 mbcsTable->swapLFNLFromUnicodeBytes=(uint8_t *)newResults;
1383 mbcsTable->swapLFNLName=name;
1401 UConverterMBCSTable *mbcsTable=(UConverterMBCSTable *)context;
1408 table=mbcsTable->fromUnicodeTable;
1409 bytes=(uint8_t *)mbcsTable->fromUnicodeBytes;
1412 switch(mbcsTable->outputType) {
1453 switch(mbcsTable->outputType) {
1477 reconstituteData(UConverterMBCSTable *mbcsTable,
1483 uint32_t dataLength=stage1Length*2+fullStage2Length*4+mbcsTable->fromUBytesLength;
1484 mbcsTable->reconstitutedData=(uint8_t *)uprv_malloc(dataLength);
1485 if(mbcsTable->reconstitutedData==NULL) {
1489 uprv_memset(mbcsTable->reconstitutedData, 0, dataLength);
1492 stage1=(uint16_t *)mbcsTable->reconstitutedData;
1493 uprv_memcpy(stage1, mbcsTable->fromUnicodeTable, stage1Length*2);
1497 mbcsTable->fromUnicodeTable+stage1Length,
1500 mbcsTable->fromUnicodeTable=stage1;
1501 mbcsTable->fromUnicodeBytes=(uint8_t *)(stage2+fullStage2Length);
1508 int32_t stageUTF8Length=((int32_t)mbcsTable->maxFastUChar+1)>>6;
1517 st3=mbcsTable->mbcsIndex[stageUTF8Index++];
1542 ucnv_MBCSEnumToUnicode(mbcsTable, writeStage3Roundtrip, mbcsTable, pErrorCode);
1553 UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
1570 mbcsTable->outputType=(uint8_t)header->flags;
1571 if(noFromU && mbcsTable->outputType==MBCS_OUTPUT_1) {
1579 mbcsTable->extIndexes=(const int32_t *)(raw+offset);
1582 if(mbcsTable->outputType==MBCS_OUTPUT_EXT_ONLY) {
1589 if((extIndexes=mbcsTable->extIndexes)==NULL) {
1640 uprv_memcpy(mbcsTable, &baseSharedData->mbcs, sizeof(UConverterMBCSTable));
1643 mbcsTable->baseSharedData=baseSharedData;
1644 mbcsTable->extIndexes=extIndexes;
1653 mbcsTable->swapLFNLStateTable=NULL;
1654 mbcsTable->swapLFNLFromUnicodeBytes=NULL;
1655 mbcsTable->swapLFNLName=NULL;
1661 mbcsTable->reconstitutedData=NULL;
1676 entry=mbcsTable->stateTable[0][0xe];
1681 mbcsTable->dbcsOnlyState=(uint8_t)MBCS_ENTRY_FINAL_STATE(entry);
1683 mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
1689 mbcsTable->countStates<=127
1697 count=mbcsTable->countStates;
1705 uprv_memcpy(newStateTable, mbcsTable->stateTable, count*1024);
1720 mbcsTable->stateTable=(const int32_t (*)[256])newStateTable;
1721 mbcsTable->countStates=(uint8_t)(count+1);
1722 mbcsTable->stateTableOwned=TRUE;
1724 mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY;
1738 switch(mbcsTable->outputType) {
1762 mbcsTable->countStates=(uint8_t)header->countStates;
1763 mbcsTable->countToUFallbacks=header->countToUFallbacks;
1764 mbcsTable->stateTable=(const int32_t (*)[256])(raw+headerLength*4);
1765 mbcsTable->toUFallbacks=(const _MBCSToUFallback *)(mbcsTable->stateTable+header->countStates);
1766 mbcsTable->unicodeCodeUnits=(const uint16_t *)(raw+header->offsetToUCodeUnits);
1768 mbcsTable->fromUnicodeTable=(const uint16_t *)(raw+header->offsetFromUTable);
1769 mbcsTable->fromUnicodeBytes=(const uint8_t *)(raw+header->offsetFromUBytes);
1770 mbcsTable->fromUBytesLength=header->fromUBytesLength;
1780 mbcsTable->unicodeMask=(uint8_t)(sharedData->staticData->unicodeMask&3);
1783 mbcsTable->unicodeMask=UCNV_HAS_SUPPLEMENTARY|UCNV_HAS_SURROGATES;
1795 (mbcsTable->unicodeMask&UCNV_HAS_SURROGATES)==0 &&
1796 (mbcsTable->countStates==1 ?
1801 mbcsTable->utf8Friendly=TRUE;
1803 if(mbcsTable->countStates==1) {
1811 mbcsTable->sbcsIndex[i]=mbcsTable->fromUnicodeTable[mbcsTable->fromUnicodeTable[i>>4]+((i<<2)&0x3c)];
1814 mbcsTable->maxFastUChar=SBCS_FAST_MAX;
1821 mbcsTable->mbcsIndex=(const uint16_t *)
1822 (mbcsTable->fromUnicodeBytes+
1823 (noFromU ? 0 : mbcsTable->fromUBytesLength));
1824 mbcsTable->maxFastUChar=(((UChar)header->version[2])<<8)|0xff;
1834 if(mbcsTable->stateTable[0][i]!=MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, i)) {
1838 mbcsTable->asciiRoundtrips=asciiRoundtrips;
1843 mbcsTable->unicodeMask&UCNV_HAS_SUPPLEMENTARY ?
1848 reconstituteData(mbcsTable, stage1Length, stage2Length, header->fullStage2Length, pErrorCode);
1853 if(mbcsTable->utf8Friendly) {
1854 if(mbcsTable->countStates==1) {
1857 if(mbcsTable->outputType==MBCS_OUTPUT_2) {
1863 if(mbcsTable->outputType==MBCS_OUTPUT_DBCS_ONLY || mbcsTable->outputType==MBCS_OUTPUT_2_SISO) {
1868 mbcsTable->asciiRoundtrips=0;
1874 UConverterMBCSTable *mbcsTable=&sharedData->mbcs;
1876 if(mbcsTable->swapLFNLStateTable!=NULL) {
1877 uprv_free(mbcsTable->swapLFNLStateTable);
1879 if(mbcsTable->stateTableOwned) {
1880 uprv_free((void *)mbcsTable->stateTable);
1882 if(mbcsTable->baseSharedData!=NULL) {
1883 ucnv_unload(mbcsTable->baseSharedData);
1885 if(mbcsTable->reconstitutedData!=NULL) {
1886 uprv_free(mbcsTable->reconstitutedData);
1894 UConverterMBCSTable *mbcsTable;
1903 mbcsTable=&cnv->sharedData->mbcs;
1904 outputType=mbcsTable->outputType;
1916 isCached=mbcsTable->swapLFNLStateTable!=NULL;
1952 extIndexes=mbcsTable->extIndexes;
1993 ucnv_MBCSGetFallback(UConverterMBCSTable *mbcsTable, uint32_t offset) {
1997 limit=mbcsTable->countToUFallbacks;
2000 toUFallbacks=mbcsTable->toUFallbacks;