From de9d083c5d26657da21e22e5b3c2a3396e8aaf10 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 24 Mar 1998 05:41:38 +0000 Subject: [PATCH] (shrink_decoding_region): If EOL_CONVERSION is nonzero, don't skip `\r' (instead of `\n'). --- src/coding.c | 8 ++++---- 1 file 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) if (coding->heading_ascii < 0) { if (eol_conversion) - while (begp < endp && *begp < 0x80 && *begp != '\n') begp++; + while (begp < endp && *begp < 0x80 && *begp != '\r') begp++; else while (begp < endp && *begp < 0x80) begp++; } /* We can skip all ASCII characters at the tail except for the second byte of SJIS or BIG5 code. */ if (eol_conversion) - while (begp < endp && endp[-1] < 0x80 && endp[-1] != '\n') endp--; + while (begp < endp && endp[-1] < 0x80 && endp[-1] != '\r') endp--; else while (begp < endp && endp[-1] < 0x80) endp--; if (begp < endp && endp < endp_orig && endp[-1] >= 0x80) @@ -3811,7 +3811,7 @@ shrink_decoding_region (beg, end, coding, str) case CODING_CATEGORY_IDX_ISO_8_2: /* We can skip all ASCII characters at the tail. */ if (eol_conversion) - while (begp < endp && (c = endp[-1]) < 0x80 && c != '\n') endp--; + while (begp < endp && (c = endp[-1]) < 0x80 && c != '\r') endp--; else while (begp < endp && endp[-1] < 0x80) endp--; break; @@ -3822,7 +3822,7 @@ shrink_decoding_region (beg, end, coding, str) the following 2-byte at the tail. */ if (eol_conversion) while (begp < endp - && (c = endp[-1]) < 0x80 && c != ISO_CODE_ESC && c != '\n') + && (c = endp[-1]) < 0x80 && c != ISO_CODE_ESC && c != '\r') endp--; else while (begp < endp -- 2.39.5