Home | History | Annotate | Download | only in makeconv

Lines Matching refs:table

41 CnvExtAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData);
52 /* toUnicode (state table in ucm->states) */
127 /* write the header and base table name for an extension-only table */
141 /* write the header and the base table name */
292 * the toUnicode table.
294 * for the base toUnicode table but not for the base fromUnicode table.
295 * The table must be sorted.
299 reduceToUMappings(UCMTable *table) {
305 mappings=table->mappings;
306 map=table->reverseMap;
307 count=table->mappingsLength;
329 getToUnicodeValue(CnvExtData *extData, UCMTable *table, UCMapping *m) {
344 u32=UCM_GET_CODE_POINTS(table, m);
395 * One function invocation generates one section table.
400 * 2. Allocate the section table with possible optimization for linear access.
401 * 3. Write temporary version of the section table with start indexes of
403 * 4. Iterate through the table once more, and depending on the subsection length:
404 * 0: write 0 as a result value (unused byte in linear-access section table)
412 generateToUTable(CnvExtData *extData, UCMTable *table,
424 mappings=table->mappings;
425 map=table->reverseMap;
429 bytes=UCM_GET_BYTES(table, m);
436 bytes=UCM_GET_BYTES(table, m);
449 * for the root table and for fairly full tables:
453 * exception: use a compact table if count==0x100 because
461 fprintf(stderr, "error: toUnicode extension table section overflow: %ld section entries\n", (long)count);
471 /* step 3: write temporary section table with subsection starts */
473 j=0; /* section table index */
476 bytes=UCM_GET_BYTES(table, m);
482 /* write empty subsections for unused units in a linear table */
506 /* leave the value zero: empty subsection for unused unit in a linear table */
520 ucm_printMapping(table, m, stderr);
521 table, mappings+map[subStart], stderr);
525 defaultValue=getToUnicodeValue(extData, table, m);
532 /* write the index to the subsection table */
536 if(!generateToUTable(extData, table, subStart, subLimit, unitIndex+1, defaultValue)) {
545 * Generate the toUTable and toUUChars from the input table.
546 * The input table must be sorted, and all precision flags must be 0..3.
547 * This function will modify the table's reverseMap.
550 makeToUTable(CnvExtData *extData, UCMTable *table) {
553 toUCount=reduceToUMappings(table);
558 return generateToUTable(extData, table, 0, toUCount, 0, 0);
577 * which are irrelevant for the fromUnicode extension table.
583 * The table must be sorted.
587 prepareFromUMappings(UCMTable *table) {
593 mappings=table->mappings;
594 map=table->reverseMap;
595 count=table->mappingsLength;
619 u32=UCM_GET_CODE_POINTS(table, m);
636 getFromUBytesValue(CnvExtData *extData, UCMTable *table, UCMapping *m) {
653 bytes=UCM_GET_BYTES(table, m);
683 u16Length=U16_LENGTH(UCM_GET_CODE_POINTS(table, m)[0])+(m->uLen-2);
711 generateFromUTable(CnvExtData *extData, UCMTable *table,
724 mappings=table->mappings;
725 map=table->reverseMap;
729 uchars=(UChar *)UCM_GET_CODE_POINTS(table, m);
736 uchars=(UChar *)UCM_GET_CODE_POINTS(table, m);
757 /* step 3: write temporary section table with subsection starts */
759 j=0; /* section table index */
762 uchars=(UChar *)UCM_GET_CODE_POINTS(table, m);
793 ucm_printMapping(table, m, stderr);
794 ucm_printMapping(table, mappings+map[subStart], stderr);
798 defaultValue=getFromUBytesValue(extData, table, m);
805 /* write the index to the subsection table */
809 if(!generateFromUTable(extData, table, subStart, subLimit, unitIndex+1, defaultValue)) {
930 generateFromUTrie(CnvExtData *extData, UCMTable *table, int32_t mapLength) {
943 mappings=table->mappings;
944 map=table->reverseMap;
953 codePoints=UCM_GET_CODE_POINTS(table, m);
962 codePoints=UCM_GET_CODE_POINTS(table, m);
969 * because the table is sorted lexically
973 codePoints=UCM_GET_CODE_POINTS(table, m);
981 ucm_printMapping(table, m, stderr);
982 ucm_printMapping(table, mappings+map[subStart], stderr);
986 value=getFromUBytesValue(extData, table, m);
993 /* write the index to the subsection table */
997 if(!generateFromUTable(extData, table, subStart, subLimit, 2, value)) {
1006 * Generate the fromU data structures from the input table.
1007 * The input table must be sorted, and all precision flags must be 0..3.
1008 * This function will modify the table's reverseMap.
1011 makeFromUTable(CnvExtData *extData, UCMTable *table) {
1015 fromUCount=prepareFromUMappings(table);
1037 if(!generateFromUTrie(extData, table, fromUCount)) {
1057 CnvExtAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData) {
1060 if(table->unicodeMask&UCNV_HAS_SURROGATES) {
1070 * assume that the table is sorted
1077 makeToUTable(extData, table) &&
1078 makeFromUTable(extData, table);