Home
last modified time | relevance | path

Searched refs:cnv (Results 1 – 25 of 76) sorted by relevance

1234

/external/icu/icu4c/source/common/
Ducnv_u16.c50 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
[all …]
Ducnv.c154 ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status) in ucnv_safeClone() argument
189 if (cnv == NULL) { in ucnv_safeClone()
196 ucnv_getName(cnv, status), cnv, stackBuffer); in ucnv_safeClone()
198 if (cnv->sharedData->impl->safeClone != NULL) { in ucnv_safeClone()
201 cnv->sharedData->impl->safeClone(cnv, NULL, &bufferSizeNeeded, status); in ucnv_safeClone()
266 uprv_memcpy(localConverter, cnv, sizeof(UConverter)); in ucnv_safeClone()
270 if (cnv->subChars == (uint8_t *)cnv->subUChars) { in ucnv_safeClone()
279 … uprv_memcpy(localConverter->subChars, cnv->subChars, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); in ucnv_safeClone()
283 if (cnv->sharedData->impl->safeClone != NULL) { in ucnv_safeClone()
285 localConverter = cnv->sharedData->impl->safeClone(cnv, localConverter, pBufferSize, status); in ucnv_safeClone()
[all …]
Ducnv_ext.cpp234 ucnv_extWriteToU(UConverter *cnv, const int32_t *cx, in ucnv_extWriteToU() argument
243 cnv, UCNV_EXT_TO_U_GET_CODE_POINT(value), in ucnv_extWriteToU()
250 cnv, in ucnv_extWriteToU()
268 #define UCNV_SISO_STATE(cnv) \ argument
269 ((cnv)->sharedData->mbcs.outputType==MBCS_OUTPUT_2_SISO ? (int8_t)(cnv)->mode : \
270 (cnv)->sharedData->mbcs.outputType==MBCS_OUTPUT_DBCS_ONLY ? 1 : -1)
276 ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx, in ucnv_extInitialMatchToU() argument
287 match=ucnv_extMatchToU(cx, (int8_t)UCNV_SISO_STATE(cnv), in ucnv_extInitialMatchToU()
288 (const char *)cnv->toUBytes, firstLength, in ucnv_extInitialMatchToU()
291 cnv->useFallback, flush); in ucnv_extInitialMatchToU()
[all …]
Ducnv_u7.c180 _UTF7Reset(UConverter *cnv, UConverterResetChoice choice) { in _UTF7Reset() argument
183 cnv->toUnicodeStatus=0x1000000; /* inDirectMode=TRUE */ in _UTF7Reset()
184 cnv->toULength=0; in _UTF7Reset()
188cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMod… in _UTF7Reset()
193 _UTF7Open(UConverter *cnv, in _UTF7Open() argument
196 if(UCNV_GET_VERSION(cnv)<=1) { in _UTF7Open()
198 cnv->fromUnicodeStatus=UCNV_GET_VERSION(cnv)<<28; in _UTF7Open()
199 _UTF7Reset(cnv, UCNV_RESET_BOTH); in _UTF7Open()
208 UConverter *cnv; in _UTF7ToUnicodeWithOffsets() local
230 cnv=pArgs->converter; in _UTF7ToUnicodeWithOffsets()
[all …]
Ducnv_u8.c90 static UBool hasCESU8Data(const UConverter *cnv) in hasCESU8Data() argument
95 return (UBool)(cnv->sharedData == &_CESU8Data); in hasCESU8Data()
102 UConverter *cnv = args->converter; in ucnv_toUnicode_UTF8() local
107 unsigned char *toUBytes = cnv->toUBytes; in ucnv_toUnicode_UTF8()
108 UBool isCESU8 = hasCESU8Data(cnv); in ucnv_toUnicode_UTF8()
113 if (cnv->toUnicodeStatus && myTarget < targetLimit) in ucnv_toUnicode_UTF8()
115 inBytes = cnv->mode; /* restore # of bytes to consume */ in ucnv_toUnicode_UTF8()
116 i = cnv->toULength; /* restore # of bytes consumed */ in ucnv_toUnicode_UTF8()
117 cnv->toULength = 0; in ucnv_toUnicode_UTF8()
119 ch = cnv->toUnicodeStatus;/*Stores the previously calculated ch from a previous call*/ in ucnv_toUnicode_UTF8()
[all …]
Ducnvscsu.c157 _SCSUReset(UConverter *cnv, UConverterResetChoice choice) { in _SCSUReset() argument
158 SCSUData *scsu=(SCSUData *)cnv->extraInfo; in _SCSUReset()
169 cnv->toULength=0; in _SCSUReset()
188 cnv->fromUChar32=0; in _SCSUReset()
193 _SCSUOpen(UConverter *cnv, in _SCSUOpen() argument
200 cnv->extraInfo=uprv_malloc(sizeof(SCSUData)); in _SCSUOpen()
201 if(cnv->extraInfo!=NULL) { in _SCSUOpen()
203 ((SCSUData *)cnv->extraInfo)->locale=l_ja; in _SCSUOpen()
205 ((SCSUData *)cnv->extraInfo)->locale=lGeneric; in _SCSUOpen()
207 _SCSUReset(cnv, UCNV_RESET_BOTH); in _SCSUOpen()
[all …]
Dustr_cnv.cpp135 UConverter *cnv = u_getDefaultConverter(&err); in u_uastrncpy() local
136 if(U_SUCCESS(err) && cnv != NULL) { in u_uastrncpy()
137 ucnv_reset(cnv); in u_uastrncpy()
138 ucnv_toUnicode(cnv, in u_uastrncpy()
146 ucnv_reset(cnv); /* be good citizens */ in u_uastrncpy()
147 u_releaseDefaultConverter(cnv); in u_uastrncpy()
165 UConverter *cnv = u_getDefaultConverter(&err); in u_uastrcpy() local
166 if(U_SUCCESS(err) && cnv != NULL) { in u_uastrcpy()
167 ucnv_toUChars(cnv, in u_uastrcpy()
173 u_releaseDefaultConverter(cnv); in u_uastrcpy()
[all …]
Ducnvhz.c70 _HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ in _HZOpen() argument
80 cnv->toUnicodeStatus = 0; in _HZOpen()
81 cnv->fromUnicodeStatus= 0; in _HZOpen()
82 cnv->mode=0; in _HZOpen()
83 cnv->fromUChar32=0x0000; in _HZOpen()
84 cnv->extraInfo = uprv_calloc(1, sizeof(UConverterDataHZ)); in _HZOpen()
85 if(cnv->extraInfo != NULL){ in _HZOpen()
86 ((UConverterDataHZ*)cnv->extraInfo)->gbConverter = gbConverter; in _HZOpen()
96 _HZClose(UConverter *cnv){ in _HZClose() argument
97 if(cnv->extraInfo != NULL) { in _HZClose()
[all …]
Ducnvmbcs.cpp388 ucnv_MBCSOpen(UConverter *cnv,
397 ucnv_MBCSGetStarters(const UConverter* cnv,
402 ucnv_MBCSGetName(const UConverter *cnv);
419 ucnv_MBCSGetUnicodeSet(const UConverter *cnv,
1068 ucnv_MBCSGetUnicodeSet(const UConverter *cnv, in ucnv_MBCSGetUnicodeSet() argument
1072 if(cnv->options&_MBCS_OPTION_GB18030) { in ucnv_MBCSGetUnicodeSet()
1076 ucnv_MBCSGetUnicodeSetForUnicode(cnv->sharedData, sa, which, pErrorCode); in ucnv_MBCSGetUnicodeSet()
1098 _extFromU(UConverter *cnv, const UConverterSharedData *sharedData, in _extFromU() argument
1107 cnv->useSubChar1=FALSE; in _extFromU()
1111 cnv, cx, in _extFromU()
[all …]
Ducnv_cnv.c30 ucnv_getCompleteUnicodeSet(const UConverter *cnv, in ucnv_getCompleteUnicodeSet() argument
38 ucnv_getNonSurrogateUnicodeSet(const UConverter *cnv, in ucnv_getNonSurrogateUnicodeSet() argument
47 ucnv_fromUWriteBytes(UConverter *cnv, in ucnv_fromUWriteBytes() argument
75 if(cnv!=NULL) { in ucnv_fromUWriteBytes()
76 t=(char *)cnv->charErrorBuffer; in ucnv_fromUWriteBytes()
77 cnv->charErrorBufferLength=(int8_t)length; in ucnv_fromUWriteBytes()
87 ucnv_toUWriteUChars(UConverter *cnv, in ucnv_toUWriteUChars() argument
115 if(cnv!=NULL) { in ucnv_toUWriteUChars()
116 t=cnv->UCharErrorBuffer; in ucnv_toUWriteUChars()
117 cnv->UCharErrorBufferLength=(int8_t)length; in ucnv_toUWriteUChars()
[all …]
Ducnv_cnv.h67 typedef void (*UConverterOpen) (UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *pErrorCode);
68 typedef void (*UConverterClose) (UConverter *cnv);
76 typedef void (*UConverterReset) (UConverter *cnv, UConverterResetChoice choice);
158 typedef const char * (*UConverterGetName) (const UConverter *cnv);
178 typedef UConverter * (*UConverterSafeClone) (const UConverter *cnv,
207 typedef void (*UConverterGetUnicodeSet) (const UConverter *cnv,
269 #define UCNV_TO_U_USE_FALLBACK(cnv) TRUE argument
274 #define UCNV_FROM_U_USE_FALLBACK(cnv, c) FROM_U_USE_FALLBACK((cnv)->useFallback, c) argument
285 ucnv_getCompleteUnicodeSet(const UConverter *cnv,
291 ucnv_getNonSurrogateUnicodeSet(const UConverter *cnv,
[all …]
Ducnvbocu.cpp392 UConverter *cnv; in _Bocu1FromUnicodeWithOffsets() local
403 cnv=pArgs->converter; in _Bocu1FromUnicodeWithOffsets()
411 c=cnv->fromUChar32; in _Bocu1FromUnicodeWithOffsets()
412 prev=(int32_t)cnv->fromUnicodeStatus; in _Bocu1FromUnicodeWithOffsets()
578 charErrorBuffer=(uint8_t *)cnv->charErrorBuffer; in _Bocu1FromUnicodeWithOffsets()
591 cnv->charErrorBufferLength=(int8_t)length; in _Bocu1FromUnicodeWithOffsets()
625 cnv->fromUChar32= c<0 ? -c : 0; in _Bocu1FromUnicodeWithOffsets()
626 cnv->fromUnicodeStatus=(uint32_t)prev; in _Bocu1FromUnicodeWithOffsets()
644 UConverter *cnv; in _Bocu1FromUnicode() local
652 cnv=pArgs->converter; in _Bocu1FromUnicode()
[all …]
Dunistr_cnv.cpp78 UConverter *cnv, in UnicodeString() argument
93 if(cnv!=0) { in UnicodeString()
95 ucnv_resetToUnicode(cnv); in UnicodeString()
96 doCodepageCreate(src, srcLength, cnv, errorCode); in UnicodeString()
99 cnv=u_getDefaultConverter(&errorCode); in UnicodeString()
100 doCodepageCreate(src, srcLength, cnv, errorCode); in UnicodeString()
101 u_releaseDefaultConverter(cnv); in UnicodeString()
206 UConverter *cnv, in extract() argument
225 if(cnv==0) { in extract()
227 cnv=u_getDefaultConverter(&errorCode); in extract()
[all …]
Ducnv2022.cpp387 _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode);
396 _ISO2022getName(const UConverter* cnv);
402 _ISO_2022_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *sta…
425 fromUWriteUInt8(UConverter *cnv, in fromUWriteUInt8() argument
433 ucnv_fromUWriteBytes(cnv, bytes, length, &targetChars, targetLimit, in fromUWriteUInt8()
442 UConverter *cnv = myConverterData->currentConverter; in setInitialStateToUnicodeKR() local
444 cnv->toUnicodeStatus=0; /* offset */ in setInitialStateToUnicodeKR()
445 cnv->mode=0; /* state */ in setInitialStateToUnicodeKR()
446 cnv->toULength=0; /* byteIndex */ in setInitialStateToUnicodeKR()
464 UConverter *cnv = myConverterData->currentConverter; in setInitialStateFromUnicodeKR() local
[all …]
Ducnv_set.c30 ucnv_getUnicodeSet(const UConverter *cnv, in ucnv_getUnicodeSet() argument
38 if(cnv==NULL || setFillIn==NULL || whichSet<UCNV_ROUNDTRIP_SET || UCNV_SET_COUNT<=whichSet) { in ucnv_getUnicodeSet()
44 if(cnv->sharedData->impl->getUnicodeSet==NULL) { in ucnv_getUnicodeSet()
64 cnv->sharedData->impl->getUnicodeSet(cnv, &sa, whichSet, pErrorCode); in ucnv_getUnicodeSet()
Ducnvdisp.c34 ucnv_getDisplayName(const UConverter *cnv, in ucnv_getDisplayName() argument
48 if(cnv==NULL || displayNameCapacity<0 || (displayNameCapacity>0 && displayName==NULL)) { in ucnv_getDisplayName()
60 name=ures_getStringByKey(rb, cnv->sharedData->staticData->name, &length, &localStatus); in ucnv_getDisplayName()
71 length=(int32_t)uprv_strlen(cnv->sharedData->staticData->name); in ucnv_getDisplayName()
72 …u_charsToUChars(cnv->sharedData->staticData->name, displayName, uprv_min(length, displayNameCapaci… in ucnv_getDisplayName()
Ducnv_ct.c167 _CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode);
176 _CompoundTextgetName(const UConverter* cnv);
259 _CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ in _CompoundTextOpen() argument
260 cnv->extraInfo = uprv_malloc (sizeof (UConverterDataCompoundText)); in _CompoundTextOpen()
261 if (cnv->extraInfo != NULL) { in _CompoundTextOpen()
262 UConverterDataCompoundText *myConverterData = (UConverterDataCompoundText *) cnv->extraInfo; in _CompoundTextOpen()
290 _CompoundTextClose(cnv); in _CompoundTextOpen()
323 _CompoundTextgetName(const UConverter* cnv){ in _CompoundTextgetName() argument
329 UConverter *cnv = args->converter; in UConverter_fromUnicode_CompoundText_OFFSETS() local
336 UBool useFallback = cnv->useFallback; in UConverter_fromUnicode_CompoundText_OFFSETS()
[all …]
Ducnvisci.c188 static void _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) { in _ISCIIOpen() argument
193 cnv->extraInfo = uprv_malloc(sizeof(UConverterDataISCII)); in _ISCIIOpen()
195 if (cnv->extraInfo != NULL) { in _ISCIIOpen()
198 (UConverterDataISCII *) cnv->extraInfo; in _ISCIIOpen()
200 cnv->toUnicodeStatus = missingCharMarker; in _ISCIIOpen()
222 uprv_free(cnv->extraInfo); in _ISCIIOpen()
223 cnv->extraInfo = NULL; in _ISCIIOpen()
232 static void _ISCIIClose(UConverter *cnv) { in _ISCIIClose() argument
233 if (cnv->extraInfo!=NULL) { in _ISCIIClose()
234 if (!cnv->isExtraLocal) { in _ISCIIClose()
[all …]
Ducnv_lmb.c683 UConverter cnv; member
688 _LMBCSSafeClone(const UConverter *cnv, in _LMBCSSafeClone() argument
701 extraInfo=(UConverterDataLMBCS *)cnv->extraInfo; in _LMBCSSafeClone()
715 newLMBCS->cnv.extraInfo = &newLMBCS->lmbcs; in _LMBCSSafeClone()
716 newLMBCS->cnv.isExtraLocal = TRUE; in _LMBCSSafeClone()
717 return &newLMBCS->cnv; in _LMBCSSafeClone()
1145 UConverterSharedData *cnv; in _LMBCSGetNextUCharWorker() local
1166 if (group > ULMBCS_GRP_LAST || (cnv = extraInfo->OptGrpConverter[group]) == NULL) in _LMBCSGetNextUCharWorker()
1180 uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 1, FALSE); in _LMBCSGetNextUCharWorker()
1184 uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 2, FALSE); in _LMBCSGetNextUCharWorker()
[all …]
/external/icu/icu4c/source/test/cintltst/
Dnucnvtst.c29 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t res…
30 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode e…
118 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
129 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err) in my_ucnv_open() argument
131 if(cnv && cnv[0] == '@') { in my_ucnv_open()
132 return ucnv_openPackage(loadTestData(err), cnv+1, err); in my_ucnv_open()
134 return ucnv_open(cnv, err); in my_ucnv_open()
174 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], cons… in TestNextUChar() argument
184 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUChar()
204 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, con… in TestNextUCharError() argument
[all …]
Dccapitst.c400 UConverter *cnv=NULL; in TestConvert() local
402 cnv=ucnv_open("ibm-949,Madhu", &err); in TestConvert()
406 ucnv_close(cnv); in TestConvert()
671 UConverter *cnv=ucnv_open("ISO_2022", &err); in TestConvert() local
675 c=ucnv_getNextUChar(cnv, &source, limit, &err); in TestConvert()
679 ucnv_reset(cnv); in TestConvert()
680 ucnv_close(cnv); in TestConvert()
1179 UConverter *cnv; in TestAlias() local
1187 cnv = ucnv_open(name, &status); in TestAlias()
1194 if (strcmp(ucnv_getName(cnv, &status), name) != 0 in TestAlias()
[all …]
/external/icu/icu4c/source/test/testdata/
Dtestdata.mak31cnv" "$(TESTDATABLD)\test1bmp.cnv" "$(TESTDATABLD)\test2.cnv" "$(TESTDATABLD)\test3.cnv" "$(TESTDA…
57 test1.cnv
58 test1bmp.cnv
59 test2.cnv
60 test3.cnv
61 test4.cnv
62 test4x.cnv
63 test5.cnv
64 ibm9027.cnv
130 "$(TESTDATABLD)\test1.cnv": "$(TESTDATA)\test1.ucm"
[all …]
/external/icu/icu4c/source/test/intltest/
Dconvtest.cpp381 LocalUConverterPointer cnv; in TestGetUnicodeSet() local
452 cnv.adoptInstead(cnv_open(charset, errorCode)); in TestGetUnicodeSet()
460 … ucnv_getUnicodeSet(cnv.getAlias(), cnvSetPtr->toUSet(), (UConverterUnicodeSet)which, &errorCode); in TestGetUnicodeSet()
581 LocalUConverterPointer cnv; in TestGetUnicodeSet2() local
586 cnv.adoptInstead(cnv_open(cnvNames[i], errorCode)); in TestGetUnicodeSet2()
592 … ucnv_setFromUCallBack(cnv.getAlias(), getUnicodeSetCallback, &expected, NULL, NULL, &errorCode); in TestGetUnicodeSet2()
600 ucnv_setFallback(cnv.getAlias(), TRUE); in TestGetUnicodeSet2()
608 …ucnv_fromUnicode(cnv.getAlias(), &t, buffer+sizeof(buffer), (const UChar **)&s, s0+s0Length, NULL,… in TestGetUnicodeSet2()
619 ucnv_getUnicodeSet(cnv.getAlias(), set.toUSet(), which, &errorCode); in TestGetUnicodeSet2()
700 UConverter *cnv = cnv_open(cnv_name, status); in TestDefaultIgnorableCallback() local
[all …]
/external/icu/icu4c/source/common/unicode/
Ducnv.h540 ucnv_safeClone(const UConverter *cnv,
666 ucnv_setSubstString(UConverter *cnv,
995 ucnv_getUnicodeSet(const UConverter *cnv,
1243 ucnv_fromUChars(UConverter *cnv,
1275 ucnv_toUChars(UConverter *cnv,
1614 UConverter *cnv,
1665 ucnv_fromAlgorithmic(UConverter *cnv,
1909 ucnv_fixFileSeparator(const UConverter *cnv, UChar *source, int32_t sourceLen);
1920 ucnv_isAmbiguous(const UConverter *cnv);
1938 ucnv_setFallback(UConverter *cnv, UBool usesFallback);
[all …]
/external/icu/icu4c/source/test/perf/utfperf/
Dutfperf.cpp125 cnv=ucnv_open(testcase.charset, &errorCode); in Command()
129 ucnv_setFromUCallBack(cnv, fromUCallback, NULL, NULL, NULL, &errorCode); in Command()
134 ucnv_close(cnv); in ~Command()
146 UConverter *cnv; member in Command
170 ucnv_reset(cnv); in call()
187 ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode); in call()
201 ucnv_toUnicode(cnv, &pOut, pOutLimit,&p, pInter,NULL, flush,pErrorCode); in call()
234 ucnv_resetFromUnicode(cnv); in call()
246 ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode); in call()
289 ucnv_resetFromUnicode(cnv); in call()
[all …]

1234