diff src/charset.h @ 89832:e2262814a871

(CHARSET_OFFSET): New macro.
author Kenichi Handa <handa@m17n.org>
date Tue, 17 Feb 2004 00:18:01 +0000
parents 109e674576b8
children c4c848b80f86
line wrap: on
line diff
--- a/src/charset.h	Mon Feb 16 00:11:54 2004 +0000
+++ b/src/charset.h	Tue Feb 17 00:18:01 2004 +0000
@@ -412,6 +412,15 @@
    : 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.