comparison src/coding.c @ 22166:917e237b5e65

(shrink_decoding_region): No short cut by coding->heading_ascii if eol conversion is necessary.
author Kenichi Handa <handa@m17n.org>
date Thu, 21 May 1998 01:48:52 +0000
parents 592bb8b9bcfd
children fc4aaf1b1772
comparison
equal deleted inserted replaced
22165:8cdacecac78b 22166:917e237b5e65
3762 /* We need no conversion, but don't have to skip any data here. 3762 /* We need no conversion, but don't have to skip any data here.
3763 Decoding routine handles them effectively anyway. */ 3763 Decoding routine handles them effectively anyway. */
3764 return; 3764 return;
3765 } 3765 }
3766 3766
3767 if (coding->heading_ascii >= 0) 3767 eol_conversion = (coding->eol_type != CODING_EOL_LF);
3768
3769 if ((! eol_conversion) && (coding->heading_ascii >= 0))
3768 /* Detection routine has already found how much we can skip at the 3770 /* Detection routine has already found how much we can skip at the
3769 head. */ 3771 head. */
3770 *beg += coding->heading_ascii; 3772 *beg += coding->heading_ascii;
3771 3773
3772 if (str) 3774 if (str)
3777 else 3779 else
3778 { 3780 {
3779 begp_orig = begp = BYTE_POS_ADDR (*beg); 3781 begp_orig = begp = BYTE_POS_ADDR (*beg);
3780 endp_orig = endp = begp + *end - *beg; 3782 endp_orig = endp = begp + *end - *beg;
3781 } 3783 }
3782
3783 eol_conversion = (coding->eol_type != CODING_EOL_LF);
3784 3784
3785 switch (coding->type) 3785 switch (coding->type)
3786 { 3786 {
3787 case coding_type_emacs_mule: 3787 case coding_type_emacs_mule:
3788 case coding_type_raw_text: 3788 case coding_type_raw_text: