summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-06-18 13:09:00 +0000
committerKenichi Handa <handa@m17n.org>1997-06-18 13:09:00 +0000
commit765a2ca545241008efc95cb47b68424c765d3b8b (patch)
tree3c54ed6f9a8ec4e9fc775eb7b3b7a64ccd44994f /src/coding.c
parent650e8505e2bca55d1df1f88158d316f5079c40cb (diff)
(detect_coding_iso2022): Initilize mask correctly.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c
index 99d82dccd0a..77805bdbfdd 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -593,7 +593,10 @@ int
detect_coding_iso2022 (src, src_end)
unsigned char *src, *src_end;
{
- int mask = CODING_CATEGORY_MASK_ANY;
+ int mask = (CODING_CATEGORY_MASK_ISO_7
+ | CODING_CATEGORY_MASK_ISO_8_1
+ | CODING_CATEGORY_MASK_ISO_8_2
+ | CODING_CATEGORY_MASK_ISO_ELSE);
int g1 = 0; /* 1 iff designating to G1. */
int c, i;
@@ -612,10 +615,6 @@ detect_coding_iso2022 (src, src_end)
|| (*src >= '@' && *src <= 'B'))))
{
/* Valid designation sequence. */
- mask &= (CODING_CATEGORY_MASK_ISO_7
- | CODING_CATEGORY_MASK_ISO_8_1
- | CODING_CATEGORY_MASK_ISO_8_2
- | CODING_CATEGORY_MASK_ISO_ELSE);
if (c == ')' || (c == '$' && *src == ')'))
{
g1 = 1;