comparison src/coding.c @ 73995:11025612f889

(code_convert_region): Initialize coding->heading_ascii. (decode_coding_string, code_convert_region): Likewise.
author Kenichi Handa <handa@m17n.org>
date Tue, 14 Nov 2006 10:39:58 +0000
parents 0d1207b43a5b
children 6ee41fdd69ff c71725faff1a dbe3f29e61d6
comparison
equal deleted inserted replaced
73994:88d63648c784 73995:11025612f889
5579 inhibit_modification_hooks = 1; 5579 inhibit_modification_hooks = 1;
5580 Fset_text_properties (make_number (from), make_number (to), Qnil, Qnil); 5580 Fset_text_properties (make_number (from), make_number (to), Qnil, Qnil);
5581 inhibit_modification_hooks = saved_inhibit_modification_hooks; 5581 inhibit_modification_hooks = saved_inhibit_modification_hooks;
5582 } 5582 }
5583 5583
5584 coding->heading_ascii = 0;
5585
5584 if (! encodep && CODING_REQUIRE_DETECTION (coding)) 5586 if (! encodep && CODING_REQUIRE_DETECTION (coding))
5585 { 5587 {
5586 /* We must detect encoding of text and eol format. */ 5588 /* We must detect encoding of text and eol format. */
5587 5589
5588 if (from < GPT && to > GPT) 5590 if (from < GPT && to > GPT)
6223 to_byte = SBYTES (str); 6225 to_byte = SBYTES (str);
6224 6226
6225 saved_coding_symbol = coding->symbol; 6227 saved_coding_symbol = coding->symbol;
6226 coding->src_multibyte = STRING_MULTIBYTE (str); 6228 coding->src_multibyte = STRING_MULTIBYTE (str);
6227 coding->dst_multibyte = 1; 6229 coding->dst_multibyte = 1;
6230 coding->heading_ascii = 0;
6231
6228 if (CODING_REQUIRE_DETECTION (coding)) 6232 if (CODING_REQUIRE_DETECTION (coding))
6229 { 6233 {
6230 /* See the comments in code_convert_region. */ 6234 /* See the comments in code_convert_region. */
6231 if (coding->type == coding_type_undecided) 6235 if (coding->type == coding_type_undecided)
6232 { 6236 {
6435 coding_save_composition (coding, from, to, str); 6439 coding_save_composition (coding, from, to, str);
6436 6440
6437 /* Try to skip the heading and tailing ASCIIs. We can't skip them 6441 /* Try to skip the heading and tailing ASCIIs. We can't skip them
6438 if we must run CCL program or there are compositions to 6442 if we must run CCL program or there are compositions to
6439 encode. */ 6443 encode. */
6444 coding->heading_ascii = 0;
6440 if (coding->type != coding_type_ccl 6445 if (coding->type != coding_type_ccl
6441 && (! coding->cmp_data || coding->cmp_data->used == 0)) 6446 && (! coding->cmp_data || coding->cmp_data->used == 0))
6442 { 6447 {
6443 SHRINK_CONVERSION_REGION (&from, &to_byte, coding, SDATA (str), 6448 SHRINK_CONVERSION_REGION (&from, &to_byte, coding, SDATA (str),
6444 1); 6449 1);