From: tomo Date: Tue, 16 Jul 2002 03:01:54 +0000 (+0000) Subject: (Qcomposition): Add extern if external-DB feature is supported. X-Git-Tag: r21-2-44-utf-2000-0_19-er2-n14~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1dc8ccd9f926aef18eee80f52cc6b565dc045ad0;p=chise%2Fxemacs-chise.git (Qcomposition): Add extern if external-DB feature is supported. (Vcharacter_composition_table): Don't add extern if external-DB feature is supported. (COMPOSE_ADD_CHAR): Modify for new data-representation of character composition rule if external-DB feature is supported. --- diff --git a/src/text-coding.c b/src/text-coding.c index 53ec90c..0baa923 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -2260,7 +2260,11 @@ struct decoding_stream }; #ifdef UTF2000 +#ifdef HAVE_DATABASE +extern Lisp_Object Qcomposition; +#else extern Lisp_Object Vcharacter_composition_table; +#endif INLINE_HEADER void decode_flush_er_chars (struct decoding_stream *str, unsigned_char_dynarr* dst); @@ -2405,11 +2409,22 @@ COMPOSE_ADD_CHAR (struct decoding_stream *str, { if (CODING_SYSTEM_DISABLE_COMPOSITION (str->codesys)) decode_add_er_char (str, character, dst); - else if (!CHAR_TABLEP (str->combining_table)) + else if ( +#ifdef HAVE_DATABASE + !CONSP (str->combining_table) +#else + !CHAR_TABLEP (str->combining_table) +#endif + ) { - Lisp_Object ret - = get_char_id_table (XCHAR_TABLE(Vcharacter_composition_table), - character); + Lisp_Object ret = +#ifdef HAVE_DATABASE + Fget_char_attribute (make_char (character), Qcomposition, Qnil) +#else + get_char_id_table (XCHAR_TABLE(Vcharacter_composition_table), + character) +#endif + ; if (NILP (ret)) decode_add_er_char (str, character, dst); @@ -2422,16 +2437,26 @@ COMPOSE_ADD_CHAR (struct decoding_stream *str, } else { - Lisp_Object ret - = get_char_id_table (XCHAR_TABLE(str->combining_table), - character); + Lisp_Object ret = +#ifdef HAVE_DATABASE + Fcdr (Fassq (make_char (character), str->combining_table)) +#else + get_char_id_table (XCHAR_TABLE(str->combining_table), + character) +#endif + ; if (CHARP (ret)) { Emchar char2 = XCHARVAL (ret); ret = +#ifdef HAVE_DATABASE + Fget_char_attribute (make_char (character), Qcomposition, Qnil) +#else get_char_id_table (XCHAR_TABLE(Vcharacter_composition_table), - char2); + char2) +#endif + ; if (NILP (ret)) { decode_add_er_char (str, character, dst); @@ -2445,11 +2470,13 @@ COMPOSE_ADD_CHAR (struct decoding_stream *str, str->combining_table = ret; } } +#ifndef HAVE_DATABASE else if (CHAR_TABLEP (ret)) { str->combined_chars[str->combined_char_count++] = character; str->combining_table = ret; } +#endif else { COMPOSE_FLUSH_CHARS (str, dst);