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>
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)
*dst++ = CHAR_TO_BYTE8 (c);
else
CHAR_STRING_ADVANCE (c, dst);
- produced_chars++;
}
}
else
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;
}