diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-06 20:21:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-06 20:21:33 +0000 |
commit | f1813b562b7d4aebfde07f0991126e2de7a55d73 (patch) | |
tree | 3c6cdc378ff44b604d4fccad96abfea104fb6da5 /iconv | |
parent | e1fa173022d528b3934e94577a0c9fcfbc46eb2c (diff) | |
download | glibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.tar glibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.tar.gz glibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.tar.bz2 glibc-f1813b562b7d4aebfde07f0991126e2de7a55d73.zip |
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')
-rw-r--r-- | iconv/Makefile | 2 | ||||
-rw-r--r-- | iconv/skeleton.c | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/iconv/Makefile b/iconv/Makefile index 46ce05bcd7..b6c4f23d5a 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -34,7 +34,7 @@ CFLAGS-gconv_db.c = -DSTATIC_GCONV CFLAGS-gconv_simple.c = -DSTATIC_GCONV endif -tests = tst-iconv1 tst-iconv2 +tests = tst-iconv1 tst-iconv2 tst-iconv3 distribute = gconv_builtin.h gconv_int.h loop.c skeleton.c diff --git a/iconv/skeleton.c b/iconv/skeleton.c index 2b080bacb6..98abc33f6d 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 |