Lines Matching refs:cnv

233 ucnv_extWriteToU(UConverter *cnv, const int32_t *cx,
242 cnv, UCNV_EXT_TO_U_GET_CODE_POINT(value),
249 cnv,
265 * cnv->mode==0 is equivalent to firstLength==1.
267 #define UCNV_SISO_STATE(cnv) \
268 ((cnv)->sharedData->mbcs.outputType==MBCS_OUTPUT_2_SISO ? (int8_t)(cnv)->mode : \
269 (cnv)->sharedData->mbcs.outputType==MBCS_OUTPUT_DBCS_ONLY ? 1 : -1)
275 ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx,
286 match=ucnv_extMatchToU(cx, (int8_t)UCNV_SISO_STATE(cnv),
287 (const char *)cnv->toUBytes, firstLength,
290 cnv->useFallback, flush);
296 ucnv_extWriteToU(cnv, cx,
308 s=(const char *)cnv->toUBytes;
309 cnv->preToUFirstLength=(int8_t)firstLength;
311 cnv->preToU[j]=*s++;
318 cnv->preToU[j]=*s++;
321 cnv->preToULength=(int8_t)match;
367 ucnv_extContinueMatchToU(UConverter *cnv,
373 match=ucnv_extMatchToU(cnv->sharedData->mbcs.extIndexes, (int8_t)UCNV_SISO_STATE(cnv),
374 cnv->preToU, cnv->preToULength,
377 cnv->useFallback, pArgs->flush);
379 if(match>=cnv->preToULength) {
381 pArgs->source+=match-cnv->preToULength;
382 cnv->preToULength=0;
385 length=cnv->preToULength-match;
386 uprv_memmove(cnv->preToU, cnv->preToU+match, length);
387 cnv->preToULength=(int8_t)-length;
391 ucnv_extWriteToU(cnv, cnv->sharedData->mbcs.extIndexes,
404 for(j=cnv->preToULength; j<match; ++j) {
405 cnv->preToU[j]=*s++;
408 cnv->preToULength=(int8_t)match;
429 uprv_memcpy(cnv->toUBytes, cnv->preToU, cnv->preToUFirstLength);
430 cnv->toULength=cnv->preToUFirstLength;
433 length=cnv->preToULength-cnv->preToUFirstLength;
435 uprv_memmove(cnv->preToU, cnv->preToU+cnv->preToUFirstLength, length);
439 cnv->preToULength=(int8_t)-length;
505 * @param useFallback "use fallback" flag, usually from cnv->useFallback
669 ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx,
707 if((prevLength=cnv->fromUnicodeStatus)!=0) {
714 cnv->fromUnicodeStatus=1;
718 cnv->fromUnicodeStatus=2;
734 ucnv_fromUWriteBytes(cnv, (const char *)result, length,
744 ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
759 cnv->useFallback, flush);
764 cnv->sharedData->mbcs.outputType==MBCS_OUTPUT_DBCS_ONLY)
770 ucnv_extWriteFromU(cnv, cx,
782 cnv->preFromUFirstCP=cp;
788 cnv->preFromU[j]=*s++;
791 cnv->preFromULength=(int8_t)match;
795 cnv->useSubChar1=TRUE;
857 * continue partial match with new input, requires cnv->preFromUFirstCP>=0
861 ucnv_extContinueMatchFromU(UConverter *cnv,
867 match=ucnv_extMatchFromU(cnv->sharedData->mbcs.extIndexes,
868 cnv->preFromUFirstCP,
869 cnv->preFromU, cnv->preFromULength,
872 cnv->useFallback, pArgs->flush);
876 if(match>=cnv->preFromULength) {
878 pArgs->source+=match-cnv->preFromULength;
879 cnv->preFromULength=0;
882 int32_t length=cnv->preFromULength-match;
883 uprv_memmove(cnv->preFromU, cnv->preFromU+match, length*U_SIZEOF_UCHAR);
884 cnv->preFromULength=(int8_t)-length;
888 cnv->preFromUFirstCP=U_SENTINEL;
891 ucnv_extWriteFromU(cnv, cnv->sharedData->mbcs.extIndexes,
904 for(j=cnv->preFromULength; j<match; ++j) {
905 cnv->preFromU[j]=*s++;
908 cnv->preFromULength=(int8_t)match;
930 cnv->useSubChar1=TRUE;
934 cnv->fromUChar32=cnv->preFromUFirstCP;
935 cnv->preFromUFirstCP=U_SENTINEL;
938 cnv->preFromULength=-cnv->preFromULength;