changeset 25611:9c9d13747ffb

(CHAR_COMPONENTS_VALID_P): Fix for ASCII.
author Kenichi Handa <handa@m17n.org>
date Wed, 08 Sep 1999 11:49:34 +0000
parents 5f9f35400f70
children 7f8ebd701925
files src/charset.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c	Wed Sep 08 11:16:02 1999 +0000
+++ b/src/charset.c	Wed Sep 08 11:49:34 1999 +0000
@@ -212,9 +212,11 @@
 
 /* 1 if CHARSET, C1, and C2 compose a valid character, else 0.  */
 #define CHAR_COMPONENTS_VALID_P(charset, c1, c2)	\
-  (CHARSET_DIMENSION (charset) == 1		\
-   ? ((c1) >= 0x20 && (c1) <= 0x7F)		\
-   : ((c1) >= 0x20 && (c1) <= 0x7F && (c2) >= 0x20 && (c2) <= 0x7F))
+  (charset == CHARSET_ASCII				\
+   ? ((c1) >= 0 && (c1) <= 0x7F)			\
+   : (CHARSET_DIMENSION (charset) == 1			\
+      ? ((c1) >= 0x20 && (c1) <= 0x7F)			\
+      : ((c1) >= 0x20 && (c1) <= 0x7F && (c2) >= 0x20 && (c2) <= 0x7F)))
 
 /* Set STR a pointer to the multi-byte form of the character C.  If C
    is not a composite character, the multi-byte form is set in WORKBUF