• Home
  • Raw
  • Download

Lines Matching refs:cnv

156 ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status)  in ucnv_safeClone()  argument
191 if (cnv == NULL) { in ucnv_safeClone()
198 ucnv_getName(cnv, status), cnv, stackBuffer); in ucnv_safeClone()
200 if (cnv->sharedData->impl->safeClone != NULL) { in ucnv_safeClone()
203 cnv->sharedData->impl->safeClone(cnv, NULL, &bufferSizeNeeded, status); in ucnv_safeClone()
268 uprv_memcpy(localConverter, cnv, sizeof(UConverter)); in ucnv_safeClone()
272 if (cnv->subChars == (uint8_t *)cnv->subUChars) { in ucnv_safeClone()
281 … uprv_memcpy(localConverter->subChars, cnv->subChars, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); in ucnv_safeClone()
285 if (cnv->sharedData->impl->safeClone != NULL) { in ucnv_safeClone()
287 localConverter = cnv->sharedData->impl->safeClone(cnv, localConverter, pBufferSize, status); in ucnv_safeClone()
300 if (cnv->sharedData->isReferenceCounted) { in ucnv_safeClone()
301 ucnv_incrementRefCount(cnv->sharedData); in ucnv_safeClone()
312 cnv->fromCharErrorBehaviour(cnv->toUContext, &toUArgs, NULL, 0, UCNV_CLONE, &cbErr); in ucnv_safeClone()
314 cnv->fromUCharErrorBehaviour(cnv->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLONE, &cbErr); in ucnv_safeClone()
474 ucnv_setSubstString(UConverter *cnv, in ucnv_setSubstString() argument
487 clone = ucnv_safeClone(cnv, cloneBuffer, &cloneSize, err); in ucnv_setSubstString()
495 if (cnv->sharedData->impl->writeSub == NULL in ucnv_setSubstString()
497 || (cnv->sharedData->staticData->conversionType == UCNV_MBCS && in ucnv_setSubstString()
498 ucnv_MBCSGetType(cnv) != UCNV_EBCDIC_STATEFUL) in ucnv_setSubstString()
532 if (cnv->subChars == (uint8_t *)cnv->subUChars) { in ucnv_setSubstString()
534 cnv->subChars = (uint8_t *)uprv_malloc(UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); in ucnv_setSubstString()
535 if (cnv->subChars == NULL) { in ucnv_setSubstString()
536 cnv->subChars = (uint8_t *)cnv->subUChars; in ucnv_setSubstString()
540 uprv_memset(cnv->subChars, 0, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); in ucnv_setSubstString()
546 cnv->subCharLen = 0; in ucnv_setSubstString()
548 uprv_memcpy(cnv->subChars, subChars, length8); in ucnv_setSubstString()
550 cnv->subCharLen = (int8_t)length8; in ucnv_setSubstString()
552 cnv->subCharLen = (int8_t)-length; in ucnv_setSubstString()
557 cnv->subChar1 = 0; in ucnv_setSubstString()
828 UConverter *cnv; in _fromUnicodeWithCallback() local
842 cnv=pArgs->converter; in _fromUnicodeWithCallback()
850 fromUnicode=cnv->sharedData->impl->fromUnicode; in _fromUnicodeWithCallback()
852 fromUnicode=cnv->sharedData->impl->fromUnicodeWithOffsets; in _fromUnicodeWithCallback()
855 fromUnicode=cnv->sharedData->impl->fromUnicode; in _fromUnicodeWithCallback()
861 if(cnv->preFromULength>=0) { in _fromUnicodeWithCallback()
880 uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR); in _fromUnicodeWithCallback()
882 pArgs->sourceLimit=replay-cnv->preFromULength; in _fromUnicodeWithCallback()
886 cnv->preFromULength=0; in _fromUnicodeWithCallback()
916 cnv->fromUChar32==0); in _fromUnicodeWithCallback()
958 if(cnv->preFromULength<0) { in _fromUnicodeWithCallback()
969 uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR); in _fromUnicodeWithCallback()
971 pArgs->sourceLimit=replay-cnv->preFromULength; in _fromUnicodeWithCallback()
973 if((sourceIndex+=cnv->preFromULength)<0) { in _fromUnicodeWithCallback()
977 cnv->preFromULength=0; in _fromUnicodeWithCallback()
1005 } else if(pArgs->flush && cnv->fromUChar32!=0) { in _fromUnicodeWithCallback()
1029 _reset(cnv, UCNV_RESET_FROM_UNICODE, FALSE); in _fromUnicodeWithCallback()
1062 U_ASSERT(cnv->preFromULength==0); in _fromUnicodeWithCallback()
1066 u_memcpy(cnv->preFromU, pArgs->source, length); in _fromUnicodeWithCallback()
1067 cnv->preFromULength=(int8_t)-length; in _fromUnicodeWithCallback()
1084 codePoint=cnv->fromUChar32; in _fromUnicodeWithCallback()
1086 U16_APPEND_UNSAFE(cnv->invalidUCharBuffer, errorInputLength, codePoint); in _fromUnicodeWithCallback()
1087 cnv->invalidUCharLength=(int8_t)errorInputLength; in _fromUnicodeWithCallback()
1090 cnv->fromUChar32=0; in _fromUnicodeWithCallback()
1093 cnv->fromUCharErrorBehaviour(cnv->fromUContext, pArgs, in _fromUnicodeWithCallback()
1094 cnv->invalidUCharBuffer, errorInputLength, codePoint, in _fromUnicodeWithCallback()
1117 ucnv_outputOverflowFromUnicode(UConverter *cnv, in ucnv_outputOverflowFromUnicode() argument
1132 overflow=(char *)cnv->charErrorBuffer; in ucnv_outputOverflowFromUnicode()
1133 length=cnv->charErrorBufferLength; in ucnv_outputOverflowFromUnicode()
1144 cnv->charErrorBufferLength=(int8_t)j; in ucnv_outputOverflowFromUnicode()
1161 cnv->charErrorBufferLength=0; in ucnv_outputOverflowFromUnicode()
1170 ucnv_fromUnicode(UConverter *cnv, in ucnv_fromUnicode() argument
1185 if(cnv==NULL || target==NULL || source==NULL) { in ucnv_fromUnicode()
1231 if( cnv->charErrorBufferLength>0 && in ucnv_fromUnicode()
1232 ucnv_outputOverflowFromUnicode(cnv, target, targetLimit, &offsets, err) in ucnv_fromUnicode()
1239 if(!flush && s==sourceLimit && cnv->preFromULength>=0) { in ucnv_fromUnicode()
1253 args.converter=cnv; in ucnv_fromUnicode()
1273 UConverter *cnv; in _toUnicodeWithCallback() local
1287 cnv=pArgs->converter; in _toUnicodeWithCallback()
1295 toUnicode=cnv->sharedData->impl->toUnicode; in _toUnicodeWithCallback()
1297 toUnicode=cnv->sharedData->impl->toUnicodeWithOffsets; in _toUnicodeWithCallback()
1300 toUnicode=cnv->sharedData->impl->toUnicode; in _toUnicodeWithCallback()
1306 if(cnv->preToULength>=0) { in _toUnicodeWithCallback()
1325 uprv_memcpy(replay, cnv->preToU, -cnv->preToULength); in _toUnicodeWithCallback()
1327 pArgs->sourceLimit=replay-cnv->preToULength; in _toUnicodeWithCallback()
1331 cnv->preToULength=0; in _toUnicodeWithCallback()
1361 cnv->toULength==0); in _toUnicodeWithCallback()
1403 if(cnv->preToULength<0) { in _toUnicodeWithCallback()
1414 uprv_memcpy(replay, cnv->preToU, -cnv->preToULength); in _toUnicodeWithCallback()
1416 pArgs->sourceLimit=replay-cnv->preToULength; in _toUnicodeWithCallback()
1418 if((sourceIndex+=cnv->preToULength)<0) { in _toUnicodeWithCallback()
1422 cnv->preToULength=0; in _toUnicodeWithCallback()
1450 } else if(pArgs->flush && cnv->toULength>0) { in _toUnicodeWithCallback()
1474 _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE); in _toUnicodeWithCallback()
1509 U_ASSERT(cnv->preToULength==0); in _toUnicodeWithCallback()
1513 uprv_memcpy(cnv->preToU, pArgs->source, length); in _toUnicodeWithCallback()
1514 cnv->preToULength=(int8_t)-length; in _toUnicodeWithCallback()
1527 errorInputLength=cnv->invalidCharLength=cnv->toULength; in _toUnicodeWithCallback()
1529 uprv_memcpy(cnv->invalidCharBuffer, cnv->toUBytes, errorInputLength); in _toUnicodeWithCallback()
1533 cnv->toULength=0; in _toUnicodeWithCallback()
1536 if(cnv->toUCallbackReason==UCNV_ILLEGAL && *err==U_INVALID_CHAR_FOUND) { in _toUnicodeWithCallback()
1537 cnv->toUCallbackReason = UCNV_UNASSIGNED; in _toUnicodeWithCallback()
1539 cnv->fromCharErrorBehaviour(cnv->toUContext, pArgs, in _toUnicodeWithCallback()
1540 cnv->invalidCharBuffer, errorInputLength, in _toUnicodeWithCallback()
1541 cnv->toUCallbackReason, in _toUnicodeWithCallback()
1543 cnv->toUCallbackReason = UCNV_ILLEGAL; /* reset to default value */ in _toUnicodeWithCallback()
1563 ucnv_outputOverflowToUnicode(UConverter *cnv, in ucnv_outputOverflowToUnicode() argument
1578 overflow=cnv->UCharErrorBuffer; in ucnv_outputOverflowToUnicode()
1579 length=cnv->UCharErrorBufferLength; in ucnv_outputOverflowToUnicode()
1590 cnv->UCharErrorBufferLength=(int8_t)j; in ucnv_outputOverflowToUnicode()
1607 cnv->UCharErrorBufferLength=0; in ucnv_outputOverflowToUnicode()
1616 ucnv_toUnicode(UConverter *cnv, in ucnv_toUnicode() argument
1631 if(cnv==NULL || target==NULL || source==NULL) { in ucnv_toUnicode()
1677 if( cnv->UCharErrorBufferLength>0 && in ucnv_toUnicode()
1678 ucnv_outputOverflowToUnicode(cnv, target, targetLimit, &offsets, err) in ucnv_toUnicode()
1685 if(!flush && s==sourceLimit && cnv->preToULength>=0) { in ucnv_toUnicode()
1699 args.converter=cnv; in ucnv_toUnicode()
1717 ucnv_fromUChars(UConverter *cnv, in ucnv_fromUChars() argument
1730 if( cnv==NULL || in ucnv_fromUChars()
1739 ucnv_resetFromUnicode(cnv); in ucnv_fromUChars()
1750 ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); in ucnv_fromUChars()
1761 ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); in ucnv_fromUChars()
1773 ucnv_toUChars(UConverter *cnv, in ucnv_toUChars() argument
1786 if( cnv==NULL || in ucnv_toUChars()
1795 ucnv_resetToUnicode(cnv); in ucnv_toUChars()
1806 ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); in ucnv_toUChars()
1818 ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); in ucnv_toUChars()
1833 ucnv_getNextUChar(UConverter *cnv, in ucnv_getNextUChar() argument
1847 if(cnv==NULL || source==NULL) { in ucnv_getNextUChar()
1878 if(cnv->UCharErrorBufferLength>0) { in ucnv_getNextUChar()
1881 overflow=cnv->UCharErrorBuffer; in ucnv_getNextUChar()
1883 length=cnv->UCharErrorBufferLength; in ucnv_getNextUChar()
1887 if((cnv->UCharErrorBufferLength=(int8_t)(length-i))>0) { in ucnv_getNextUChar()
1888 uprv_memmove(cnv->UCharErrorBuffer, cnv->UCharErrorBuffer+i, in ucnv_getNextUChar()
1889 cnv->UCharErrorBufferLength*U_SIZEOF_UCHAR); in ucnv_getNextUChar()
1910 args.converter=cnv; in ucnv_getNextUChar()
1928 if(cnv->toULength==0 && cnv->sharedData->impl->getNextUChar!=NULL) { in ucnv_getNextUChar()
1929 c=cnv->sharedData->impl->getNextUChar(&args, err); in ucnv_getNextUChar()
1933 _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE); in ucnv_getNextUChar()
1980 if(cnv->UCharErrorBufferLength>0) { in ucnv_getNextUChar()
1982 if(U16_IS_TRAIL(c2=cnv->UCharErrorBuffer[0])) { in ucnv_getNextUChar()
1987 if((--cnv->UCharErrorBufferLength)>0) { in ucnv_getNextUChar()
1988 uprv_memmove(cnv->UCharErrorBuffer, cnv->UCharErrorBuffer+1, in ucnv_getNextUChar()
1989 cnv->UCharErrorBufferLength*U_SIZEOF_UCHAR); in ucnv_getNextUChar()
2019 if((length=cnv->UCharErrorBufferLength)>0) { in ucnv_getNextUChar()
2020 uprv_memmove(cnv->UCharErrorBuffer+delta, cnv->UCharErrorBuffer, in ucnv_getNextUChar()
2023 cnv->UCharErrorBufferLength=(int8_t)(length+delta); in ucnv_getNextUChar()
2025 cnv->UCharErrorBuffer[0]=buffer[i++]; in ucnv_getNextUChar()
2027 cnv->UCharErrorBuffer[1]=buffer[i]; in ucnv_getNextUChar()
2521 UConverter *cnv, in ucnv_convertAlgorithmic() argument
2533 if( cnv==NULL || source==NULL || sourceLength<-1 || in ucnv_convertAlgorithmic()
2555 ucnv_resetToUnicode(cnv); in ucnv_convertAlgorithmic()
2557 from=cnv; in ucnv_convertAlgorithmic()
2560 ucnv_resetFromUnicode(cnv); in ucnv_convertAlgorithmic()
2562 to=cnv; in ucnv_convertAlgorithmic()
2577 UConverter *cnv, in ucnv_toAlgorithmic() argument
2581 return ucnv_convertAlgorithmic(TRUE, algorithmicType, cnv, in ucnv_toAlgorithmic()
2588 ucnv_fromAlgorithmic(UConverter *cnv, in ucnv_fromAlgorithmic() argument
2593 return ucnv_convertAlgorithmic(FALSE, algorithmicType, cnv, in ucnv_fromAlgorithmic()
2627 static const UAmbiguousConverter *ucnv_getAmbiguous(const UConverter *cnv) in ucnv_getAmbiguous() argument
2633 if(cnv==NULL) { in ucnv_getAmbiguous()
2638 name=ucnv_getName(cnv, &errorCode); in ucnv_getAmbiguous()
2655 ucnv_fixFileSeparator(const UConverter *cnv, in ucnv_fixFileSeparator() argument
2662 if(cnv==NULL || source==NULL || sourceLength<=0 || (a=ucnv_getAmbiguous(cnv))==NULL) in ucnv_fixFileSeparator()
2676 ucnv_isAmbiguous(const UConverter *cnv) { in ucnv_isAmbiguous() argument
2677 return (UBool)(ucnv_getAmbiguous(cnv)!=NULL); in ucnv_isAmbiguous()
2681 ucnv_setFallback(UConverter *cnv, UBool usesFallback) in ucnv_setFallback() argument
2683 cnv->useFallback = usesFallback; in ucnv_setFallback()
2687 ucnv_usesFallback(const UConverter *cnv) in ucnv_usesFallback() argument
2689 return cnv->useFallback; in ucnv_usesFallback()
2836 ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status) in ucnv_fromUCountPending() argument
2841 if(cnv == NULL){ in ucnv_fromUCountPending()
2846 if(cnv->preFromUFirstCP >= 0){ in ucnv_fromUCountPending()
2847 return U16_LENGTH(cnv->preFromUFirstCP)+cnv->preFromULength ; in ucnv_fromUCountPending()
2848 }else if(cnv->preFromULength < 0){ in ucnv_fromUCountPending()
2849 return -cnv->preFromULength ; in ucnv_fromUCountPending()
2850 }else if(cnv->fromUChar32 > 0){ in ucnv_fromUCountPending()
2858 ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status){ in ucnv_toUCountPending() argument
2863 if(cnv == NULL){ in ucnv_toUCountPending()
2868 if(cnv->preToULength > 0){ in ucnv_toUCountPending()
2869 return cnv->preToULength ; in ucnv_toUCountPending()
2870 }else if(cnv->preToULength < 0){ in ucnv_toUCountPending()
2871 return -cnv->preToULength; in ucnv_toUCountPending()
2872 }else if(cnv->toULength > 0){ in ucnv_toUCountPending()
2873 return cnv->toULength; in ucnv_toUCountPending()
2879 ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){ in ucnv_isFixedWidth() argument
2884 if (cnv == NULL) { in ucnv_isFixedWidth()
2889 switch (ucnv_getType(cnv)) { in ucnv_isFixedWidth()