Mercurial > emacs
comparison src/coding.c @ 31123:097593e77185
(encode_eol): Fix bug for the case of dst_bytes being zero. Set
coding->produced_char correctly.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Wed, 23 Aug 2000 02:47:42 +0000 |
| parents | e6acd4b6a8d5 |
| children | 0b33b8c5d16e |
comparison
equal
deleted
inserted
replaced
| 31122:2166d83bdefe | 31123:097593e77185 |
|---|---|
| 2800 label_end_of_loop: | 2800 label_end_of_loop: |
| 2801 ; | 2801 ; |
| 2802 } | 2802 } |
| 2803 else | 2803 else |
| 2804 { | 2804 { |
| 2805 if (src_bytes <= dst_bytes) | 2805 if (!dst_bytes || src_bytes <= dst_bytes) |
| 2806 { | 2806 { |
| 2807 safe_bcopy (src, dst, src_bytes); | 2807 safe_bcopy (src, dst, src_bytes); |
| 2808 src_base = src_end; | 2808 src_base = src_end; |
| 2809 dst += src_bytes; | 2809 dst += src_bytes; |
| 2810 } | 2810 } |
| 2832 if (coding->src_multibyte) | 2832 if (coding->src_multibyte) |
| 2833 dst = destination + str_as_unibyte (destination, dst - destination); | 2833 dst = destination + str_as_unibyte (destination, dst - destination); |
| 2834 | 2834 |
| 2835 coding->consumed = src_base - source; | 2835 coding->consumed = src_base - source; |
| 2836 coding->produced = dst - destination; | 2836 coding->produced = dst - destination; |
| 2837 coding->produced_char = coding->produced; | |
| 2837 } | 2838 } |
| 2838 | 2839 |
| 2839 | 2840 |
| 2840 /*** 7. C library functions ***/ | 2841 /*** 7. C library functions ***/ |
| 2841 | 2842 |
