Lines Matching refs:cnv
50 UConverter *cnv; in _UTF16BEFromUnicodeWithOffsets() local
66 cnv=pArgs->converter; in _UTF16BEFromUnicodeWithOffsets()
69 if(cnv->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) { in _UTF16BEFromUnicodeWithOffsets()
71 ucnv_fromUWriteBytes(cnv, in _UTF16BEFromUnicodeWithOffsets()
76 cnv->fromUnicodeStatus=0; in _UTF16BEFromUnicodeWithOffsets()
91 if((c=(UChar)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) { in _UTF16BEFromUnicodeWithOffsets()
108 cnv->fromUChar32=c=0; in _UTF16BEFromUnicodeWithOffsets()
228 cnv->fromUChar32=c; in _UTF16BEFromUnicodeWithOffsets()
233 ucnv_fromUWriteBytes(cnv, in _UTF16BEFromUnicodeWithOffsets()
254 UConverter *cnv; in _UTF16BEToUnicodeWithOffsets() local
267 cnv=pArgs->converter; in _UTF16BEToUnicodeWithOffsets()
270 if(length<=0 && cnv->toUnicodeStatus==0) { in _UTF16BEToUnicodeWithOffsets()
287 if(cnv->toUnicodeStatus!=0) { in _UTF16BEToUnicodeWithOffsets()
294 cnv->toUBytes[0]=(uint8_t)cnv->toUnicodeStatus; in _UTF16BEToUnicodeWithOffsets()
295 cnv->toULength=1; in _UTF16BEToUnicodeWithOffsets()
296 cnv->toUnicodeStatus=0; in _UTF16BEToUnicodeWithOffsets()
298 if((count=cnv->toULength)!=0) { in _UTF16BEToUnicodeWithOffsets()
299 uint8_t *p=cnv->toUBytes; in _UTF16BEToUnicodeWithOffsets()
338 cnv->UCharErrorBuffer[0]=trail; in _UTF16BEToUnicodeWithOffsets()
339 cnv->UCharErrorBufferLength=1; in _UTF16BEToUnicodeWithOffsets()
358 cnv->toUnicodeStatus=0x100|p[2]; in _UTF16BEToUnicodeWithOffsets()
361 cnv->toULength=2; in _UTF16BEToUnicodeWithOffsets()
371 cnv->toULength=(int8_t)count; in _UTF16BEToUnicodeWithOffsets()
440 cnv->toUBytes[0]=(uint8_t)(c>>8); in _UTF16BEToUnicodeWithOffsets()
441 cnv->toUBytes[1]=(uint8_t)c; in _UTF16BEToUnicodeWithOffsets()
442 cnv->toULength=2; in _UTF16BEToUnicodeWithOffsets()
454 cnv->UCharErrorBuffer[0]=trail; in _UTF16BEToUnicodeWithOffsets()
455 cnv->UCharErrorBufferLength=1; in _UTF16BEToUnicodeWithOffsets()
456 cnv->toULength=0; in _UTF16BEToUnicodeWithOffsets()
478 cnv->toUBytes[cnv->toULength++]=*source++; in _UTF16BEToUnicodeWithOffsets()
569 _UTF16BEReset(UConverter *cnv, UConverterResetChoice choice) { in _UTF16BEReset() argument
572 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16BEReset()
573 cnv->mode=8; /* no BOM handling */ in _UTF16BEReset()
575 cnv->mode=0; /* Java-specific "UnicodeBig" requires BE BOM or no BOM */ in _UTF16BEReset()
578 if(choice!=UCNV_RESET_TO_UNICODE && UCNV_GET_VERSION(cnv)==1) { in _UTF16BEReset()
580 cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM; in _UTF16BEReset()
585 _UTF16BEOpen(UConverter *cnv, in _UTF16BEOpen() argument
588 if(UCNV_GET_VERSION(cnv)<=1) { in _UTF16BEOpen()
589 _UTF16BEReset(cnv, UCNV_RESET_BOTH); in _UTF16BEOpen()
596 _UTF16BEGetName(const UConverter *cnv) { in _UTF16BEGetName() argument
597 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16BEGetName()
646 UConverter *cnv; in _UTF16LEFromUnicodeWithOffsets() local
662 cnv=pArgs->converter; in _UTF16LEFromUnicodeWithOffsets()
665 if(cnv->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) { in _UTF16LEFromUnicodeWithOffsets()
667 ucnv_fromUWriteBytes(cnv, in _UTF16LEFromUnicodeWithOffsets()
672 cnv->fromUnicodeStatus=0; in _UTF16LEFromUnicodeWithOffsets()
687 if((c=(UChar)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) { in _UTF16LEFromUnicodeWithOffsets()
704 cnv->fromUChar32=c=0; in _UTF16LEFromUnicodeWithOffsets()
824 cnv->fromUChar32=c; in _UTF16LEFromUnicodeWithOffsets()
829 ucnv_fromUWriteBytes(cnv, in _UTF16LEFromUnicodeWithOffsets()
850 UConverter *cnv; in _UTF16LEToUnicodeWithOffsets() local
863 cnv=pArgs->converter; in _UTF16LEToUnicodeWithOffsets()
866 if(length<=0 && cnv->toUnicodeStatus==0) { in _UTF16LEToUnicodeWithOffsets()
883 if(cnv->toUnicodeStatus!=0) { in _UTF16LEToUnicodeWithOffsets()
890 cnv->toUBytes[0]=(uint8_t)cnv->toUnicodeStatus; in _UTF16LEToUnicodeWithOffsets()
891 cnv->toULength=1; in _UTF16LEToUnicodeWithOffsets()
892 cnv->toUnicodeStatus=0; in _UTF16LEToUnicodeWithOffsets()
894 if((count=cnv->toULength)!=0) { in _UTF16LEToUnicodeWithOffsets()
895 uint8_t *p=cnv->toUBytes; in _UTF16LEToUnicodeWithOffsets()
934 cnv->UCharErrorBuffer[0]=trail; in _UTF16LEToUnicodeWithOffsets()
935 cnv->UCharErrorBufferLength=1; in _UTF16LEToUnicodeWithOffsets()
954 cnv->toUnicodeStatus=0x100|p[2]; in _UTF16LEToUnicodeWithOffsets()
957 cnv->toULength=2; in _UTF16LEToUnicodeWithOffsets()
967 cnv->toULength=(int8_t)count; in _UTF16LEToUnicodeWithOffsets()
1036 cnv->toUBytes[0]=(uint8_t)c; in _UTF16LEToUnicodeWithOffsets()
1037 cnv->toUBytes[1]=(uint8_t)(c>>8); in _UTF16LEToUnicodeWithOffsets()
1038 cnv->toULength=2; in _UTF16LEToUnicodeWithOffsets()
1050 cnv->UCharErrorBuffer[0]=trail; in _UTF16LEToUnicodeWithOffsets()
1051 cnv->UCharErrorBufferLength=1; in _UTF16LEToUnicodeWithOffsets()
1052 cnv->toULength=0; in _UTF16LEToUnicodeWithOffsets()
1074 cnv->toUBytes[cnv->toULength++]=*source++; in _UTF16LEToUnicodeWithOffsets()
1165 _UTF16LEReset(UConverter *cnv, UConverterResetChoice choice) { in _UTF16LEReset() argument
1168 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16LEReset()
1169 cnv->mode=8; /* no BOM handling */ in _UTF16LEReset()
1171 cnv->mode=0; /* Java-specific "UnicodeLittle" requires LE BOM or no BOM */ in _UTF16LEReset()
1174 if(choice!=UCNV_RESET_TO_UNICODE && UCNV_GET_VERSION(cnv)==1) { in _UTF16LEReset()
1176 cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM; in _UTF16LEReset()
1181 _UTF16LEOpen(UConverter *cnv, in _UTF16LEOpen() argument
1184 if(UCNV_GET_VERSION(cnv)<=1) { in _UTF16LEOpen()
1185 _UTF16LEReset(cnv, UCNV_RESET_BOTH); in _UTF16LEOpen()
1192 _UTF16LEGetName(const UConverter *cnv) { in _UTF16LEGetName() argument
1193 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16LEGetName()
1265 _UTF16Reset(UConverter *cnv, UConverterResetChoice choice) { in _UTF16Reset() argument
1268 cnv->mode=0; in _UTF16Reset()
1272 cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM; in _UTF16Reset()
1279 _UTF16Open(UConverter *cnv, in _UTF16Open() argument
1282 if(UCNV_GET_VERSION(cnv)<=2) { in _UTF16Open()
1283 if(UCNV_GET_VERSION(cnv)==2 && !pArgs->onlyTestIsLoadable) { in _UTF16Open()
1290 cnv->sharedData=(UConverterSharedData*)&_UTF16v2Data; in _UTF16Open()
1291 uprv_memcpy(cnv->subChars, _UTF16v2Data.staticData->subChar, UCNV_MAX_SUBCHAR_LEN); in _UTF16Open()
1293 _UTF16Reset(cnv, UCNV_RESET_BOTH); in _UTF16Open()
1300 _UTF16GetName(const UConverter *cnv) { in _UTF16GetName() argument
1301 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16GetName()
1303 } else if(UCNV_GET_VERSION(cnv)==1) { in _UTF16GetName()
1312 #define IS_UTF16BE(cnv) ((cnv)->sharedData==&_UTF16BEData) argument
1313 #define IS_UTF16LE(cnv) ((cnv)->sharedData==&_UTF16LEData) argument
1314 #define IS_UTF16(cnv) ((cnv)->sharedData==&_UTF16Data || (cnv)->sharedData==&_UTF16v2Data) argument
1319 UConverter *cnv=pArgs->converter; in _UTF16ToUnicodeWithOffsets() local
1327 state=cnv->mode; in _UTF16ToUnicodeWithOffsets()
1339 cnv->toUBytes[0]=(uint8_t)*source++; in _UTF16ToUnicodeWithOffsets()
1340 cnv->toULength=1; in _UTF16ToUnicodeWithOffsets()
1351 if(cnv->toUBytes[0]==0xfe && b==0xff) { in _UTF16ToUnicodeWithOffsets()
1352 if(IS_UTF16LE(cnv)) { in _UTF16ToUnicodeWithOffsets()
1357 } else if(cnv->toUBytes[0]==0xff && b==0xfe) { in _UTF16ToUnicodeWithOffsets()
1358 if(IS_UTF16BE(cnv)) { in _UTF16ToUnicodeWithOffsets()
1363 } else if((IS_UTF16(cnv) && UCNV_GET_VERSION(cnv)==1)) { in _UTF16ToUnicodeWithOffsets()
1369 cnv->toULength=0; in _UTF16ToUnicodeWithOffsets()
1376 cnv->toULength=0; in _UTF16ToUnicodeWithOffsets()
1378 if(IS_UTF16LE(cnv)) { in _UTF16ToUnicodeWithOffsets()
1393 cnv->toUBytes[1]=b; in _UTF16ToUnicodeWithOffsets()
1394 cnv->toULength=2; in _UTF16ToUnicodeWithOffsets()
1402 cnv->mode=state+2; in _UTF16ToUnicodeWithOffsets()
1407 cnv->mode=state; in _UTF16ToUnicodeWithOffsets()
1453 cnv->mode=state; in _UTF16ToUnicodeWithOffsets()