Commit 01d45367 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(encode_coding_raw_text): Set coding->produced_char for all branches.

Compute it differently.
parent 5dd5d9eb
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>
......
......@@ -4818,7 +4818,6 @@ encode_coding_raw_text (coding)
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 @@ encode_coding_raw_text (coding)
*dst++ = CHAR_TO_BYTE8 (c);
else
CHAR_STRING_ADVANCE (c, dst);
produced_chars++;
}
}
else
......@@ -4881,11 +4879,10 @@ encode_coding_raw_text (coding)
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment