Lines Matching refs:table
64 ucm_printMapping(UCMTable *table, UCMapping *m, FILE *f) {
65 printMapping(m, UCM_GET_CODE_POINTS(table, m), UCM_GET_BYTES(table, m), f);
69 ucm_printTable(UCMTable *table, FILE *f, UBool byUnicode) {
73 m=table->mappings;
74 length=table->mappingsLength;
77 ucm_printMapping(table, m, f);
80 const int32_t *map=table->reverseMap;
82 ucm_printMapping(table, m+map[i], f);
212 UCMTable *table=(UCMTable *)context;
215 table, table->mappings+l,
216 table, table->mappings+r, FALSE);
268 * remove mappings with their move flag set from the base table
269 * and move some of them (with UCM_MOVE_TO_EXT) to the extension table
286 /* add the mapping to the extension table */
367 /* mark this mapping to be moved to the extension table */
372 "ucm error: the base table contains a mapping whose input sequence\n"
397 "ucm error: the base table contains a mapping whose input sequence\n"
484 /* mark this mapping to be moved to the extension table */
489 "ucm error: the base table contains a mapping whose input sequence\n"
514 "ucm error: the base table contains a mapping whose input sequence\n"
530 ucm_checkValidity(UCMTable *table, UCMStates *baseStates) {
535 m=table->mappings;
536 mLimit=m+table->mappingsLength;
540 count=ucm_countChars(baseStates, UCM_GET_BYTES(table, m), m->bLen);
542 ucm_printMapping(table, m, stderr);
557 /* if we have an extension table, we must always use precision flags */
559 table contains mappings without precision flags\n");
563 fprintf(stderr, "ucm error: extension table contains mappings without precision flags\n");
641 * (reverse) fallback codepage->Unicode, copy it to the fromU table
649 /* the table may have been reallocated */
690 /* separate extension mappings out of base table for rptp2ucm --------------- */
694 UCMTable *table;
699 table=ucm->base;
700 m=table->mappings;
701 mLimit=m+table->mappingsLength;
708 fprintf(stderr, "warning: removing illegal mapping from an SI/SO-stateful table\n");
709 ucm_printMapping(table, m, stderr);
717 UCM_GET_CODE_POINTS(table, m), UCM_GET_BYTES(table, m));
720 printMapping(m, UCM_GET_CODE_POINTS(table, m), UCM_GET_BYTES(table, m), stderr);
879 UCMTable *table=(UCMTable *)uprv_malloc(sizeof(UCMTable));
880 if(table==NULL) {
885 memset(table, 0, sizeof(UCMTable));
886 return table;
890 ucm_closeTable(UCMTable *table) {
891 if(table!=NULL) {
892 uprv_free(table->mappings);
893 uprv_free(table->codePoints);
894 uprv_free(table->bytes);
895 uprv_free(table->reverseMap);
896 uprv_free(table);
901 ucm_resetTable(UCMTable *table) {
902 if(table!=NULL) {
903 table->mappingsLength=0;
904 table->flagsType=0;
905 table->unicodeMask=0;
906 table->bytesLength=table->codePointsLength=0;
907 table->isSorted=FALSE;
912 ucm_addMapping(UCMTable *table,
920 if(table->mappingsLength>=table->mappingsCapacity) {
922 if(table->mappingsCapacity==0) {
923 table->mappingsCapacity=1000;
925 table->mappingsCapacity*=10;
927 table->mappings=(UCMapping *)uprv_realloc(table->mappings,
928 table->mappingsCapacity*sizeof(UCMapping));
929 if(table->mappings==NULL) {
931 (int)table->mappingsCapacity);
935 if(table->reverseMap!=NULL) {
937 uprv_free(table->reverseMap);
938 table->reverseMap=NULL;
942 if(m->uLen>1 && table->codePointsCapacity==0) {
943 table->codePointsCapacity=10000;
944 table->codePoints=(UChar32 *)uprv_malloc(table->codePointsCapacity*4);
945 if(table->codePoints==NULL) {
947 (int)table->codePointsCapacity);
952 if(m->bLen>4 && table->bytesCapacity==0) {
953 table->bytesCapacity=10000;
954 table->bytes=(uint8_t *)uprv_malloc(table->bytesCapacity);
955 if(table->bytes==NULL) {
957 (int)table->bytesCapacity);
963 idx=table->codePointsLength;
964 table->codePointsLength+=m->uLen;
965 if(table->codePointsLength>table->codePointsCapacity) {
970 uprv_memcpy(table->codePoints+idx, codePoints, m->uLen*4);
975 idx=table->bytesLength;
976 table->bytesLength+=m->bLen;
977 if(table->bytesLength>table->bytesCapacity) {
982 uprv_memcpy(table->bytes+idx, bytes, m->bLen);
990 table->unicodeMask|=UCNV_HAS_SUPPLEMENTARY; /* there are supplementary code points */
992 table->unicodeMask|=UCNV_HAS_SURROGATES; /* there are surrogate code points */
998 table->flagsType|=UCM_FLAGS_IMPLICIT;
1000 table->flagsType|=UCM_FLAGS_EXPLICIT;
1003 tm=table->mappings+table->mappingsLength++;
1006 table->isSorted=FALSE;
1052 * Suitable for an ICU conversion base table means:
1056 * (the table stores additional bits to distinguish mapping types)
1071 * makeconv uses a hack for moving mappings only for the fromUnicode table
1080 return 0; /* suitable for a base table */
1082 return 1; /* needs to go into an extension table */
1108 /* not used - adding a mapping for an extension-only table before its base table is read */
1113 * Add the mapping to the base table if this is requested and suitable.
1114 * Otherwise, add it to the extension table.
1177 /* stop at the end of the mapping table */