Home
last modified time | relevance | path

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

1234

/external/icu/icu4c/source/common/
Ducnv_u16.cpp54 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
[all …]
Ducnv.cpp156 ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status) in ucnv_safeClone() argument
191 if (cnv == NULL) { in ucnv_safeClone()
198 ucnv_getName(cnv, status), cnv, stackBuffer); in ucnv_safeClone()
200 if (cnv->sharedData->impl->safeClone != NULL) { in ucnv_safeClone()
203 cnv->sharedData->impl->safeClone(cnv, NULL, &bufferSizeNeeded, status); in ucnv_safeClone()
268 uprv_memcpy(localConverter, cnv, sizeof(UConverter)); in ucnv_safeClone()
272 if (cnv->subChars == (uint8_t *)cnv->subUChars) { in ucnv_safeClone()
281 … uprv_memcpy(localConverter->subChars, cnv->subChars, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); in ucnv_safeClone()
285 if (cnv->sharedData->impl->safeClone != NULL) { in ucnv_safeClone()
287 localConverter = cnv->sharedData->impl->safeClone(cnv, localConverter, pBufferSize, status); in ucnv_safeClone()
[all …]
Ducnv_ext.cpp237 ucnv_extWriteToU(UConverter *cnv, const int32_t *cx, in ucnv_extWriteToU() argument
246 cnv, UCNV_EXT_TO_U_GET_CODE_POINT(value), in ucnv_extWriteToU()
253 cnv, in ucnv_extWriteToU()
271 #define UCNV_SISO_STATE(cnv) \ argument
272 ((cnv)->sharedData->mbcs.outputType==MBCS_OUTPUT_2_SISO ? (int8_t)(cnv)->mode : \
273 (cnv)->sharedData->mbcs.outputType==MBCS_OUTPUT_DBCS_ONLY ? 1 : -1)
279 ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx, in ucnv_extInitialMatchToU() argument
290 match=ucnv_extMatchToU(cx, (int8_t)UCNV_SISO_STATE(cnv), in ucnv_extInitialMatchToU()
291 (const char *)cnv->toUBytes, firstLength, in ucnv_extInitialMatchToU()
294 cnv->useFallback, flush); in ucnv_extInitialMatchToU()
[all …]
Ducnv_u7.cpp184 _UTF7Reset(UConverter *cnv, UConverterResetChoice choice) { in _UTF7Reset() argument
187 cnv->toUnicodeStatus=0x1000000; /* inDirectMode=TRUE */ in _UTF7Reset()
188 cnv->toULength=0; in _UTF7Reset()
192cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMod… in _UTF7Reset()
197 _UTF7Open(UConverter *cnv, in _UTF7Open() argument
201 if(UCNV_GET_VERSION(cnv)<=1) { in _UTF7Open()
203 cnv->fromUnicodeStatus=UCNV_GET_VERSION(cnv)<<28; in _UTF7Open()
204 _UTF7Reset(cnv, UCNV_RESET_BOTH); in _UTF7Open()
213 UConverter *cnv; in _UTF7ToUnicodeWithOffsets() local
235 cnv=pArgs->converter; in _UTF7ToUnicodeWithOffsets()
[all …]
Ducnv_u8.cpp56 static UBool hasCESU8Data(const UConverter *cnv) in hasCESU8Data() argument
61 return (UBool)(cnv->sharedData == &_CESU8Data); in hasCESU8Data()
68 UConverter *cnv = args->converter; in ucnv_toUnicode_UTF8() local
73 unsigned char *toUBytes = cnv->toUBytes; in ucnv_toUnicode_UTF8()
74 UBool isCESU8 = hasCESU8Data(cnv); in ucnv_toUnicode_UTF8()
79 if (cnv->toULength > 0 && myTarget < targetLimit) in ucnv_toUnicode_UTF8()
81 inBytes = cnv->mode; /* restore # of bytes to consume */ in ucnv_toUnicode_UTF8()
82 i = cnv->toULength; /* restore # of bytes consumed */ in ucnv_toUnicode_UTF8()
83 cnv->toULength = 0; in ucnv_toUnicode_UTF8()
85 ch = cnv->toUnicodeStatus;/*Stores the previously calculated ch from a previous call*/ in ucnv_toUnicode_UTF8()
[all …]
Ducnvmbcs.cpp391 ucnv_MBCSOpen(UConverter *cnv,
400 ucnv_MBCSGetStarters(const UConverter* cnv,
406 ucnv_MBCSGetName(const UConverter *cnv);
424 ucnv_MBCSGetUnicodeSet(const UConverter *cnv,
1075 ucnv_MBCSGetUnicodeSet(const UConverter *cnv, in ucnv_MBCSGetUnicodeSet() argument
1079 if(cnv->options&_MBCS_OPTION_GB18030) { in ucnv_MBCSGetUnicodeSet()
1083 ucnv_MBCSGetUnicodeSetForUnicode(cnv->sharedData, sa, which, pErrorCode); in ucnv_MBCSGetUnicodeSet()
1105 _extFromU(UConverter *cnv, const UConverterSharedData *sharedData, in _extFromU() argument
1114 cnv->useSubChar1=FALSE; in _extFromU()
1118 cnv, cx, in _extFromU()
[all …]
Ducnvscsu.cpp159 _SCSUReset(UConverter *cnv, UConverterResetChoice choice) { in _SCSUReset() argument
160 SCSUData *scsu=(SCSUData *)cnv->extraInfo; in _SCSUReset()
171 cnv->toULength=0; in _SCSUReset()
190 cnv->fromUChar32=0; in _SCSUReset()
195 _SCSUOpen(UConverter *cnv, in _SCSUOpen() argument
202 cnv->extraInfo=uprv_malloc(sizeof(SCSUData)); in _SCSUOpen()
203 if(cnv->extraInfo!=NULL) { in _SCSUOpen()
205 ((SCSUData *)cnv->extraInfo)->locale=l_ja; in _SCSUOpen()
207 ((SCSUData *)cnv->extraInfo)->locale=lGeneric; in _SCSUOpen()
209 _SCSUReset(cnv, UCNV_RESET_BOTH); in _SCSUOpen()
[all …]
Dustr_cnv.cpp138 UConverter *cnv = u_getDefaultConverter(&err); in u_uastrncpy() local
139 if(U_SUCCESS(err) && cnv != NULL) { in u_uastrncpy()
140 ucnv_reset(cnv); in u_uastrncpy()
141 ucnv_toUnicode(cnv, in u_uastrncpy()
149 ucnv_reset(cnv); /* be good citizens */ in u_uastrncpy()
150 u_releaseDefaultConverter(cnv); in u_uastrncpy()
168 UConverter *cnv = u_getDefaultConverter(&err); in u_uastrcpy() local
169 if(U_SUCCESS(err) && cnv != NULL) { in u_uastrcpy()
170 ucnv_toUChars(cnv, in u_uastrcpy()
176 u_releaseDefaultConverter(cnv); in u_uastrcpy()
[all …]
Ducnvhz.cpp72 _HZOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ in _HZOpen() argument
82 cnv->toUnicodeStatus = 0; in _HZOpen()
83 cnv->fromUnicodeStatus= 0; in _HZOpen()
84 cnv->mode=0; in _HZOpen()
85 cnv->fromUChar32=0x0000; in _HZOpen()
86 cnv->extraInfo = uprv_calloc(1, sizeof(UConverterDataHZ)); in _HZOpen()
87 if(cnv->extraInfo != NULL){ in _HZOpen()
88 ((UConverterDataHZ*)cnv->extraInfo)->gbConverter = gbConverter; in _HZOpen()
98 _HZClose(UConverter *cnv){ in _HZClose() argument
99 if(cnv->extraInfo != NULL) { in _HZClose()
[all …]
Ducnv_cnv.cpp32 ucnv_getCompleteUnicodeSet(const UConverter *cnv, in ucnv_getCompleteUnicodeSet() argument
36 (void)cnv; in ucnv_getCompleteUnicodeSet()
43 ucnv_getNonSurrogateUnicodeSet(const UConverter *cnv, in ucnv_getNonSurrogateUnicodeSet() argument
47 (void)cnv; in ucnv_getNonSurrogateUnicodeSet()
55 ucnv_fromUWriteBytes(UConverter *cnv, in ucnv_fromUWriteBytes() argument
83 if(cnv!=NULL) { in ucnv_fromUWriteBytes()
84 t=(char *)cnv->charErrorBuffer; in ucnv_fromUWriteBytes()
85 cnv->charErrorBufferLength=(int8_t)length; in ucnv_fromUWriteBytes()
95 ucnv_toUWriteUChars(UConverter *cnv, in ucnv_toUWriteUChars() argument
123 if(cnv!=NULL) { in ucnv_toUWriteUChars()
[all …]
Ducnv_cnv.h69 typedef void (*UConverterOpen) (UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *pErrorCode);
70 typedef void (*UConverterClose) (UConverter *cnv);
78 typedef void (*UConverterReset) (UConverter *cnv, UConverterResetChoice choice);
160 typedef const char * (*UConverterGetName) (const UConverter *cnv);
180 typedef UConverter * (*UConverterSafeClone) (const UConverter *cnv,
209 typedef void (*UConverterGetUnicodeSet) (const UConverter *cnv,
271 #define UCNV_TO_U_USE_FALLBACK(cnv) TRUE argument
276 #define UCNV_FROM_U_USE_FALLBACK(cnv, c) FROM_U_USE_FALLBACK((cnv)->useFallback, c) argument
287 ucnv_getCompleteUnicodeSet(const UConverter *cnv,
293 ucnv_getNonSurrogateUnicodeSet(const UConverter *cnv,
[all …]
Ducnvbocu.cpp394 UConverter *cnv; in _Bocu1FromUnicodeWithOffsets() local
405 cnv=pArgs->converter; in _Bocu1FromUnicodeWithOffsets()
413 c=cnv->fromUChar32; in _Bocu1FromUnicodeWithOffsets()
414 prev=(int32_t)cnv->fromUnicodeStatus; in _Bocu1FromUnicodeWithOffsets()
583 charErrorBuffer=(uint8_t *)cnv->charErrorBuffer; in _Bocu1FromUnicodeWithOffsets()
599 cnv->charErrorBufferLength=(int8_t)length; in _Bocu1FromUnicodeWithOffsets()
636 cnv->fromUChar32= c<0 ? -c : 0; in _Bocu1FromUnicodeWithOffsets()
637 cnv->fromUnicodeStatus=(uint32_t)prev; in _Bocu1FromUnicodeWithOffsets()
655 UConverter *cnv; in _Bocu1FromUnicode() local
663 cnv=pArgs->converter; in _Bocu1FromUnicode()
[all …]
Dunistr_cnv.cpp80 UConverter *cnv, in UnicodeString() argument
95 if(cnv!=0) { in UnicodeString()
97 ucnv_resetToUnicode(cnv); in UnicodeString()
98 doCodepageCreate(src, srcLength, cnv, errorCode); in UnicodeString()
101 cnv=u_getDefaultConverter(&errorCode); in UnicodeString()
102 doCodepageCreate(src, srcLength, cnv, errorCode); in UnicodeString()
103 u_releaseDefaultConverter(cnv); in UnicodeString()
208 UConverter *cnv, in extract() argument
227 if(cnv==0) { in extract()
229 cnv=u_getDefaultConverter(&errorCode); in extract()
[all …]
Ducnv2022.cpp389 _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode);
399 _ISO2022getName(const UConverter* cnv);
407 _ISO_2022_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *sta…
432 fromUWriteUInt8(UConverter *cnv, in fromUWriteUInt8() argument
440 ucnv_fromUWriteBytes(cnv, bytes, length, &targetChars, targetLimit, in fromUWriteUInt8()
449 UConverter *cnv = myConverterData->currentConverter; in setInitialStateToUnicodeKR() local
451 cnv->toUnicodeStatus=0; /* offset */ in setInitialStateToUnicodeKR()
452 cnv->mode=0; /* state */ in setInitialStateToUnicodeKR()
453 cnv->toULength=0; /* byteIndex */ in setInitialStateToUnicodeKR()
471 UConverter *cnv = myConverterData->currentConverter; in setInitialStateFromUnicodeKR() local
[all …]
Ducnv_set.cpp32 ucnv_getUnicodeSet(const UConverter *cnv, in ucnv_getUnicodeSet() argument
40 if(cnv==NULL || setFillIn==NULL || whichSet<UCNV_ROUNDTRIP_SET || UCNV_SET_COUNT<=whichSet) { in ucnv_getUnicodeSet()
46 if(cnv->sharedData->impl->getUnicodeSet==NULL) { in ucnv_getUnicodeSet()
66 cnv->sharedData->impl->getUnicodeSet(cnv, &sa, whichSet, pErrorCode); in ucnv_getUnicodeSet()
Ducnv_ct.cpp170 _CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode);
179 _CompoundTextgetName(const UConverter* cnv);
262 _CompoundTextOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ in _CompoundTextOpen() argument
263 cnv->extraInfo = uprv_malloc (sizeof (UConverterDataCompoundText)); in _CompoundTextOpen()
264 if (cnv->extraInfo != NULL) { in _CompoundTextOpen()
265 UConverterDataCompoundText *myConverterData = (UConverterDataCompoundText *) cnv->extraInfo; in _CompoundTextOpen()
293 _CompoundTextClose(cnv); in _CompoundTextOpen()
329 _CompoundTextgetName(const UConverter* cnv){ in _CompoundTextgetName() argument
330 (void)cnv; in _CompoundTextgetName()
336 UConverter *cnv = args->converter; in UConverter_fromUnicode_CompoundText_OFFSETS() local
[all …]
Ducnvdisp.cpp36 ucnv_getDisplayName(const UConverter *cnv, in ucnv_getDisplayName() argument
50 if(cnv==NULL || displayNameCapacity<0 || (displayNameCapacity>0 && displayName==NULL)) { in ucnv_getDisplayName()
62 name=ures_getStringByKey(rb, cnv->sharedData->staticData->name, &length, &localStatus); in ucnv_getDisplayName()
73 length=(int32_t)uprv_strlen(cnv->sharedData->staticData->name); in ucnv_getDisplayName()
74 …u_charsToUChars(cnv->sharedData->staticData->name, displayName, uprv_min(length, displayNameCapaci… in ucnv_getDisplayName()
/external/icu/icu4c/source/test/cintltst/
Dnucnvtst.c31 static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t res…
32 static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode e…
120 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err);
131 static UConverter *my_ucnv_open(const char *cnv, UErrorCode *err) in my_ucnv_open() argument
133 if(cnv && cnv[0] == '@') { in my_ucnv_open()
134 return ucnv_openPackage(loadTestData(err), cnv+1, err); in my_ucnv_open()
136 return ucnv_open(cnv, err); in my_ucnv_open()
176 TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], cons… in TestNextUChar() argument
186 c=ucnv_getNextUChar(cnv, &s, limit, &errorCode); in TestNextUChar()
206 TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, con… in TestNextUCharError() argument
[all …]
Dccapitst.c403 UConverter *cnv=NULL; in TestConvert() local
405 cnv=ucnv_open("ibm-949,Madhu", &err); in TestConvert()
409 ucnv_close(cnv); in TestConvert()
674 UConverter *cnv=ucnv_open("ISO_2022", &err); in TestConvert() local
678 c=ucnv_getNextUChar(cnv, &source, limit, &err); in TestConvert()
682 ucnv_reset(cnv); in TestConvert()
683 ucnv_close(cnv); in TestConvert()
1182 UConverter *cnv; in TestAlias() local
1190 cnv = ucnv_open(name, &status); in TestAlias()
1197 if (strcmp(ucnv_getName(cnv, &status), name) != 0 in TestAlias()
[all …]
/external/icu/icu4c/source/test/testdata/
Dtestdata.mak33cnv" "$(TESTDATABLD)\test1bmp.cnv" "$(TESTDATABLD)\test2.cnv" "$(TESTDATABLD)\test3.cnv" "$(TESTDA…
59 test1.cnv
60 test1bmp.cnv
61 test2.cnv
62 test3.cnv
63 test4.cnv
64 test4x.cnv
65 test5.cnv
66 ibm9027.cnv
132 "$(TESTDATABLD)\test1.cnv": "$(TESTDATA)\test1.ucm"
[all …]
/external/icu/icu4c/source/test/intltest/
Dconvtest.cpp379 LocalUConverterPointer cnv; in TestGetUnicodeSet() local
450 cnv.adoptInstead(cnv_open(charset, errorCode)); in TestGetUnicodeSet()
458 … ucnv_getUnicodeSet(cnv.getAlias(), cnvSetPtr->toUSet(), (UConverterUnicodeSet)which, &errorCode); in TestGetUnicodeSet()
579 LocalUConverterPointer cnv; in TestGetUnicodeSet2() local
584 cnv.adoptInstead(cnv_open(cnvNames[i], errorCode)); in TestGetUnicodeSet2()
590 … ucnv_setFromUCallBack(cnv.getAlias(), getUnicodeSetCallback, &expected, NULL, NULL, &errorCode); in TestGetUnicodeSet2()
598 ucnv_setFallback(cnv.getAlias(), TRUE); in TestGetUnicodeSet2()
606 …ucnv_fromUnicode(cnv.getAlias(), &t, buffer+sizeof(buffer), (const UChar **)&s, s0+s0Length, NULL,… in TestGetUnicodeSet2()
617 ucnv_getUnicodeSet(cnv.getAlias(), set.toUSet(), which, &errorCode); in TestGetUnicodeSet2()
693 UConverter *cnv = cnv_open(cnv_name, status); in TestDefaultIgnorableCallback() local
[all …]
/external/icu/libandroidicu/include/unicode/
Ducnv.h541 ucnv_safeClone(const UConverter *cnv,
667 ucnv_setSubstString(UConverter *cnv,
1001 ucnv_getUnicodeSet(const UConverter *cnv,
1249 ucnv_fromUChars(UConverter *cnv,
1281 ucnv_toUChars(UConverter *cnv,
1620 UConverter *cnv,
1671 ucnv_fromAlgorithmic(UConverter *cnv,
1915 ucnv_fixFileSeparator(const UConverter *cnv, UChar *source, int32_t sourceLen);
1926 ucnv_isAmbiguous(const UConverter *cnv);
1944 ucnv_setFallback(UConverter *cnv, UBool usesFallback);
[all …]
/external/icu/icu4c/source/common/unicode/
Ducnv.h541 ucnv_safeClone(const UConverter *cnv,
667 ucnv_setSubstString(UConverter *cnv,
1001 ucnv_getUnicodeSet(const UConverter *cnv,
1249 ucnv_fromUChars(UConverter *cnv,
1281 ucnv_toUChars(UConverter *cnv,
1620 UConverter *cnv,
1671 ucnv_fromAlgorithmic(UConverter *cnv,
1915 ucnv_fixFileSeparator(const UConverter *cnv, UChar *source, int32_t sourceLen);
1926 ucnv_isAmbiguous(const UConverter *cnv);
1944 ucnv_setFallback(UConverter *cnv, UBool usesFallback);
[all …]
/external/icu/icu4c/source/test/perf/utfperf/
Dutfperf.cpp129 cnv=ucnv_open(testcase.charset, &errorCode); in Command()
133 ucnv_setFromUCallBack(cnv, fromUCallback, NULL, NULL, NULL, &errorCode); in Command()
138 ucnv_close(cnv); in ~Command()
150 UConverter *cnv; member in Command
174 ucnv_reset(cnv); in call()
191 ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode); in call()
205 ucnv_toUnicode(cnv, &pOut, pOutLimit,&p, pInter,NULL, flush,pErrorCode); in call()
238 ucnv_resetFromUnicode(cnv); in call()
250 ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode); in call()
293 ucnv_resetFromUnicode(cnv); in call()
[all …]
/external/python/cpython3/Modules/_ctypes/
Dcallbacks.c158 PyObject *cnv = PySequence_GetItem(converters, i); in _CallPythonObject() local
160 if (cnv) in _CallPythonObject()
161 dict = PyType_stgdict(cnv); in _CallPythonObject()
167 if (dict && dict->getfunc && !_ctypes_simple_instance(cnv)) { in _CallPythonObject()
171 Py_DECREF(cnv); in _CallPythonObject()
182 CDataObject *obj = (CDataObject *)_PyObject_CallNoArg(cnv); in _CallPythonObject()
185 Py_DECREF(cnv); in _CallPythonObject()
190 Py_DECREF(cnv); in _CallPythonObject()
203 Py_DECREF(cnv); in _CallPythonObject()
206 Py_DECREF(cnv); in _CallPythonObject()
[all …]

1234