aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa1997-06-18 13:09:00 +0000
committerKenichi Handa1997-06-18 13:09:00 +0000
commit765a2ca545241008efc95cb47b68424c765d3b8b (patch)
tree3c54ed6f9a8ec4e9fc775eb7b3b7a64ccd44994f /src/coding.c
parent650e8505e2bca55d1df1f88158d316f5079c40cb (diff)
downloademacs-765a2ca545241008efc95cb47b68424c765d3b8b.tar.gz
emacs-765a2ca545241008efc95cb47b68424c765d3b8b.zip
(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
593detect_coding_iso2022 (src, src_end) 593detect_coding_iso2022 (src, src_end)
594 unsigned char *src, *src_end; 594 unsigned char *src, *src_end;
595{ 595{
596 int mask = CODING_CATEGORY_MASK_ANY; 596 int mask = (CODING_CATEGORY_MASK_ISO_7
597 | CODING_CATEGORY_MASK_ISO_8_1
598 | CODING_CATEGORY_MASK_ISO_8_2
599 | CODING_CATEGORY_MASK_ISO_ELSE);
597 int g1 = 0; /* 1 iff designating to G1. */ 600 int g1 = 0; /* 1 iff designating to G1. */
598 int c, i; 601 int c, i;
599 602
@@ -612,10 +615,6 @@ detect_coding_iso2022 (src, src_end)
612 || (*src >= '@' && *src <= 'B')))) 615 || (*src >= '@' && *src <= 'B'))))
613 { 616 {
614 /* Valid designation sequence. */ 617 /* Valid designation sequence. */
615 mask &= (CODING_CATEGORY_MASK_ISO_7
616 | CODING_CATEGORY_MASK_ISO_8_1
617 | CODING_CATEGORY_MASK_ISO_8_2
618 | CODING_CATEGORY_MASK_ISO_ELSE);
619 if (c == ')' || (c == '$' && *src == ')')) 618 if (c == ')' || (c == '$' && *src == ')'))
620 { 619 {
621 g1 = 1; 620 g1 = 1;