loosely based on the original Mule.
Jareth Hein: fixed a couple of bugs in the implementation, and
added regex support for categories with check_category_at
+ MORIOKA Tomohiko: Rewritten for XEmacs UTF-2000
*/
#include <config.h>
#if defined(HAVE_DATABASE)
EXFUN (Fload_char_attribute_table, 1);
EXFUN (Fmap_char_attribute, 3);
+
+Lisp_Object Vchar_db_stingy_mode;
#endif
#define BT_UINT8_MIN 0
Lisp_Object db_file
= char_attribute_system_db_file (Qsystem_char_id, attribute, 0);
- cit->db = Fopen_database (db_file, Qnil, Qnil, build_string ("r"), Qnil);
+ cit->db = Fopen_database (db_file, Qnil, Qnil,
+ build_string ("r"), Qnil);
}
if (!NILP (cit->db))
{
val = Fread (val);
else
val = Qunbound;
+ if (!NILP (Vchar_db_stingy_mode))
+ {
+ Fclose_database (cit->db);
+ cit->db = Qnil;
+ }
return val;
}
}
{
Lisp_Object c = Fread (key);
Emchar code = XCHAR (c);
- Lisp_Object ret = get_char_id_table (char_attribute_table_to_load, code);
+ Lisp_Object ret = get_char_id_table_0 (char_attribute_table_to_load, code);
if (EQ (ret, Qunloaded))
put_char_id_table_0 (char_attribute_table_to_load, code, Fread (value));
Lisp_Object db_file
= char_attribute_system_db_file (Qsystem_char_id, attribute, 0);
- ct->db = Fopen_database (db_file, Qnil, Qnil, build_string ("r"), Qnil);
+ ct->db = Fopen_database (db_file, Qnil, Qnil,
+ build_string ("r"), Qnil);
}
if (!NILP (ct->db))
{
staticpro (&Vcharacter_variant_table);
Vcharacter_variant_table = make_char_id_table (Qunbound);
+
+#ifdef HAVE_DATABASE
+ DEFVAR_LISP ("char-db-stingy-mode", &Vchar_db_stingy_mode /*
+*/ );
+ Vchar_db_stingy_mode = Qt;
+#endif /* HAVE_DATABASE */
#endif
/* DO NOT staticpro this. It works just like Vweak_hash_tables. */
Vall_syntax_tables = Qnil;