+#ifdef UTF2000
+
+INLINE_HEADER void
+put_char_id_table_0 (Lisp_Char_Table* cit, Emchar code, Lisp_Object value);
+INLINE_HEADER void
+put_char_id_table_0 (Lisp_Char_Table* cit, Emchar code, Lisp_Object value)
+{
+ Lisp_Object table1, table2, table3, table4;
+
+ table1 = cit->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);
+ cit->table = put_byte_table (table1, (unsigned char)(code >> 24), table2);
+}
+
+#ifdef HAVE_CHISE
+Lisp_Object load_char_attribute_maybe (Lisp_Char_Table* cit, Emchar ch);
+
+#ifdef HAVE_LIBCHISE
+COS_object load_char_attribute_maybe_cos (Lisp_Char_Table* cit, Emchar ch);
+#endif
+
+#ifndef HAVE_LIBCHISE
+extern Lisp_Object Qsystem_char_id;
+
+Lisp_Object
+char_attribute_system_db_file (Lisp_Object key_type, Lisp_Object attribute,
+ int writing_mode);
+#endif /* not HAVE_LIBCHISE */
+#endif /* HAVE_CHISE */
+
+INLINE_HEADER Lisp_Object
+get_char_id_table_0 (Lisp_Char_Table* cit, Emchar ch);
+INLINE_HEADER Lisp_Object
+get_char_id_table_0 (Lisp_Char_Table* cit, Emchar ch)
+{
+ return get_byte_table (get_byte_table
+ (get_byte_table
+ (get_byte_table
+ (cit->table,
+ (unsigned char)(ch >> 24)),
+ (unsigned char) (ch >> 16)),
+ (unsigned char) (ch >> 8)),
+ (unsigned char) ch);
+}
+
+INLINE_HEADER Lisp_Object
+get_char_id_table (Lisp_Char_Table* cit, Emchar ch);
+INLINE_HEADER Lisp_Object
+get_char_id_table (Lisp_Char_Table* cit, Emchar ch)
+{
+ Lisp_Object val = get_char_id_table_0 (cit, ch);
+
+#ifdef HAVE_CHISE
+ if (EQ (val, Qunloaded))
+ {
+ val = load_char_attribute_maybe (cit, ch);
+ put_char_id_table_0 (cit, ch, val);
+ }
+#endif /* HAVE_CHISE */
+ if (UNBOUNDP (val))
+ return cit->default_value;
+ else
+ return val;
+}
+
+#ifdef HAVE_LIBCHISE
+INLINE_HEADER Lisp_Object
+get_char_id_table_ce (Lisp_Char_Table* cit, Emchar ch);
+INLINE_HEADER Lisp_Object
+get_char_id_table_ce (Lisp_Char_Table* cit, Emchar ch)
+{
+ Lisp_Object val = get_char_id_table_0 (cit, ch);
+
+ if (EQ (val, Qunloaded))
+ {
+#if 0
+ val = load_char_attribute_maybe (cit, ch);
+#else
+ COS_object ret = load_char_attribute_maybe_cos (cit, ch);
+ if ( ret == NULL )
+ return cit->default_value;
+ else
+ return ret;
+#endif
+ }
+ if (UNBOUNDP (val))
+ return cit->default_value;
+ else
+ return val;
+}
+#else
+#define get_char_id_table_ce(cit, ch) get_char_id_table(cit, ch)
+#endif
+
+void
+decode_char_table_range (Lisp_Object range, struct chartab_range *outrange);
+
+INLINE_HEADER void
+put_char_id_table (Lisp_Char_Table* table,
+ Lisp_Object character, Lisp_Object value);
+INLINE_HEADER void
+put_char_id_table (Lisp_Char_Table* table,
+ Lisp_Object character, Lisp_Object value)
+{
+ struct chartab_range range;
+
+ decode_char_table_range (character, &range);
+ put_char_table (table, &range, value);
+}
+
+
+EXFUN (Fget_char_attribute, 3);
+EXFUN (Fchar_feature, 5);
+
+#endif
+\f