aboutsummaryrefslogtreecommitdiff
path: root/iconv/skeleton.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-06 20:21:33 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-06 20:21:33 +0000
commitf1813b562b7d4aebfde07f0991126e2de7a55d73 (patch)
tree3c6cdc378ff44b604d4fccad96abfea104fb6da5 /iconv/skeleton.c
parente1fa173022d528b3934e94577a0c9fcfbc46eb2c (diff)
downloadglibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.zip
glibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.tar.gz
glibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.tar.bz2
Update.
2001-01-06 Ulrich Drepper <drepper@redhat.com> * iconv/skeleton.c: Reset outbuf for next round of the loop. Reported by Owen Taylor <otaylor@redhat.com>. * iconv/Makefile (tests): Add tst-iconv3. * iconv/tst-iconv3.c: New file. * iconvdata/ibm930.c: Fix handling of state. Optimize a bit. * iconvdata/ibm933.c: Likewise. * iconvdata/ibm935.c: Likewise. * iconvdata/ibm937.c: Likewise. * iconvdata/ibm939.c: Likewise. * iconvdata/ibm930.h: Adjust single byte table for optimization. * iconvdata/ibm933.h: Likewise. * iconvdata/ibm935.h: Likewise. * iconvdata/ibm939.h: Likewise. * iconvdata/testdata/IBM930: Add misssing SI. * iconvdata/testdata/IBM933: Likewise. * iconvdata/testdata/IBM935: Likewise. * iconvdata/testdata/IBM937: Likewise. * iconvdata/testdata/IBM939: Likewise. * configure.in: Check for old add-ons that shouldn't be used with current glibc anymore.
Diffstat (limited to 'iconv/skeleton.c')
-rw-r--r--iconv/skeleton.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index 2b080ba..98abc33 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -1,5 +1,5 @@
/* Skeleton for a conversion module.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -398,7 +398,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
|| (uintptr_t) inptr % MIN_NEEDED_TO != 0)));
#endif
- do
+ while (1)
{
struct __gconv_trans_data *trans;
@@ -561,10 +561,18 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
/* All the output is consumed, we can make another run
if everything was ok. */
if (status == __GCONV_FULL_OUTPUT)
- status = __GCONV_OK;
+ {
+ status = __GCONV_OK;
+ outbuf = data->__outbuf;
+ }
}
+
+ if (status != __GCONV_OK)
+ break;
+
+ /* Reset the output buffer pointer for the next round. */
+ outbuf = data->__outbuf;
}
- while (status == __GCONV_OK);
#ifdef END_LOOP
END_LOOP