1999-11-25 Ulrich Drepper <drepper@cygnus.com>
* iconv/gconv.c (__gconv): Always initialize
cd->__data[last_step].__outbuf and cd->__data[last_step].__outbufend.
* iconvdata/iso-2022-kr.c (EMIT_SHIFT_TO_INIT): Update number of
written bytes.
* iconvdata/iso-2022-jp.c: Likewise.
+1999-11-25 Ulrich Drepper <drepper@cygnus.com>
+
+ * iconv/gconv.c (__gconv): Always initialize
+ cd->__data[last_step].__outbuf and cd->__data[last_step].__outbufend.
+
+ * iconvdata/iso-2022-kr.c (EMIT_SHIFT_TO_INIT): Update number of
+ written bytes.
+ * iconvdata/iso-2022-jp.c: Likewise.
+
1999-11-25 H.J. Lu <hjl@gnu.org>
* stdlib/exit.c (exit): Run funtions only if
assert (converted != NULL);
*converted = 0;
+ cd->__data[last_step].__outbuf = *outbuf;
+ cd->__data[last_step].__outbufend = outbufend;
+
if (inbuf == NULL || *inbuf == NULL)
/* We just flush. */
result = DL_CALL_FCT (cd->__steps->__fct,
const unsigned char *last_start;
assert (outbuf != NULL && *outbuf != NULL);
- cd->__data[last_step].__outbuf = *outbuf;
- cd->__data[last_step].__outbufend = outbufend;
do
{
*outbuf++ = ESC; \
*outbuf++ = '('; \
*outbuf++ = 'B'; \
+ if (data->__is_last) \
+ *written += 3; \
data->__outbuf = outbuf; \
/* Note that this also clears the G2 designation. */ \
data->__statep->count = ASCII_set; \
{ \
/* Write out the shift sequence. */ \
*outbuf++ = SI; \
+ if (data->__is_last) \
+ *written += 1; \
data->__outbuf = outbuf; \
data->__statep->count = ASCII_set; \
} \