aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2002-04-26 12:03:20 +0000
committerEli Zaretskii2002-04-26 12:03:20 +0000
commitd37478d0d7bf30c941bd5accd922a54dea0f49c8 (patch)
treec00481ba59ae72ff714f6a51777beb3e5dba127a /src
parent3ae62f22e0140acfbc54ed3a8dcd181904479293 (diff)
downloademacs-d37478d0d7bf30c941bd5accd922a54dea0f49c8.tar.gz
emacs-d37478d0d7bf30c941bd5accd922a54dea0f49c8.zip
(CHAR_COMPONENTS_VALID_P): Tell in a comment that some invalid pairs are
intentionally allowed.
Diffstat (limited to 'src')
-rw-r--r--src/charset.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c
index 818457f8e1b..118d5fed9ba 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -143,7 +143,10 @@ invalid_character (c)
143 (charset) = (str)[1], (c1) = (str)[2] & 0x7F, (c2) = (str)[3] & 0x7F; \ 143 (charset) = (str)[1], (c1) = (str)[2] & 0x7F, (c2) = (str)[3] & 0x7F; \
144 } while (0) 144 } while (0)
145 145
146/* 1 if CHARSET, C1, and C2 compose a valid character, else 0. */ 146/* 1 if CHARSET, C1, and C2 compose a valid character, else 0.
147 Note that this intentionally allows invalid components, such
148 as 0xA0 0xA0, because there exist many files that contain
149 such invalid byte sequences, especially in EUC-GB. */
147#define CHAR_COMPONENTS_VALID_P(charset, c1, c2) \ 150#define CHAR_COMPONENTS_VALID_P(charset, c1, c2) \
148 ((charset) == CHARSET_ASCII \ 151 ((charset) == CHARSET_ASCII \
149 ? ((c1) >= 0 && (c1) <= 0x7F) \ 152 ? ((c1) >= 0 && (c1) <= 0x7F) \