From 1fb2d7165ff36fce87df1ff254424b9495b75ed6 Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 31 Dec 2001 14:53:19 +0000 Subject: [PATCH] (charset_code_point): Unify code about `code-offset'. --- src/mule-charset.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/mule-charset.c b/src/mule-charset.c index 924536a..c703970 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1094,11 +1094,12 @@ charset_code_point (Lisp_Object charset, Emchar ch) code = ch; if ( (min <= code) && (code <= max) ) { + int d = code - XCHARSET_CODE_OFFSET (charset); + if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x60 ) { - int m = code - min; - int row = m / 94; - int cell = m % 94 + 33; + int row = d / 94; + int cell = d % 94 + 33; if (row < 30) row += 16 + 32; @@ -1108,8 +1109,6 @@ charset_code_point (Lisp_Object charset, Emchar ch) } else if (XCHARSET_CHARS (charset) == 94) { - int d =code - XCHARSET_CODE_OFFSET (charset); - if (XCHARSET_DIMENSION (charset) == 1) return d + 33; else if (XCHARSET_DIMENSION (charset) == 2) @@ -1128,8 +1127,6 @@ charset_code_point (Lisp_Object charset, Emchar ch) } else if (XCHARSET_CHARS (charset) == 96) { - int d =code - XCHARSET_CODE_OFFSET (charset); - if (XCHARSET_DIMENSION (charset) == 1) return d + 32; else if (XCHARSET_DIMENSION (charset) == 2) -- 1.7.10.4