summary refs log tree commit diff
path: root/iconv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-28 21:38:03 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-28 21:38:03 +0000
commit777e222ddbdffe54b5e344ac1cb40a6ab9ef621f (patch)
tree9b495f8840742f768f0a6cb0f676774157d628c9 /iconv
parentea9e5dc03bfc73e8c197a9eabaf4e84999cbba49 (diff)
downloadglibc-777e222ddbdffe54b5e344ac1cb40a6ab9ef621f.tar.gz
glibc-777e222ddbdffe54b5e344ac1cb40a6ab9ef621f.tar.xz
glibc-777e222ddbdffe54b5e344ac1cb40a6ab9ef621f.zip
Update.
	* Makefile (do-tst-ctype): Add do-tst-mbswcs to list of dependencies.
	(TEST_MBWC_ENV): Remove unnecessary slash.
	* tst-ctype.sh: Add de_DE.UTF-8 to list of tested locales.

	* tests-mbwc/dat_iswalnum.c (TST_ISW_LOC): Correct UTF-8 input data.

	* Makefile: Add do-tst-mbswcs to dependencies of locale test suite
	tests.
Diffstat (limited to 'iconv')
-rw-r--r--iconv/skeleton.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index 854cc70bee..e203f0fddb 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -294,9 +294,16 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
 #ifdef EMIT_SHIFT_TO_INIT
       /* Emit the escape sequence to reset the state.  */
       EMIT_SHIFT_TO_INIT;
+#else
+      /* Clear the state object.  There might be bytes in there from
+	 previous calls with CONSUME_INCOMPLETE == 1.  */
+      memset (data->__statep, '\0', sizeof (*data->__statep));
 #endif
       /* Call the steps down the chain if there are any but only if we
-         successfully emitted the escape sequence.  */
+         successfully emitted the escape sequence.  This should only
+	 fail if the output buffer is full.  If the input is invalid
+	 it should be discarded since the user wants to start from a
+	 clean slate.  */
       if (status == __GCONV_OK && ! (data->__flags & __GCONV_IS_LAST))
 	status = DL_CALL_FCT (fct, (next_step, next_data, NULL, NULL,
 				    NULL, irreversible, 1,