# HG changeset patch
# User Kenichi Handa <handa@m17n.org>
# Date 910313056 0
# Node ID 06e64578176283d599213480381fb5d0b5ec8b3f
# Parent  d87960db41e9b25a4ddb321ee7885850d83be4a1
(MAKE_NON_ASCII_CHAR): Check validity of CHARSET.

diff -r d87960db41e9 -r 06e645781762 src/charset.h
--- a/src/charset.h	Fri Nov 06 00:44:16 1998 +0000
+++ b/src/charset.h	Fri Nov 06 00:44:16 1998 +0000
@@ -449,13 +449,13 @@
 
 /* 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.  */