From: tomo Date: Sat, 18 Sep 1999 18:20:39 +0000 (+0000) Subject: (charset_get_byte1): Fix bug about 94- and 96-set. X-Git-Tag: r21-2-19-utf-2000-0_8-1~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=077b2b04891b318c45c2ee57dcd71208a45665bb;p=chise%2Fxemacs-chise.git- (charset_get_byte1): Fix bug about 94- and 96-set. (Fmake_reverse_direction_charset): Inherit CHARSET_DECODING_TABLE, CHARSET_UCS_MIN, CHARSET_UCS_MAX and CHARSET_CODE_OFFSET. --- diff --git a/src/mule-charset.c b/src/mule-charset.c index 08476c4..22f6874 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1664,14 +1664,14 @@ charset_get_byte1 (Lisp_Object charset, Emchar ch) if (((d = ch - (MIN_CHAR_94 + (XCHARSET_FINAL (charset) - '0') * 94)) >= 0) && (d < 94)) - return d + 32; + return d + 33; } else if (XCHARSET_CHARS (charset) == 96) { if (((d = ch - (MIN_CHAR_96 + (XCHARSET_FINAL (charset) - '0') * 96)) >= 0) && (d < 96)) - return d + 33; + return d + 32; } else return 0; @@ -2036,8 +2036,7 @@ character set. Recognized properties are: charset = make_charset (id, name, type, columns, graphic, final, direction, short_name, long_name, doc_string, registry, - NULL, - 0, 0, 0); + NULL, 0, 0, 0); if (!NILP (ccl_program)) XCHARSET_CCL_PROGRAM (charset) = ccl_program; return charset; @@ -2085,8 +2084,10 @@ NEW-NAME is the name of the new charset. Return the new charset. new_charset = make_charset (id, new_name, type, columns, graphic, final, direction, short_name, long_name, doc_string, registry, - NULL, - 0, 0, 0); + CHARSET_DECODING_TABLE(cs), + CHARSET_UCS_MIN(cs), + CHARSET_UCS_MAX(cs), + CHARSET_CODE_OFFSET(cs)); CHARSET_REVERSE_DIRECTION_CHARSET (cs) = new_charset; XCHARSET_REVERSE_DIRECTION_CHARSET (new_charset) = charset;