diff options
| author | Kenichi Handa | 2006-03-07 01:53:54 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-03-07 01:53:54 +0000 |
| commit | 9286b3338e49771d77d2e1b00d3cc91c0224cac7 (patch) | |
| tree | d063c509fdcb6194d1da8e7bcfaef99761004183 /src | |
| parent | 26d19e0a9b107bcf82dfa74817f624a212be4a08 (diff) | |
| download | emacs-9286b3338e49771d77d2e1b00d3cc91c0224cac7.tar.gz emacs-9286b3338e49771d77d2e1b00d3cc91c0224cac7.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c index 9121d637b35..5d92b7803c1 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -2808,8 +2808,10 @@ detect_coding_iso_2022 (coding, detect_info) | |||
| 2808 | break; \ | 2808 | break; \ |
| 2809 | if (p == src_end - 1) \ | 2809 | if (p == src_end - 1) \ |
| 2810 | { \ | 2810 | { \ |
| 2811 | if (coding->mode & CODING_MODE_LAST_BLOCK) \ | 2811 | /* The current composition doesn't end in the current \ |
| 2812 | goto invalid_code; \ | 2812 | source. */ \ |
| 2813 | record_conversion_result \ | ||
| 2814 | (coding, CODING_RESULT_INSUFFICIENT_SRC); \ | ||
| 2813 | goto no_more_source; \ | 2815 | goto no_more_source; \ |
| 2814 | } \ | 2816 | } \ |
| 2815 | \ | 2817 | \ |
| @@ -6654,11 +6656,11 @@ decode_coding_gap (coding, chars, bytes) | |||
| 6654 | coding->dst_pos = PT; | 6656 | coding->dst_pos = PT; |
| 6655 | coding->dst_pos_byte = PT_BYTE; | 6657 | coding->dst_pos_byte = PT_BYTE; |
| 6656 | coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 6658 | coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
| 6657 | coding->mode |= CODING_MODE_LAST_BLOCK; | ||
| 6658 | 6659 | ||
| 6659 | if (CODING_REQUIRE_DETECTION (coding)) | 6660 | if (CODING_REQUIRE_DETECTION (coding)) |
| 6660 | detect_coding (coding); | 6661 | detect_coding (coding); |
| 6661 | 6662 | ||
| 6663 | coding->mode |= CODING_MODE_LAST_BLOCK; | ||
| 6662 | decode_coding (coding); | 6664 | decode_coding (coding); |
| 6663 | 6665 | ||
| 6664 | attrs = CODING_ID_ATTRS (coding->id); | 6666 | attrs = CODING_ID_ATTRS (coding->id); |