Lines Matching refs:cnv
54 UConverter *cnv; in _UTF16BEFromUnicodeWithOffsets() local
70 cnv=pArgs->converter; in _UTF16BEFromUnicodeWithOffsets()
73 if(cnv->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) { in _UTF16BEFromUnicodeWithOffsets()
75 ucnv_fromUWriteBytes(cnv, in _UTF16BEFromUnicodeWithOffsets()
80 cnv->fromUnicodeStatus=0; in _UTF16BEFromUnicodeWithOffsets()
95 if((c=(UChar)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) { in _UTF16BEFromUnicodeWithOffsets()
112 cnv->fromUChar32=c=0; in _UTF16BEFromUnicodeWithOffsets()
232 cnv->fromUChar32=c; in _UTF16BEFromUnicodeWithOffsets()
237 ucnv_fromUWriteBytes(cnv, in _UTF16BEFromUnicodeWithOffsets()
258 UConverter *cnv; in _UTF16BEToUnicodeWithOffsets() local
271 cnv=pArgs->converter; in _UTF16BEToUnicodeWithOffsets()
274 if(length<=0 && cnv->toUnicodeStatus==0) { in _UTF16BEToUnicodeWithOffsets()
291 if(cnv->toUnicodeStatus!=0) { in _UTF16BEToUnicodeWithOffsets()
298 cnv->toUBytes[0]=(uint8_t)cnv->toUnicodeStatus; in _UTF16BEToUnicodeWithOffsets()
299 cnv->toULength=1; in _UTF16BEToUnicodeWithOffsets()
300 cnv->toUnicodeStatus=0; in _UTF16BEToUnicodeWithOffsets()
302 if((count=cnv->toULength)!=0) { in _UTF16BEToUnicodeWithOffsets()
303 uint8_t *p=cnv->toUBytes; in _UTF16BEToUnicodeWithOffsets()
342 cnv->UCharErrorBuffer[0]=trail; in _UTF16BEToUnicodeWithOffsets()
343 cnv->UCharErrorBufferLength=1; in _UTF16BEToUnicodeWithOffsets()
362 cnv->toUnicodeStatus=0x100|p[2]; in _UTF16BEToUnicodeWithOffsets()
365 cnv->toULength=2; in _UTF16BEToUnicodeWithOffsets()
375 cnv->toULength=(int8_t)count; in _UTF16BEToUnicodeWithOffsets()
444 cnv->toUBytes[0]=(uint8_t)(c>>8); in _UTF16BEToUnicodeWithOffsets()
445 cnv->toUBytes[1]=(uint8_t)c; in _UTF16BEToUnicodeWithOffsets()
446 cnv->toULength=2; in _UTF16BEToUnicodeWithOffsets()
458 cnv->UCharErrorBuffer[0]=trail; in _UTF16BEToUnicodeWithOffsets()
459 cnv->UCharErrorBufferLength=1; in _UTF16BEToUnicodeWithOffsets()
460 cnv->toULength=0; in _UTF16BEToUnicodeWithOffsets()
482 cnv->toUBytes[cnv->toULength++]=*source++; in _UTF16BEToUnicodeWithOffsets()
573 _UTF16BEReset(UConverter *cnv, UConverterResetChoice choice) { in _UTF16BEReset() argument
576 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16BEReset()
577 cnv->mode=8; /* no BOM handling */ in _UTF16BEReset()
579 cnv->mode=0; /* Java-specific "UnicodeBig" requires BE BOM or no BOM */ in _UTF16BEReset()
582 if(choice!=UCNV_RESET_TO_UNICODE && UCNV_GET_VERSION(cnv)==1) { in _UTF16BEReset()
584 cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM; in _UTF16BEReset()
589 _UTF16BEOpen(UConverter *cnv, in _UTF16BEOpen() argument
593 if(UCNV_GET_VERSION(cnv)<=1) { in _UTF16BEOpen()
594 _UTF16BEReset(cnv, UCNV_RESET_BOTH); in _UTF16BEOpen()
601 _UTF16BEGetName(const UConverter *cnv) { in _UTF16BEGetName() argument
602 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16BEGetName()
655 UConverter *cnv; in _UTF16LEFromUnicodeWithOffsets() local
671 cnv=pArgs->converter; in _UTF16LEFromUnicodeWithOffsets()
674 if(cnv->fromUnicodeStatus==UCNV_NEED_TO_WRITE_BOM) { in _UTF16LEFromUnicodeWithOffsets()
676 ucnv_fromUWriteBytes(cnv, in _UTF16LEFromUnicodeWithOffsets()
681 cnv->fromUnicodeStatus=0; in _UTF16LEFromUnicodeWithOffsets()
696 if((c=(UChar)cnv->fromUChar32)!=0 && U16_IS_TRAIL(trail=*source) && targetCapacity>=4) { in _UTF16LEFromUnicodeWithOffsets()
713 cnv->fromUChar32=c=0; in _UTF16LEFromUnicodeWithOffsets()
833 cnv->fromUChar32=c; in _UTF16LEFromUnicodeWithOffsets()
838 ucnv_fromUWriteBytes(cnv, in _UTF16LEFromUnicodeWithOffsets()
859 UConverter *cnv; in _UTF16LEToUnicodeWithOffsets() local
872 cnv=pArgs->converter; in _UTF16LEToUnicodeWithOffsets()
875 if(length<=0 && cnv->toUnicodeStatus==0) { in _UTF16LEToUnicodeWithOffsets()
892 if(cnv->toUnicodeStatus!=0) { in _UTF16LEToUnicodeWithOffsets()
899 cnv->toUBytes[0]=(uint8_t)cnv->toUnicodeStatus; in _UTF16LEToUnicodeWithOffsets()
900 cnv->toULength=1; in _UTF16LEToUnicodeWithOffsets()
901 cnv->toUnicodeStatus=0; in _UTF16LEToUnicodeWithOffsets()
903 if((count=cnv->toULength)!=0) { in _UTF16LEToUnicodeWithOffsets()
904 uint8_t *p=cnv->toUBytes; in _UTF16LEToUnicodeWithOffsets()
943 cnv->UCharErrorBuffer[0]=trail; in _UTF16LEToUnicodeWithOffsets()
944 cnv->UCharErrorBufferLength=1; in _UTF16LEToUnicodeWithOffsets()
963 cnv->toUnicodeStatus=0x100|p[2]; in _UTF16LEToUnicodeWithOffsets()
966 cnv->toULength=2; in _UTF16LEToUnicodeWithOffsets()
976 cnv->toULength=(int8_t)count; in _UTF16LEToUnicodeWithOffsets()
1045 cnv->toUBytes[0]=(uint8_t)c; in _UTF16LEToUnicodeWithOffsets()
1046 cnv->toUBytes[1]=(uint8_t)(c>>8); in _UTF16LEToUnicodeWithOffsets()
1047 cnv->toULength=2; in _UTF16LEToUnicodeWithOffsets()
1059 cnv->UCharErrorBuffer[0]=trail; in _UTF16LEToUnicodeWithOffsets()
1060 cnv->UCharErrorBufferLength=1; in _UTF16LEToUnicodeWithOffsets()
1061 cnv->toULength=0; in _UTF16LEToUnicodeWithOffsets()
1083 cnv->toUBytes[cnv->toULength++]=*source++; in _UTF16LEToUnicodeWithOffsets()
1174 _UTF16LEReset(UConverter *cnv, UConverterResetChoice choice) { in _UTF16LEReset() argument
1177 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16LEReset()
1178 cnv->mode=8; /* no BOM handling */ in _UTF16LEReset()
1180 cnv->mode=0; /* Java-specific "UnicodeLittle" requires LE BOM or no BOM */ in _UTF16LEReset()
1183 if(choice!=UCNV_RESET_TO_UNICODE && UCNV_GET_VERSION(cnv)==1) { in _UTF16LEReset()
1185 cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM; in _UTF16LEReset()
1190 _UTF16LEOpen(UConverter *cnv, in _UTF16LEOpen() argument
1194 if(UCNV_GET_VERSION(cnv)<=1) { in _UTF16LEOpen()
1195 _UTF16LEReset(cnv, UCNV_RESET_BOTH); in _UTF16LEOpen()
1202 _UTF16LEGetName(const UConverter *cnv) { in _UTF16LEGetName() argument
1203 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16LEGetName()
1279 _UTF16Reset(UConverter *cnv, UConverterResetChoice choice) { in _UTF16Reset() argument
1282 cnv->mode=0; in _UTF16Reset()
1286 cnv->fromUnicodeStatus=UCNV_NEED_TO_WRITE_BOM; in _UTF16Reset()
1293 _UTF16Open(UConverter *cnv, in _UTF16Open() argument
1296 if(UCNV_GET_VERSION(cnv)<=2) { in _UTF16Open()
1297 if(UCNV_GET_VERSION(cnv)==2 && !pArgs->onlyTestIsLoadable) { in _UTF16Open()
1304 cnv->sharedData=(UConverterSharedData*)&_UTF16v2Data; in _UTF16Open()
1305 uprv_memcpy(cnv->subChars, _UTF16v2Data.staticData->subChar, UCNV_MAX_SUBCHAR_LEN); in _UTF16Open()
1307 _UTF16Reset(cnv, UCNV_RESET_BOTH); in _UTF16Open()
1314 _UTF16GetName(const UConverter *cnv) { in _UTF16GetName() argument
1315 if(UCNV_GET_VERSION(cnv)==0) { in _UTF16GetName()
1317 } else if(UCNV_GET_VERSION(cnv)==1) { in _UTF16GetName()
1326 static inline bool IS_UTF16BE(const UConverter *cnv) { in IS_UTF16BE() argument
1327 return ((cnv)->sharedData == &_UTF16BEData); in IS_UTF16BE()
1330 static inline bool IS_UTF16LE(const UConverter *cnv) { in IS_UTF16LE() argument
1331 return ((cnv)->sharedData == &_UTF16LEData); in IS_UTF16LE()
1334 static inline bool IS_UTF16(const UConverter *cnv) { in IS_UTF16() argument
1335 return ((cnv)->sharedData==&_UTF16Data) || ((cnv)->sharedData == &_UTF16v2Data); in IS_UTF16()
1342 UConverter *cnv=pArgs->converter; in _UTF16ToUnicodeWithOffsets() local
1350 state=cnv->mode; in _UTF16ToUnicodeWithOffsets()
1362 cnv->toUBytes[0]=(uint8_t)*source++; in _UTF16ToUnicodeWithOffsets()
1363 cnv->toULength=1; in _UTF16ToUnicodeWithOffsets()
1374 if(cnv->toUBytes[0]==0xfe && b==0xff) { in _UTF16ToUnicodeWithOffsets()
1375 if(IS_UTF16LE(cnv)) { in _UTF16ToUnicodeWithOffsets()
1380 } else if(cnv->toUBytes[0]==0xff && b==0xfe) { in _UTF16ToUnicodeWithOffsets()
1381 if(IS_UTF16BE(cnv)) { in _UTF16ToUnicodeWithOffsets()
1386 } else if((IS_UTF16(cnv) && UCNV_GET_VERSION(cnv)==1)) { in _UTF16ToUnicodeWithOffsets()
1392 cnv->toULength=0; in _UTF16ToUnicodeWithOffsets()
1399 cnv->toULength=0; in _UTF16ToUnicodeWithOffsets()
1401 if(IS_UTF16LE(cnv)) { in _UTF16ToUnicodeWithOffsets()
1416 cnv->toUBytes[1]=b; in _UTF16ToUnicodeWithOffsets()
1417 cnv->toULength=2; in _UTF16ToUnicodeWithOffsets()
1425 cnv->mode=state+2; in _UTF16ToUnicodeWithOffsets()
1430 cnv->mode=state; in _UTF16ToUnicodeWithOffsets()
1476 cnv->mode=state; in _UTF16ToUnicodeWithOffsets()