summaryrefslogtreecommitdiff
path: root/src/charset.h
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-11-06 00:44:16 +0000
committerKenichi Handa <handa@m17n.org>1998-11-06 00:44:16 +0000
commitd6127b83e30a19373ca2d50c8fd4cbb07ab9b962 (patch)
treeb213afb266ddee7c496a40dfdbb909c0e530d094 /src/charset.h
parenta688bb2444e34a484d013400e6e5e6f5afdd9550 (diff)
downloademacs-d6127b83e30a19373ca2d50c8fd4cbb07ab9b962.tar.gz
(MAKE_NON_ASCII_CHAR): Check validity of CHARSET.
Diffstat (limited to 'src/charset.h')
-rw-r--r--src/charset.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/charset.h b/src/charset.h
index f03bb944811..1b33b972811 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -449,13 +449,13 @@ extern int width_by_char_head[256];
/* Return a non-ASCII character of which charset is CHARSET and
position-codes are C1 and C2. DIMENSION1 character ignores C2. */
-#define MAKE_NON_ASCII_CHAR(charset, c1, c2) \
- ((charset) == CHARSET_COMPOSITION \
- ? MAKE_COMPOSITE_CHAR (((c1) << 7) + (c2)) \
- : (CHARSET_DIMENSION (charset) == 1 \
- ? (((charset) - 0x70) << 7) | (c1) \
- : ((charset) < MIN_CHARSET_PRIVATE_DIMENSION2 \
- ? (((charset) - 0x8F) << 14) | ((c1) << 7) | (c2) \
+#define MAKE_NON_ASCII_CHAR(charset, c1, c2) \
+ ((charset) == CHARSET_COMPOSITION \
+ ? MAKE_COMPOSITE_CHAR (((c1) << 7) + (c2)) \
+ : (! CHARSET_DEFINED_P (charset) || CHARSET_DIMENSION (charset) == 1 \
+ ? (((charset) - 0x70) << 7) | (c1) \
+ : ((charset) < MIN_CHARSET_PRIVATE_DIMENSION2 \
+ ? (((charset) - 0x8F) << 14) | ((c1) << 7) | (c2) \
: (((charset) - 0xE0) << 14) | ((c1) << 7) | (c2))))
/* Return a composite character of which CMPCHAR-ID is ID. */