/*
*******************************************************************************
*
-* Copyright (C) 2003-2009, International Business Machines
+* Copyright (C) 2003-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
return result;
}
- if(0<=mb->f && mb->f<=2) {
+ if((0<=mb->f && mb->f<=2) || mb->f==4) {
break;
}
return result;
}
- if(0<=me->f && me->f<=2) {
+ if((0<=me->f && me->f<=2) || me->f==4) {
break;
}
break;
} else if(*s=='|') {
f=(int8_t)(s[1]-'0');
- if((uint8_t)f>3) {
- fprintf(stderr, "ucm error: fallback indicator must be |0..|3 - \"%s\"\n", line);
+ if((uint8_t)f>4) {
+ fprintf(stderr, "ucm error: fallback indicator must be |0..|4 - \"%s\"\n", line);
return FALSE;
}
break;
U_CAPI void U_EXPORT2
ucm_close(UCMFile *ucm) {
if(ucm!=NULL) {
- uprv_free(ucm->base);
- uprv_free(ucm->ext);
+ ucm_closeTable(ucm->base);
+ ucm_closeTable(ucm->ext);
uprv_free(ucm);
}
}
/*
* Suitable for an ICU conversion base table means:
* - a 1:1 mapping (1 Unicode code point : 1 byte sequence)
+ * - precision flag 0..3
* - SBCS: any 1:1 mapping
* (the table stores additional bits to distinguish mapping types)
* - MBCS: not a |2 SUB mapping for <subchar1>
* makeconv uses a hack for moving mappings only for the fromUnicode table
* that only works with non-negative values of f.
*/
- if( m->uLen==1 && count==1 &&
+ if( m->uLen==1 && count==1 && m->f<=3 &&
(baseStates->maxCharLength==1 ||
!((m->f==2 && m->bLen==1) ||
(m->f==1 && bytes[0]==0) ||
char line[500];
char *end;
UBool isOK;
-
+
if(U_FAILURE(*pErrorCode)) {
return;
}