comparison src/coding.c @ 29299:b33b38d81020

(detect_coding_iso2022): Fix code for checking CODING_CATEGORY_MASK_ISO_8_2.
author Kenichi Handa <handa@m17n.org>
date Tue, 30 May 2000 07:40:59 +0000
parents b4ea9178e480
children ebf778ab6b42
comparison
equal deleted inserted replaced
29298:523600d09bf8 29299:b33b38d81020
985 else 985 else
986 return 0; 986 return 0;
987 } 987 }
988 else 988 else
989 { 989 {
990 unsigned char *src_begin = src;
991
992 mask &= ~(CODING_CATEGORY_MASK_ISO_7BIT 990 mask &= ~(CODING_CATEGORY_MASK_ISO_7BIT
993 | CODING_CATEGORY_MASK_ISO_7_ELSE); 991 | CODING_CATEGORY_MASK_ISO_7_ELSE);
994 mask_found |= CODING_CATEGORY_MASK_ISO_8_1; 992 mask_found |= CODING_CATEGORY_MASK_ISO_8_1;
995 /* Check the length of succeeding codes of the range 993 /* Check the length of succeeding codes of the range
996 0xA0..0FF. If the byte length is odd, we exclude 994 0xA0..0FF. If the byte length is odd, we exclude
997 CODING_CATEGORY_MASK_ISO_8_2. We can check this only 995 CODING_CATEGORY_MASK_ISO_8_2. We can check this only
998 when we are not single shifting. */ 996 when we are not single shifting. */
999 if (!single_shifting 997 if (!single_shifting
1000 && mask & CODING_CATEGORY_MASK_ISO_8_2) 998 && mask & CODING_CATEGORY_MASK_ISO_8_2)
1001 { 999 {
1002 int i = 0; 1000 int i = 1;
1003 while (src < src_end) 1001 while (src < src_end)
1004 { 1002 {
1005 ONE_MORE_BYTE (c); 1003 ONE_MORE_BYTE (c);
1006 if (c < 0xA0) 1004 if (c < 0xA0)
1007 break; 1005 break;