Lines Matching refs:converter
308 toUArgs.converter = fromUArgs.converter = localConverter; in ucnv_safeClone()
324 ucnv_close (UConverter * converter) in ucnv_close() argument
330 if (converter == NULL) in ucnv_close()
337 ucnv_getName(converter, &errorCode), converter, converter->isCopyLocal); in ucnv_close()
343 if (converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) { in ucnv_close()
355 toUArgs.converter = converter; in ucnv_close()
357 …converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_CLOSE, &errorCode… in ucnv_close()
359 if (converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) { in ucnv_close()
370 fromUArgs.converter = converter; in ucnv_close()
372 …converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLOSE, &e… in ucnv_close()
375 if (converter->sharedData->impl->close != NULL) { in ucnv_close()
376 converter->sharedData->impl->close(converter); in ucnv_close()
379 if (converter->subChars != (uint8_t *)converter->subUChars) { in ucnv_close()
380 uprv_free(converter->subChars); in ucnv_close()
383 if (converter->sharedData->isReferenceCounted) { in ucnv_close()
384 ucnv_unloadSharedDataIfReady(converter->sharedData); in ucnv_close()
387 if(!converter->isCopyLocal){ in ucnv_close()
388 uprv_free(converter); in ucnv_close()
417 ucnv_getSubstChars (const UConverter * converter, in ucnv_getSubstChars() argument
425 if (converter->subCharLen <= 0) { in ucnv_getSubstChars()
431 if (*len < converter->subCharLen) /*not enough space in subChars */ in ucnv_getSubstChars()
437 … uprv_memcpy (mySubChar, converter->subChars, converter->subCharLen); /*fills in the subchars */ in ucnv_getSubstChars()
438 *len = converter->subCharLen; /*store # of bytes copied to buffer */ in ucnv_getSubstChars()
442 ucnv_setSubstChars (UConverter * converter, in ucnv_setSubstChars() argument
451 if ((len > converter->sharedData->staticData->maxBytesPerChar) in ucnv_setSubstChars()
452 || (len < converter->sharedData->staticData->minBytesPerChar)) in ucnv_setSubstChars()
458 uprv_memcpy (converter->subChars, mySubChar, len); /*copies the subchars */ in ucnv_setSubstChars()
459 converter->subCharLen = len; /*sets the new len */ in ucnv_setSubstChars()
466 converter->subChar1 = 0; in ucnv_setSubstChars()
561 static void _reset(UConverter *converter, UConverterResetChoice choice, in _reset() argument
563 if(converter == NULL) { in _reset()
571 …if(choice<=UCNV_RESET_TO_UNICODE && converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBAC… in _reset()
582 toUArgs.converter = converter; in _reset()
584 …converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_RESET, &errorCode… in _reset()
586 …if(choice!=UCNV_RESET_TO_UNICODE && converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALL… in _reset()
597 fromUArgs.converter = converter; in _reset()
599 …converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_RESET, &e… in _reset()
605 converter->toUnicodeStatus = converter->sharedData->toUnicodeStatus; in _reset()
606 converter->mode = 0; in _reset()
607 converter->toULength = 0; in _reset()
608 converter->invalidCharLength = converter->UCharErrorBufferLength = 0; in _reset()
609 converter->preToULength = 0; in _reset()
612 converter->fromUnicodeStatus = 0; in _reset()
613 converter->fromUChar32 = 0; in _reset()
614 converter->invalidUCharLength = converter->charErrorBufferLength = 0; in _reset()
615 converter->preFromUFirstCP = U_SENTINEL; in _reset()
616 converter->preFromULength = 0; in _reset()
619 if (converter->sharedData->impl->reset != NULL) { in _reset()
621 converter->sharedData->impl->reset(converter, choice); in _reset()
626 ucnv_reset(UConverter *converter) in ucnv_reset() argument
628 _reset(converter, UCNV_RESET_BOTH, TRUE); in ucnv_reset()
632 ucnv_resetToUnicode(UConverter *converter) in ucnv_resetToUnicode() argument
634 _reset(converter, UCNV_RESET_TO_UNICODE, TRUE); in ucnv_resetToUnicode()
638 ucnv_resetFromUnicode(UConverter *converter) in ucnv_resetFromUnicode() argument
640 _reset(converter, UCNV_RESET_FROM_UNICODE, TRUE); in ucnv_resetFromUnicode()
644 ucnv_getMaxCharSize (const UConverter * converter) in ucnv_getMaxCharSize() argument
646 return converter->maxBytesPerUChar; in ucnv_getMaxCharSize()
651 ucnv_getMinCharSize (const UConverter * converter) in ucnv_getMinCharSize() argument
653 return converter->sharedData->staticData->minBytesPerChar; in ucnv_getMinCharSize()
657 ucnv_getName (const UConverter * converter, UErrorCode * err) in ucnv_getName() argument
662 if(converter->sharedData->impl->getName){ in ucnv_getName()
663 const char* temp= converter->sharedData->impl->getName(converter); in ucnv_getName()
667 return converter->sharedData->staticData->name; in ucnv_getName()
671 ucnv_getCCSID(const UConverter * converter, in ucnv_getCCSID() argument
678 ccsid = converter->sharedData->staticData->codepage; in ucnv_getCCSID()
682 const char *standardName = ucnv_getStandardName(ucnv_getName(converter, err), "IBM", err); in ucnv_getCCSID()
695 ucnv_getPlatform (const UConverter * converter, in ucnv_getPlatform() argument
701 return (UConverterPlatform)converter->sharedData->staticData->platform; in ucnv_getPlatform()
705 ucnv_getToUCallBack (const UConverter * converter, in ucnv_getToUCallBack() argument
709 *action = converter->fromCharErrorBehaviour; in ucnv_getToUCallBack()
710 *context = converter->toUContext; in ucnv_getToUCallBack()
714 ucnv_getFromUCallBack (const UConverter * converter, in ucnv_getFromUCallBack() argument
718 *action = converter->fromUCharErrorBehaviour; in ucnv_getFromUCallBack()
719 *context = converter->fromUContext; in ucnv_getFromUCallBack()
723 ucnv_setToUCallBack (UConverter * converter, in ucnv_setToUCallBack() argument
732 if (oldAction) *oldAction = converter->fromCharErrorBehaviour; in ucnv_setToUCallBack()
733 converter->fromCharErrorBehaviour = newAction; in ucnv_setToUCallBack()
734 if (oldContext) *oldContext = converter->toUContext; in ucnv_setToUCallBack()
735 converter->toUContext = newContext; in ucnv_setToUCallBack()
739 ucnv_setFromUCallBack (UConverter * converter, in ucnv_setFromUCallBack() argument
748 if (oldAction) *oldAction = converter->fromUCharErrorBehaviour; in ucnv_setFromUCallBack()
749 converter->fromUCharErrorBehaviour = newAction; in ucnv_setFromUCallBack()
750 if (oldContext) *oldContext = converter->fromUContext; in ucnv_setFromUCallBack()
751 converter->fromUContext = newContext; in ucnv_setFromUCallBack()
840 cnv=pArgs->converter; in _fromUnicodeWithCallback()
1251 args.converter=cnv; in ucnv_fromUnicode()
1285 cnv=pArgs->converter; in _toUnicodeWithCallback()
1697 args.converter=cnv; in ucnv_toUnicode()
1916 args.converter=cnv; in ucnv_getNextUChar()
2177 fromUArgs.converter=targetCnv; in ucnv_convertEx()
2184 toUArgs.converter=sourceCnv; in ucnv_convertEx()
2606 ucnv_getType(const UConverter* converter) in ucnv_getType() argument
2608 int8_t type = converter->sharedData->staticData->conversionType; in ucnv_getType()
2611 return ucnv_MBCSGetType(converter); in ucnv_getType()
2618 ucnv_getStarters(const UConverter* converter, in ucnv_getStarters() argument
2626 if(converter->sharedData->impl->getStarters != NULL) { in ucnv_getStarters()
2627 converter->sharedData->impl->getStarters(converter, starters, err); in ucnv_getStarters()
2699 ucnv_getInvalidChars (const UConverter * converter, in ucnv_getInvalidChars() argument
2708 if (len == NULL || errBytes == NULL || converter == NULL) in ucnv_getInvalidChars()
2713 if (*len < converter->invalidCharLength) in ucnv_getInvalidChars()
2718 if ((*len = converter->invalidCharLength) > 0) in ucnv_getInvalidChars()
2720 uprv_memcpy (errBytes, converter->invalidCharBuffer, *len); in ucnv_getInvalidChars()
2725 ucnv_getInvalidUChars (const UConverter * converter, in ucnv_getInvalidUChars() argument
2734 if (len == NULL || errChars == NULL || converter == NULL) in ucnv_getInvalidUChars()
2739 if (*len < converter->invalidUCharLength) in ucnv_getInvalidUChars()
2744 if ((*len = converter->invalidUCharLength) > 0) in ucnv_getInvalidUChars()
2746 uprv_memcpy (errChars, converter->invalidUCharBuffer, sizeof(UChar) * (*len)); in ucnv_getInvalidUChars()