-Lisp_Object
-get_char_id_table (Emchar ch, Lisp_Object table)
-{
- unsigned int code = ch;
-
- return
- get_byte_table
- (get_byte_table
- (get_byte_table
- (get_byte_table
- (XCHAR_ID_TABLE (table)->table,
- (unsigned char)(code >> 24)),
- (unsigned char) (code >> 16)),
- (unsigned char) (code >> 8)),
- (unsigned char) code);
-}
-
-void
-put_char_id_table (Emchar ch, Lisp_Object value, Lisp_Object table)
-{
- unsigned int code = ch;
- Lisp_Object table1, table2, table3, table4;
-
- table1 = XCHAR_ID_TABLE (table)->table;
- table2 = get_byte_table (table1, (unsigned char)(code >> 24));
- table3 = get_byte_table (table2, (unsigned char)(code >> 16));
- table4 = get_byte_table (table3, (unsigned char)(code >> 8));
-
- table4 = put_byte_table (table4, (unsigned char)code, value);
- table3 = put_byte_table (table3, (unsigned char)(code >> 8), table4);
- table2 = put_byte_table (table2, (unsigned char)(code >> 16), table3);
- XCHAR_ID_TABLE (table)->table
- = put_byte_table (table1, (unsigned char)(code >> 24), table2);
-}
-
-/* Map FN (with client data ARG) in char table CT.
- Mapping stops the first time FN returns non-zero, and that value
- becomes the return value of map_char_id_table(). */
-int
-map_char_id_table (Lisp_Char_ID_Table *ct,
- int (*fn) (Emchar c, Lisp_Object val, void *arg),
- void *arg);
-int
-map_char_id_table (Lisp_Char_ID_Table *ct,
- int (*fn) (Emchar c, Lisp_Object val, void *arg),
- void *arg)
-{
- Lisp_Object v = ct->table;
-
- if (UINT8_BYTE_TABLE_P (v))
- return map_over_uint8_byte_table (XUINT8_BYTE_TABLE(v), fn, arg, 0, 3);
- else if (UINT16_BYTE_TABLE_P (v))
- return map_over_uint16_byte_table (XUINT16_BYTE_TABLE(v), fn, arg, 0, 3);
- else if (BYTE_TABLE_P (v))
- return map_over_byte_table (XBYTE_TABLE(v), fn, arg, 0, 3);
- else if (!UNBOUNDP (v))
- {
- int unit = 1 << 24;
- Emchar c = 0;
- Emchar c1 = c + unit;
- int retval;
-
- for (retval = 0; c < c1 && retval == 0; c++)
- retval = (fn) (c, v, arg);
- }
- return 0;
-}
-
-struct slow_map_char_id_table_arg
-{
- Lisp_Object function;
- Lisp_Object retval;
-};
-
-static int
-slow_map_char_id_table_fun (Emchar c, Lisp_Object val, void *arg)
-{
- struct slow_map_char_id_table_arg *closure =
- (struct slow_map_char_id_table_arg *) arg;
-
- closure->retval = call2 (closure->function, make_char (c), val);
- return !NILP (closure->retval);
-}
-
-
-Lisp_Object Vchar_attribute_hash_table;