Mercurial > emacs
comparison src/coding.c @ 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 | bba59a8cdae0 |
| children | 450fb16a4bf4 |
comparison
equal
deleted
inserted
replaced
| 90349:23de6e67f400 | 90350:60eaefb08cf7 |
|---|---|
| 2806 for (p = src; p < src_end - 1; p++) \ | 2806 for (p = src; p < src_end - 1; p++) \ |
| 2807 if (*p == ISO_CODE_ESC && p[1] == '1') \ | 2807 if (*p == ISO_CODE_ESC && p[1] == '1') \ |
| 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 \ |
| 2816 /* This is surely the start of a composition. */ \ | 2818 /* This is surely the start of a composition. */ \ |
| 2817 method = (c1 == '0' ? COMPOSITION_RELATIVE \ | 2819 method = (c1 == '0' ? COMPOSITION_RELATIVE \ |
| 6652 coding->src_multibyte = chars < bytes; | 6654 coding->src_multibyte = chars < bytes; |
| 6653 coding->dst_object = coding->src_object; | 6655 coding->dst_object = coding->src_object; |
| 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); |
| 6665 if (! NILP (CODING_ATTR_POST_READ (attrs))) | 6667 if (! NILP (CODING_ATTR_POST_READ (attrs))) |
| 6666 { | 6668 { |
