Lines Matching refs:converter
310 toUArgs.converter = fromUArgs.converter = localConverter; in ucnv_safeClone()
326 ucnv_close (UConverter * converter) in ucnv_close() argument
332 if (converter == NULL) in ucnv_close()
339 ucnv_getName(converter, &errorCode), converter, converter->isCopyLocal); in ucnv_close()
345 if (converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) { in ucnv_close()
357 toUArgs.converter = converter; in ucnv_close()
359 …converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_CLOSE, &errorCode… in ucnv_close()
361 if (converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) { in ucnv_close()
372 fromUArgs.converter = converter; in ucnv_close()
374 …converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLOSE, &e… in ucnv_close()
377 if (converter->sharedData->impl->close != NULL) { in ucnv_close()
378 converter->sharedData->impl->close(converter); in ucnv_close()
381 if (converter->subChars != (uint8_t *)converter->subUChars) { in ucnv_close()
382 uprv_free(converter->subChars); in ucnv_close()
385 if (converter->sharedData->isReferenceCounted) { in ucnv_close()
386 ucnv_unloadSharedDataIfReady(converter->sharedData); in ucnv_close()
389 if(!converter->isCopyLocal){ in ucnv_close()
390 uprv_free(converter); in ucnv_close()
419 ucnv_getSubstChars (const UConverter * converter, in ucnv_getSubstChars() argument
427 if (converter->subCharLen <= 0) { in ucnv_getSubstChars()
433 if (*len < converter->subCharLen) /*not enough space in subChars */ in ucnv_getSubstChars()
439 … uprv_memcpy (mySubChar, converter->subChars, converter->subCharLen); /*fills in the subchars */ in ucnv_getSubstChars()
440 *len = converter->subCharLen; /*store # of bytes copied to buffer */ in ucnv_getSubstChars()
444 ucnv_setSubstChars (UConverter * converter, in ucnv_setSubstChars() argument
453 if ((len > converter->sharedData->staticData->maxBytesPerChar) in ucnv_setSubstChars()
454 || (len < converter->sharedData->staticData->minBytesPerChar)) in ucnv_setSubstChars()
460 uprv_memcpy (converter->subChars, mySubChar, len); /*copies the subchars */ in ucnv_setSubstChars()
461 converter->subCharLen = len; /*sets the new len */ in ucnv_setSubstChars()
468 converter->subChar1 = 0; in ucnv_setSubstChars()
563 static void _reset(UConverter *converter, UConverterResetChoice choice, in _reset() argument
565 if(converter == NULL) { in _reset()
573 …if(choice<=UCNV_RESET_TO_UNICODE && converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBAC… in _reset()
584 toUArgs.converter = converter; in _reset()
586 …converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_RESET, &errorCode… in _reset()
588 …if(choice!=UCNV_RESET_TO_UNICODE && converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALL… in _reset()
599 fromUArgs.converter = converter; in _reset()
601 …converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_RESET, &e… in _reset()
607 converter->toUnicodeStatus = converter->sharedData->toUnicodeStatus; in _reset()
608 converter->mode = 0; in _reset()
609 converter->toULength = 0; in _reset()
610 converter->invalidCharLength = converter->UCharErrorBufferLength = 0; in _reset()
611 converter->preToULength = 0; in _reset()
614 converter->fromUnicodeStatus = 0; in _reset()
615 converter->fromUChar32 = 0; in _reset()
616 converter->invalidUCharLength = converter->charErrorBufferLength = 0; in _reset()
617 converter->preFromUFirstCP = U_SENTINEL; in _reset()
618 converter->preFromULength = 0; in _reset()
621 if (converter->sharedData->impl->reset != NULL) { in _reset()
623 converter->sharedData->impl->reset(converter, choice); in _reset()
628 ucnv_reset(UConverter *converter) in ucnv_reset() argument
630 _reset(converter, UCNV_RESET_BOTH, TRUE); in ucnv_reset()
634 ucnv_resetToUnicode(UConverter *converter) in ucnv_resetToUnicode() argument
636 _reset(converter, UCNV_RESET_TO_UNICODE, TRUE); in ucnv_resetToUnicode()
640 ucnv_resetFromUnicode(UConverter *converter) in ucnv_resetFromUnicode() argument
642 _reset(converter, UCNV_RESET_FROM_UNICODE, TRUE); in ucnv_resetFromUnicode()
646 ucnv_getMaxCharSize (const UConverter * converter) in ucnv_getMaxCharSize() argument
648 return converter->maxBytesPerUChar; in ucnv_getMaxCharSize()
653 ucnv_getMinCharSize (const UConverter * converter) in ucnv_getMinCharSize() argument
655 return converter->sharedData->staticData->minBytesPerChar; in ucnv_getMinCharSize()
659 ucnv_getName (const UConverter * converter, UErrorCode * err) in ucnv_getName() argument
664 if(converter->sharedData->impl->getName){ in ucnv_getName()
665 const char* temp= converter->sharedData->impl->getName(converter); in ucnv_getName()
669 return converter->sharedData->staticData->name; in ucnv_getName()
673 ucnv_getCCSID(const UConverter * converter, in ucnv_getCCSID() argument
680 ccsid = converter->sharedData->staticData->codepage; in ucnv_getCCSID()
684 const char *standardName = ucnv_getStandardName(ucnv_getName(converter, err), "IBM", err); in ucnv_getCCSID()
697 ucnv_getPlatform (const UConverter * converter, in ucnv_getPlatform() argument
703 return (UConverterPlatform)converter->sharedData->staticData->platform; in ucnv_getPlatform()
707 ucnv_getToUCallBack (const UConverter * converter, in ucnv_getToUCallBack() argument
711 *action = converter->fromCharErrorBehaviour; in ucnv_getToUCallBack()
712 *context = converter->toUContext; in ucnv_getToUCallBack()
716 ucnv_getFromUCallBack (const UConverter * converter, in ucnv_getFromUCallBack() argument
720 *action = converter->fromUCharErrorBehaviour; in ucnv_getFromUCallBack()
721 *context = converter->fromUContext; in ucnv_getFromUCallBack()
725 ucnv_setToUCallBack (UConverter * converter, in ucnv_setToUCallBack() argument
734 if (oldAction) *oldAction = converter->fromCharErrorBehaviour; in ucnv_setToUCallBack()
735 converter->fromCharErrorBehaviour = newAction; in ucnv_setToUCallBack()
736 if (oldContext) *oldContext = converter->toUContext; in ucnv_setToUCallBack()
737 converter->toUContext = newContext; in ucnv_setToUCallBack()
741 ucnv_setFromUCallBack (UConverter * converter, in ucnv_setFromUCallBack() argument
750 if (oldAction) *oldAction = converter->fromUCharErrorBehaviour; in ucnv_setFromUCallBack()
751 converter->fromUCharErrorBehaviour = newAction; in ucnv_setFromUCallBack()
752 if (oldContext) *oldContext = converter->fromUContext; in ucnv_setFromUCallBack()
753 converter->fromUContext = newContext; in ucnv_setFromUCallBack()
842 cnv=pArgs->converter; in _fromUnicodeWithCallback()
1253 args.converter=cnv; in ucnv_fromUnicode()
1287 cnv=pArgs->converter; in _toUnicodeWithCallback()
1699 args.converter=cnv; in ucnv_toUnicode()
1910 args.converter=cnv; in ucnv_getNextUChar()
2171 fromUArgs.converter=targetCnv; in ucnv_convertEx()
2178 toUArgs.converter=sourceCnv; in ucnv_convertEx()
2600 ucnv_getType(const UConverter* converter) in ucnv_getType() argument
2602 int8_t type = converter->sharedData->staticData->conversionType; in ucnv_getType()
2605 return ucnv_MBCSGetType(converter); in ucnv_getType()
2612 ucnv_getStarters(const UConverter* converter, in ucnv_getStarters() argument
2620 if(converter->sharedData->impl->getStarters != NULL) { in ucnv_getStarters()
2621 converter->sharedData->impl->getStarters(converter, starters, err); in ucnv_getStarters()
2693 ucnv_getInvalidChars (const UConverter * converter, in ucnv_getInvalidChars() argument
2702 if (len == NULL || errBytes == NULL || converter == NULL) in ucnv_getInvalidChars()
2707 if (*len < converter->invalidCharLength) in ucnv_getInvalidChars()
2712 if ((*len = converter->invalidCharLength) > 0) in ucnv_getInvalidChars()
2714 uprv_memcpy (errBytes, converter->invalidCharBuffer, *len); in ucnv_getInvalidChars()
2719 ucnv_getInvalidUChars (const UConverter * converter, in ucnv_getInvalidUChars() argument
2728 if (len == NULL || errChars == NULL || converter == NULL) in ucnv_getInvalidUChars()
2733 if (*len < converter->invalidUCharLength) in ucnv_getInvalidUChars()
2738 if ((*len = converter->invalidUCharLength) > 0) in ucnv_getInvalidUChars()
2740 u_memcpy (errChars, converter->invalidUCharBuffer, *len); in ucnv_getInvalidUChars()