]> git.eshelyaron.com Git - emacs.git/commitdiff
(CHARSET_OFFSET): New macro.
authorKenichi Handa <handa@m17n.org>
Tue, 17 Feb 2004 00:18:01 +0000 (00:18 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 17 Feb 2004 00:18:01 +0000 (00:18 +0000)
src/charset.h

index 0965bb29d2cd4712eacaf814bd64e50fb7d21997..a8e162d1a30737f1a2e6bad160ebc7d854a70083 100644 (file)
@@ -412,6 +412,15 @@ extern Lisp_Object Vchar_charset_set;
    : decode_char ((charset), (code)))
 
 
+/* If CHARSET is a simple offset base charset, return it's offset,
+   otherwise return -1.  */
+#define CHARSET_OFFSET(charset)                                \
+  (((charset)->method == CHARSET_METHOD_OFFSET         \
+    && (charset)->code_linear_p                                \
+    && ! (charset)->unified_p)                         \
+   ? (charset)->code_offset - (charset)->min_code      \
+   : -1)
+
 extern Lisp_Object charset_work;
 
 /* Return a code point of CHAR in CHARSET.