Mercurial > emacs
diff src/coding.c @ 23153:b2770410c752
(decode_coding): Even if SRC_BYTES is zero, try
processing if CODING requires flushing.
(encode_coding): Likewise.
(code_convert_region): Likewise.
(code_convert_string): Likewise.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Mon, 31 Aug 1998 03:50:17 +0000 |
| parents | 7a72a7b8718c |
| children | 392b44751a22 |
line wrap: on
line diff
--- a/src/coding.c Mon Aug 31 03:50:17 1998 +0000 +++ b/src/coding.c Mon Aug 31 03:50:17 1998 +0000 @@ -3651,7 +3651,9 @@ { int result; - if (src_bytes <= 0) + if (src_bytes <= 0 + && ! (coding->mode & CODING_MODE_LAST_BLOCK + && CODING_REQUIRE_FLUSHING (coding))) { coding->produced = coding->produced_char = 0; coding->consumed = coding->consumed_char = 0; @@ -3731,7 +3733,9 @@ { int result; - if (src_bytes <= 0) + if (src_bytes <= 0 + && ! (coding->mode & CODING_MODE_LAST_BLOCK + && CODING_REQUIRE_FLUSHING (coding))) { coding->produced = coding->produced_char = 0; coding->consumed = coding->consumed_char = 0; @@ -4184,7 +4188,9 @@ shrink_encoding_region (&from_byte, &to_byte, coding, NULL); else shrink_decoding_region (&from_byte, &to_byte, coding, NULL); - if (from_byte == to_byte) + if (from_byte == to_byte + && ! (coding->mode & CODING_MODE_LAST_BLOCK + && CODING_REQUIRE_FLUSHING (coding))) { coding->produced = len_byte; coding->produced_char = multibyte ? len : len_byte; @@ -4486,7 +4492,9 @@ else shrink_decoding_region (&from, &to_byte, coding, XSTRING (str)->data); } - if (from == to_byte) + if (from == to_byte + && ! (coding->mode & CODING_MODE_LAST_BLOCK + && CODING_REQUIRE_FLUSHING (coding))) return (nocopy ? str : Fcopy_sequence (str)); if (encodep)
