comparison src/coding.c @ 89676:cf1ff36f92dc

(detect_coding): Fix previous change. (detect_coding_system): Likewise.
author Kenichi Handa <handa@m17n.org>
date Tue, 02 Dec 2003 06:57:17 +0000
parents 9010cefe8d29
children 9bfefb13fe83
comparison
equal deleted inserted replaced
89675:4a257267ef66 89676:cf1ff36f92dc
5227 || c == ISO_CODE_ESC 5227 || c == ISO_CODE_ESC
5228 || c == ISO_CODE_SI 5228 || c == ISO_CODE_SI
5229 || c == ISO_CODE_SO))) 5229 || c == ISO_CODE_SO)))
5230 break; 5230 break;
5231 } 5231 }
5232 /* Skipped bytes must be even for utf-16 detector. */
5233 if (i % 2)
5234 src--;
5235 coding->head_ascii = src - (coding->source + coding->consumed); 5232 coding->head_ascii = src - (coding->source + coding->consumed);
5236 5233
5237 if (coding->head_ascii < coding->src_bytes) 5234 if (coding->head_ascii < coding->src_bytes)
5238 { 5235 {
5239 struct coding_detection_info detect_info; 5236 struct coding_detection_info detect_info;
6709 || c == ISO_CODE_ESC 6706 || c == ISO_CODE_ESC
6710 || c == ISO_CODE_SI 6707 || c == ISO_CODE_SI
6711 || c == ISO_CODE_SO))) 6708 || c == ISO_CODE_SO)))
6712 break; 6709 break;
6713 } 6710 }
6714 /* Skipped bytes must be even for utf-16 detecor. */
6715 if (i % 2)
6716 src--;
6717 coding.head_ascii = src - coding.source; 6711 coding.head_ascii = src - coding.source;
6718 6712
6719 if (src < src_end) 6713 if (src < src_end)
6720 for (i = 0; i < coding_category_raw_text; i++) 6714 for (i = 0; i < coding_category_raw_text; i++)
6721 { 6715 {