From 85bde9e7b19f5c55a51c61b91103704157a0d64e Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 1 Sep 1999 18:39:20 +0000 Subject: [PATCH] (c2mu): Use `MAKE_CHAR', `Vcharset_japanese_jisx0212' and `Vcharset_japanese_jisx0208' instead of `MULE_CHAR_PRIVATE_OFFSET', `LEADING_BYTE_JAPANESE_JISX0212', `LEADING_BYTE_JAPANESE_JISX0208' and `FIELD1_TO_OFFICIAL_LEADING_BYTE'. (m2c): Use `BREAKUP_CHAR' and `XCHARSET_FINAL'. --- src/mule-canna.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mule-canna.c b/src/mule-canna.c index 39ae702..839ab98 100644 --- a/src/mule-canna.c +++ b/src/mule-canna.c @@ -1791,17 +1791,13 @@ c2mu (unsigned char *cp, int l, unsigned char *mp) } else if (ch == ISO_CODE_SS3) { - chr = MULE_CHAR_PRIVATE_OFFSET - | ( (LEADING_BYTE_JAPANESE_JISX0212 - - FIELD1_TO_OFFICIAL_LEADING_BYTE) << 14 ) - | (((*cp++) & 0x7f) << 7) | ((*cp++) & 0x7f); + chr = MAKE_CHAR (Vcharset_japanese_jisx0212, + (*cp++) & 0x7f, (*cp++) & 0x7f); } else if (ch & 0x80) { - chr = MULE_CHAR_PRIVATE_OFFSET - | ( (LEADING_BYTE_JAPANESE_JISX0208 - - FIELD1_TO_OFFICIAL_LEADING_BYTE) << 14 ) - | ((ch & 0x7f) << 7) | ((*cp++) & 0x7f); + chr = MAKE_CHAR (Vcharset_japanese_jisx0208, + ch & 0x7f, (*cp++) & 0x7f); } else { @@ -1938,14 +1934,18 @@ m2c (unsigned char *mp, int l, unsigned char *cp) } else { - fb = (chr >> 14) & 0x7f; - switch ( fb ) + Lisp_Object charset; + int c1, c2; + + BREAKUP_CHAR (chr, charset, c1, c2); + fb = XCHARSET_FINAL (charset); + switch (fb) { case 'D': *cp++ = ISO_CODE_SS3; default: - *cp++ = ( (chr >> 7) & 0x7f ) | 0x80; - *cp++ = ( chr & 0x7f ) | 0x80; + *cp++ = c1; + *cp++ = c2; } } #else -- 1.7.10.4