-/* Given a translate table TRT, store the inverse mapping into INVERSE.
- Since TRT is not one-to-one, INVERSE is not a simple mapping.
- Instead, it divides the space of characters into equivalence classes.
- All characters in a given class form one circular list, chained through
- the elements of INVERSE. */
+/* The following functions are called in map_char_table. */
+
+/* Set CANON char-table element for C to a translated ELT by UP and
+ DOWN char-tables. This is done only when ELT is a character. The
+ char-tables CANON, UP, and DOWN are in CASE_TABLE. */
+
+static void
+set_canon (case_table, c, elt)
+ Lisp_Object case_table, c, elt;
+{
+ Lisp_Object up = XCHAR_TABLE (case_table)->extras[0];
+ Lisp_Object canon = XCHAR_TABLE (case_table)->extras[1];
+
+ if (NATNUMP (elt))
+ Faset (canon, c, Faref (case_table, Faref (up, elt)));
+}
+
+/* Set elements of char-table TABLE for C to C itself. This is done
+ only when ELT is a character. This is called in map_char_table. */