diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-29 13:05:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-29 13:05:07 +0000 |
commit | d079f32126a4d1005a646dd907b4c791df7b0934 (patch) | |
tree | aad733726ded83c3e50268d94dd3f78a731bb9c2 /wcsmbs/mbsnrtowcs.c | |
parent | 5e7a22c9c3d09ad8bdefb127eb4a0faeee5fbb0b (diff) | |
download | glibc-d079f32126a4d1005a646dd907b4c791df7b0934.tar.gz glibc-d079f32126a4d1005a646dd907b4c791df7b0934.tar.xz glibc-d079f32126a4d1005a646dd907b4c791df7b0934.zip |
Update.
* wcsmbs/mbsrtowcs.c: Optimize a bit more. * wcsmbs/wcsrtombs.c: Likewise.
Diffstat (limited to 'wcsmbs/mbsnrtowcs.c')
-rw-r--r-- | wcsmbs/mbsnrtowcs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/wcsmbs/mbsnrtowcs.c b/wcsmbs/mbsnrtowcs.c index 790e777a6c..a73fcd1e98 100644 --- a/wcsmbs/mbsnrtowcs.c +++ b/wcsmbs/mbsnrtowcs.c @@ -66,12 +66,15 @@ __mbsnrtowcs (dst, src, nmc, len, ps) wchar_t buf[64]; /* Just an arbitrary size. */ const char *inbuf = *src; - data.outbuf = (char *) buf; data.outbufend = data.outbuf + sizeof (buf); do - status = (*__wcsmbs_gconv_fcts.towc->fct) (__wcsmbs_gconv_fcts.towc, - &data, &inbuf, srcend, - &result, 0); + { + data.outbuf = (char *) buf; + + status = (*__wcsmbs_gconv_fcts.towc->fct) (__wcsmbs_gconv_fcts.towc, + &data, &inbuf, srcend, + &result, 0); + } while (status == GCONV_FULL_OUTPUT); if ((status == GCONV_OK || status == GCONV_EMPTY_INPUT) |