Home | History | Annotate | Download | only in toolutil

Lines Matching refs:ucm

10 *   file name:  ucm.c
18 * This file reads a .ucm file, stores its mappings and sorts them.
19 * It implements handling of Unicode conversion mappings from .ucm files
37 #include "ucm.h"
137 * Comparing by lengths first is for compatibility with old .ucm tools
247 fprintf(stderr, "ucm error: unable to allocate reverseMap\n");
261 fprintf(stderr, "ucm error: sortTable()/uprv_sortArray() fails - %s\n",
374 "ucm error: the base table contains a mapping whose input sequence\n"
399 "ucm error: the base table contains a mapping whose input sequence\n"
491 "ucm error: the base table contains a mapping whose input sequence\n"
516 "ucm error: the base table contains a mapping whose input sequence\n"
561 fprintf(stderr, "ucm error: the base table contains mappings without precision flags\n");
565 fprintf(stderr, "ucm error: extension table contains mappings without precision flags\n");
695 ucm_separateMappings(UCMFile *ucm, UBool isSISO) {
701 table=ucm->base;
718 &ucm->states, m,
734 ucm_moveMappings(ucm->base, ucm->ext);
735 return ucm_checkBaseExt(&ucm->states, ucm->base, ucm->ext, ucm->ext, FALSE);
737 ucm_sortTable(ucm->base);
742 /* ucm parser --------------------------------------------------------------- */
764 fprintf(stderr, "ucm error: byte must be formatted as \\xXX (2 hex digits) - \"%s\"\n", line);
769 fprintf(stderr, "ucm error: too many bytes on \"%s\"\n", line);
809 fprintf(stderr, "ucm error: Unicode code point must be formatted as <UXXXX> (1..6 hex digits) - \"%s\"\n", line);
813 fprintf(stderr, "ucm error: Unicode code point must be 0..d7ff or e000..10ffff - \"%s\"\n", line);
818 fprintf(stderr, "ucm error: too many code points on \"%s\"\n", line);
826 fprintf(stderr, "ucm error: no Unicode code points on \"%s\"\n", line);
836 fprintf(stderr, "ucm error: too many UChars on \"%s\"\n", line);
849 fprintf(stderr, "ucm error: no bytes on \"%s\"\n", line);
863 fprintf(stderr, "ucm error: fallback indicator must be |0..|4 - \"%s\"\n", line);
883 fprintf(stderr, "ucm error: unable to allocate a UCMTable\n");
932 fprintf(stderr, "ucm error: unable to allocate %d UCMappings\n",
948 fprintf(stderr, "ucm error: unable to allocate %d UChar32s\n",
958 fprintf(stderr, "ucm error: unable to allocate %d bytes\n",
968 fprintf(stderr, "ucm error: too many code points in multiple-code point mappings\n");
980 fprintf(stderr, "ucm error: too many bytes in mappings with >4 charset bytes\n");
1013 UCMFile *ucm=(UCMFile *)uprv_malloc(sizeof(UCMFile));
1014 if(ucm==NULL) {
1015 fprintf(stderr, "ucm error: unable to allocate a UCMFile\n");
1019 memset(ucm, 0, sizeof(UCMFile));
1021 ucm->base=ucm_openTable();
1022 ucm->ext=ucm_openTable();
1024 ucm->states.stateFlags[0]=MBCS_STATE_FLAG_DIRECT;
1025 ucm->states.conversionType=UCNV_UNSUPPORTED_CONVERTER;
1026 ucm->states.outputType=-1;
1027 ucm->states.minCharLength=ucm->states.maxCharLength=1;
1029 return ucm;
1033 ucm_close(UCMFile *ucm) {
1034 if(ucm!=NULL) {
1035 ucm_closeTable(ucm->base);
1036 ucm_closeTable(ucm->ext);
1037 uprv_free(ucm);
1089 ucm_addMappingAuto(UCMFile *ucm
1096 fprintf(stderr, "ucm error: illegal <subchar1> |2 mapping from multiple code points\n");
1119 ucm_addMapping(ucm->base, m, codePoints, bytes);
1121 ucm_addMapping(ucm->ext, m, codePoints, bytes);
1128 ucm_addMappingFromLine(UCMFile *ucm, const char *line, UBool forBase, UCMStates *baseStates) {
1142 ucm_addMappingAuto(ucm, forBase, baseStates, &m, codePoints, bytes);
1146 ucm_readTable(UCMFile *ucm, FileStream* convFile,
1184 isOK&=ucm_addMappingFromLine(ucm, line, forBase, baseStates);