changeset 20151:82ca32c55fa3

(CHAR_VALID_P): Renamed from VALID_CHAR_P, new argument GENERICP. Call char_valid_p for a non-ASCII character.
author Kenichi Handa <handa@m17n.org>
date Thu, 23 Oct 1997 12:01:50 +0000
parents 402b6e5f4b58
children 9a3343c36e83
files src/charset.h
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.h	Thu Oct 23 12:01:50 1997 +0000
+++ b/src/charset.h	Thu Oct 23 12:01:50 1997 +0000
@@ -462,15 +462,12 @@
    ? (c1)					 	\
    : MAKE_NON_ASCII_CHAR ((charset), (c1) & 0x7F, (c2) & 0x7F))
 
-/* 1 if C is in the range of possible character code Emacs can have.  */
-#define VALID_CHAR_P(c)							\
-  ((c) >= 0								\
-   && (SINGLE_BYTE_CHAR_P (c)						\
-       || ((c) < MIN_CHAR_COMPOSITION					\
-	   ? ((c) & CHAR_FIELD1_MASK					\
-	      ? (CHAR_FIELD2 (c) >= 32 && CHAR_FIELD3 (c) >= 32)	\
-	      : (CHAR_FIELD2 (c) >= 16 && CHAR_FIELD3 (c) >= 32))	\
-	   : (c) < MIN_CHAR_COMPOSITION + n_cmpchars)))
+/* If GENERICP is nonzero, return nonzero iff C is a valid normal or
+   generic character.  If GENERICP is zero, return nonzero iff C is a
+   valid normal character.  */
+#define CHAR_VALID_P(c, genericp)	\
+  ((c) >= 0				\
+   && (SINGLE_BYTE_CHAR_P (c) || char_valid_p (c, genericp)))
 
 /* The charset of non-ASCII character C is stored in CHARSET, and the
    position-codes of C are stored in C1 and C2.