Commit 63f4d579 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(CHAR_COMPONENTS_VALID_P): Fix for ASCII.

parent 0ad3f83d
......@@ -212,9 +212,11 @@ invalid_character (c)
/* 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment