Lines Matching refs:table
40 CnvExtAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData);
51 /* toUnicode (state table in ucm->states) */
126 /* write the header and base table name for an extension-only table */
140 /* write the header and the base table name */
291 * the toUnicode table.
293 * for the base toUnicode table but not for the base fromUnicode table.
294 * The table must be sorted.
298 reduceToUMappings(UCMTable *table) {
304 mappings=table->mappings;
305 map=table->reverseMap;
306 count=table->mappingsLength;
328 getToUnicodeValue(CnvExtData *extData, UCMTable *table, UCMapping *m) {
343 u32=UCM_GET_CODE_POINTS(table, m);
394 * One function invocation generates one section table.
399 * 2. Allocate the section table with possible optimization for linear access.
400 * 3. Write temporary version of the section table with start indexes of
402 * 4. Iterate through the table once more, and depending on the subsection length:
403 * 0: write 0 as a result value (unused byte in linear-access section table)
411 generateToUTable(CnvExtData *extData, UCMTable *table,
423 mappings=table->mappings;
424 map=table->reverseMap;
428 bytes=UCM_GET_BYTES(table, m);
435 bytes=UCM_GET_BYTES(table, m);
448 * for the root table and for fairly full tables:
452 * exception: use a compact table if count==0x100 because
460 fprintf(stderr, "error: toUnicode extension table section overflow: %ld section entries\n", (long)count);
470 /* step 3: write temporary section table with subsection starts */
472 j=0; /* section table index */
475 bytes=UCM_GET_BYTES(table, m);
481 /* write empty subsections for unused units in a linear table */
505 /* leave the value zero: empty subsection for unused unit in a linear table */
519 ucm_printMapping(table
520 ucm_printMapping(table, mappings+map[subStart], stderr);
524 defaultValue=getToUnicodeValue(extData, table, m);
531 /* write the index to the subsection table */
535 if(!generateToUTable(extData, table, subStart, subLimit, unitIndex+1, defaultValue)) {
544 * Generate the toUTable and toUUChars from the input table.
545 * The input table must be sorted, and all precision flags must be 0..3.
546 * This function will modify the table's reverseMap.
549 makeToUTable(CnvExtData *extData, UCMTable *table) {
552 toUCount=reduceToUMappings(table);
557 return generateToUTable(extData, table, 0, toUCount, 0, 0);
576 * which are irrelevant for the fromUnicode extension table.
582 * The table must be sorted.
586 prepareFromUMappings(UCMTable *table) {
592 mappings=table->mappings;
593 map=table->reverseMap;
594 count=table->mappingsLength;
618 u32=UCM_GET_CODE_POINTS(table, m);
635 getFromUBytesValue(CnvExtData *extData, UCMTable *table, UCMapping *m) {
652 bytes=UCM_GET_BYTES(table, m);
682 u16Length=U16_LENGTH(UCM_GET_CODE_POINTS(table, m)[0])+(m->uLen-2);
710 generateFromUTable(CnvExtData *extData, UCMTable *table,
723 mappings=table->mappings;
724 map=table->reverseMap;
728 uchars=(UChar *)UCM_GET_CODE_POINTS(table, m);
735 uchars=(UChar *)UCM_GET_CODE_POINTS(table, m);
756 /* step 3: write temporary section table with subsection starts */
758 j=0; /* section table index */
761 uchars=(UChar *)UCM_GET_CODE_POINTS(table, m);
792 ucm_printMapping(table, m, stderr);
793 ucm_printMapping(table, mappings+map[subStart], stderr);
797 defaultValue=getFromUBytesValue(extData, table, m);
804 /* write the index to the subsection table */
808 if(!generateFromUTable(extData, table, subStart, subLimit, unitIndex+1, defaultValue)) {
929 generateFromUTrie(CnvExtData *extData, UCMTable *table, int32_t mapLength) {
942 mappings=table->mappings;
943 map=table->reverseMap;
952 codePoints=UCM_GET_CODE_POINTS(table, m);
961 codePoints=UCM_GET_CODE_POINTS(table, m);
968 * because the table is sorted lexically
972 codePoints=UCM_GET_CODE_POINTS(table, m);
980 ucm_printMapping(table, m, stderr);
981 ucm_printMapping(table, mappings+map[subStart], stderr);
985 value=getFromUBytesValue(extData, table, m);
992 /* write the index to the subsection table */
996 if(!generateFromUTable(extData, table, subStart, subLimit, 2, value)) {
1005 * Generate the fromU data structures from the input table.
1006 * The input table must be sorted, and all precision flags must be 0..3.
1007 * This function will modify the table's reverseMap.
1010 makeFromUTable(CnvExtData *extData, UCMTable *table) {
1014 fromUCount=prepareFromUMappings(table);
1036 if(!generateFromUTrie(extData, table, fromUCount)) {
1056 CnvExtAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData) {
1059 if(table->unicodeMask&UCNV_HAS_SURROGATES) {
1069 * assume that the table is sorted
1076 makeToUTable(extData, table) &&
1077 makeFromUTable(extData, table);