summary refs log tree commit diff
path: root/wcsmbs/mbrtowc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-05-23 00:08:46 +0000
committerUlrich Drepper <drepper@redhat.com>2001-05-23 00:08:46 +0000
commite017830580990842266a5a4f61aca189b56723bb (patch)
treec1e6462018f73569a6db55d21e997629f7f2c94c /wcsmbs/mbrtowc.c
parent1826d7933b56601f98be8740b5a3c5c07ad00e65 (diff)
downloadglibc-e017830580990842266a5a4f61aca189b56723bb.tar.gz
glibc-e017830580990842266a5a4f61aca189b56723bb.tar.xz
glibc-e017830580990842266a5a4f61aca189b56723bb.zip
Update.
2001-05-21  Bruno Haible  <haible@clisp.cons.org>

	* wcsmbs/mbrtowc.c (mbrtowc): Remove local variable 'flush', always
	use 0 instead, and rely on the converter to do the flush.
	* wcsmbs/tst-mbrtowc.c (utf8_test_1): New function, taken from
	utf8_test.
	(utf8_test_2, utf8_test_3): New function.
	(utf8_test): Call utf8_test_1, utf8_test_2, utf8_test_3.
Diffstat (limited to 'wcsmbs/mbrtowc.c')
-rw-r--r--wcsmbs/mbrtowc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c
index 7c05680d91..8a24d18fe1 100644
--- a/wcsmbs/mbrtowc.c
+++ b/wcsmbs/mbrtowc.c
@@ -42,7 +42,6 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   size_t dummy;
   const unsigned char *inbuf;
   char *outbuf = (char *) (pwc ?: buf);
-  int flush = 0;
 
   /* Set information for this step.  */
   data.__invocation_counter = 0;
@@ -58,7 +57,6 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
       outbuf = (char *) buf;
       s = "";
       n = 1;
-      flush = 1;
     }
 
   /* Tell where we want the result.  */
@@ -72,7 +70,7 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   inbuf = (const unsigned char *) s;
   status = DL_CALL_FCT (__wcsmbs_gconv_fcts.towc->__fct,
 			(__wcsmbs_gconv_fcts.towc, &data, &inbuf, inbuf + n,
-			 NULL, &dummy, flush, 1));
+			 NULL, &dummy, 0, 1));
 
   /* There must not be any problems with the conversion but illegal input
      characters.  The output buffer must be large enough, otherwise the