comparison src/coding.c @ 102105:a5023e8bbb1e

(detect_coding): Preserve coding->mode.
author Kenichi Handa <handa@m17n.org>
date Thu, 19 Feb 2009 02:42:46 +0000
parents 4f60db600648
children db1f94e25359
comparison
equal deleted inserted replaced
102104:be12df124dbd 102105:a5023e8bbb1e
5953 void 5953 void
5954 detect_coding (coding) 5954 detect_coding (coding)
5955 struct coding_system *coding; 5955 struct coding_system *coding;
5956 { 5956 {
5957 const unsigned char *src, *src_end; 5957 const unsigned char *src, *src_end;
5958 int saved_mode = coding->mode;
5958 5959
5959 coding->consumed = coding->consumed_char = 0; 5960 coding->consumed = coding->consumed_char = 0;
5960 coding->produced = coding->produced_char = 0; 5961 coding->produced = coding->produced_char = 0;
5961 coding_set_source (coding); 5962 coding_set_source (coding);
5962 5963
6123 setup_coding_system (XCAR (coding_systems), coding); 6124 setup_coding_system (XCAR (coding_systems), coding);
6124 else if (detect_info.found & CATEGORY_MASK_UTF_16_BE) 6125 else if (detect_info.found & CATEGORY_MASK_UTF_16_BE)
6125 setup_coding_system (XCDR (coding_systems), coding); 6126 setup_coding_system (XCDR (coding_systems), coding);
6126 } 6127 }
6127 } 6128 }
6129 coding->mode = saved_mode;
6128 } 6130 }
6129 6131
6130 6132
6131 static void 6133 static void
6132 decode_eol (coding) 6134 decode_eol (coding)