X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..08b89b0a244153b9f5bbb2f49c55ab0f7298122e:/icuSources/tools/makeconv/gencnvex.c diff --git a/icuSources/tools/makeconv/gencnvex.c b/icuSources/tools/makeconv/gencnvex.c index 3e69b8cb..10a0571c 100644 --- a/icuSources/tools/makeconv/gencnvex.c +++ b/icuSources/tools/makeconv/gencnvex.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2003-2007, International Business Machines +* Copyright (C) 2003-2013, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -100,6 +100,7 @@ CnvExtClose(NewConverter *cnvData) { utm_close(extData->fromUTableUChars); utm_close(extData->fromUTableValues); utm_close(extData->fromUBytes); + uprv_free(extData); } } @@ -605,7 +606,7 @@ prepareFromUMappings(UCMTable *table) { flag&=MBCS_FROM_U_EXT_MASK; m->f=flag; } - if(flag==0 || flag==1 || (flag==2 && m->bLen==1)) { + if(flag==0 || flag==1 || (flag==2 && m->bLen==1) || flag==4) { map[j++]=i; if(m->uLen>1) { @@ -671,6 +672,8 @@ getFromUBytesValue(CnvExtData *extData, UCMTable *table, UCMapping *m) { value|=(uint32_t)m->bLen<f==0) { value|=UCNV_EXT_FROM_U_ROUNDTRIP_FLAG; + } else if(m->f==4) { + value|=UCNV_EXT_FROM_U_GOOD_ONE_WAY_FLAG; } /* calculate the real UTF-16 length (see recoding in prepareFromUMappings()) */