changeset 89832:e2262814a871

(CHARSET_OFFSET): New macro.
author Kenichi Handa <handa@m17n.org>
date Tue, 17 Feb 2004 00:18:01 +0000
parents 44a681ba95a1
children 31a284f9d6cf
files src/charset.h
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
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.