aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa1998-03-24 05:41:38 +0000
committerKenichi Handa1998-03-24 05:41:38 +0000
commitde9d083c5d26657da21e22e5b3c2a3396e8aaf10 (patch)
treec3d3d42bcb8884a13fd52122e2bf2f81d9efb18f /src/coding.c
parentcbc1b668f313eac593d1de971d9c425629a41e28 (diff)
downloademacs-de9d083c5d26657da21e22e5b3c2a3396e8aaf10.tar.gz
emacs-de9d083c5d26657da21e22e5b3c2a3396e8aaf10.zip
(shrink_decoding_region): If EOL_CONVERSION is nonzero,
don't skip `\r' (instead of `\n').
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c
index 1909ce4e124..0b71e91c4db 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3780,14 +3780,14 @@ shrink_decoding_region (beg, end, coding, str)
3780 if (coding->heading_ascii < 0) 3780 if (coding->heading_ascii < 0)
3781 { 3781 {
3782 if (eol_conversion) 3782 if (eol_conversion)
3783 while (begp < endp && *begp < 0x80 && *begp != '\n') begp++; 3783 while (begp < endp && *begp < 0x80 && *begp != '\r') begp++;
3784 else 3784 else
3785 while (begp < endp && *begp < 0x80) begp++; 3785 while (begp < endp && *begp < 0x80) begp++;
3786 } 3786 }
3787 /* We can skip all ASCII characters at the tail except for the 3787 /* We can skip all ASCII characters at the tail except for the
3788 second byte of SJIS or BIG5 code. */ 3788 second byte of SJIS or BIG5 code. */
3789 if (eol_conversion) 3789 if (eol_conversion)
3790 while (begp < endp && endp[-1] < 0x80 && endp[-1] != '\n') endp--; 3790 while (begp < endp && endp[-1] < 0x80 && endp[-1] != '\r') endp--;
3791 else 3791 else
3792 while (begp < endp && endp[-1] < 0x80) endp--; 3792 while (begp < endp && endp[-1] < 0x80) endp--;
3793 if (begp < endp && endp < endp_orig && endp[-1] >= 0x80) 3793 if (begp < endp && endp < endp_orig && endp[-1] >= 0x80)
@@ -3811,7 +3811,7 @@ shrink_decoding_region (beg, end, coding, str)
3811 case CODING_CATEGORY_IDX_ISO_8_2: 3811 case CODING_CATEGORY_IDX_ISO_8_2:
3812 /* We can skip all ASCII characters at the tail. */ 3812 /* We can skip all ASCII characters at the tail. */
3813 if (eol_conversion) 3813 if (eol_conversion)
3814 while (begp < endp && (c = endp[-1]) < 0x80 && c != '\n') endp--; 3814 while (begp < endp && (c = endp[-1]) < 0x80 && c != '\r') endp--;
3815 else 3815 else
3816 while (begp < endp && endp[-1] < 0x80) endp--; 3816 while (begp < endp && endp[-1] < 0x80) endp--;
3817 break; 3817 break;
@@ -3822,7 +3822,7 @@ shrink_decoding_region (beg, end, coding, str)
3822 the following 2-byte at the tail. */ 3822 the following 2-byte at the tail. */
3823 if (eol_conversion) 3823 if (eol_conversion)
3824 while (begp < endp 3824 while (begp < endp
3825 && (c = endp[-1]) < 0x80 && c != ISO_CODE_ESC && c != '\n') 3825 && (c = endp[-1]) < 0x80 && c != ISO_CODE_ESC && c != '\r')
3826 endp--; 3826 endp--;
3827 else 3827 else
3828 while (begp < endp 3828 while (begp < endp