Mercurial > emacs
changeset 90350:60eaefb08cf7
(DECODE_COMPOSITION_START): If the source is short, set
coding->result to CODING_RESULT_INSUFFICIENT_SRC.
(decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of
detect_coding.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 07 Mar 2006 01:53:54 +0000 |
parents | 23de6e67f400 |
children | 6b1549c2abc8 |
files | src/coding.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Mon Mar 06 02:16:33 2006 +0000 +++ b/src/coding.c Tue Mar 07 01:53:54 2006 +0000 @@ -2808,8 +2808,10 @@ break; \ if (p == src_end - 1) \ { \ - if (coding->mode & CODING_MODE_LAST_BLOCK) \ - goto invalid_code; \ + /* The current composition doesn't end in the current \ + source. */ \ + record_conversion_result \ + (coding, CODING_RESULT_INSUFFICIENT_SRC); \ goto no_more_source; \ } \ \ @@ -6654,11 +6656,11 @@ coding->dst_pos = PT; coding->dst_pos_byte = PT_BYTE; coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters); - coding->mode |= CODING_MODE_LAST_BLOCK; if (CODING_REQUIRE_DETECTION (coding)) detect_coding (coding); + coding->mode |= CODING_MODE_LAST_BLOCK; decode_coding (coding); attrs = CODING_ID_ATTRS (coding->id);