changeset 18310:a97ed8efcb6a

(detect_coding_iso2022): Initilize mask correctly.
author Kenichi Handa <handa@m17n.org>
date Wed, 18 Jun 1997 13:09:00 +0000
parents bd8b521f5218
children 8b716cb12cdd
files src/coding.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Wed Jun 18 13:06:17 1997 +0000
+++ b/src/coding.c	Wed Jun 18 13:09:00 1997 +0000
@@ -593,7 +593,10 @@
 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 @@
 				  || (*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;