# HG changeset patch # User Kenichi Handa # Date 1076977081 0 # Node ID e2262814a871a031dd65b9ea92adcea1df4494df # Parent 44a681ba95a1592842f01518d1dc6c7a4a88f075 (CHARSET_OFFSET): New macro. diff -r 44a681ba95a1 -r e2262814a871 src/charset.h --- 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.