Mercurial > emacs
changeset 95344:02f76f79f115
(encode_coding_raw_text): Set coding->produced_char for all branches.
Compute it differently.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 27 May 2008 15:49:49 +0000 |
parents | 6ea8f16fb374 |
children | 0350e5efb8f7 |
files | src/ChangeLog src/coding.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue May 27 14:12:42 2008 +0000 +++ b/src/ChangeLog Tue May 27 15:49:49 2008 +0000 @@ -1,5 +1,8 @@ 2008-05-27 Stefan Monnier <monnier@iro.umontreal.ca> + * coding.c (encode_coding_raw_text): Set coding->produced_char for + all branches. Compute it differently. + * xdisp.c [!HAVE_WINDOW_SYSTEM]: Include font.h for --without-x. 2008-05-27 Juanma Barranquero <lekktu@gmail.com>
--- a/src/coding.c Tue May 27 14:12:42 2008 +0000 +++ b/src/coding.c Tue May 27 15:49:49 2008 +0000 @@ -4818,7 +4818,6 @@ int *charbuf_end = coding->charbuf + coding->charbuf_used; unsigned char *dst = coding->destination + coding->produced; unsigned char *dst_end = coding->destination + coding->dst_bytes; - int produced_chars = 0; int c; if (multibytep) @@ -4873,7 +4872,6 @@ *dst++ = CHAR_TO_BYTE8 (c); else CHAR_STRING_ADVANCE (c, dst); - produced_chars++; } } else @@ -4881,11 +4879,10 @@ ASSURE_DESTINATION (charbuf_end - charbuf); while (charbuf < charbuf_end && dst < dst_end) *dst++ = *charbuf++; - produced_chars = dst - (coding->destination + coding->dst_bytes); } } record_conversion_result (coding, CODING_RESULT_SUCCESS); - coding->produced_char += produced_chars; + coding->produced_char += charbuf - coding->charbuf; coding->produced = dst - coding->destination; return 0; }