From: Adam Dickmeiss Date: Wed, 21 Mar 2007 08:37:57 +0000 (+0000) Subject: Added yaz_iconv flush. X-Git-Tag: YAZ.before.OID.patch~10 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=fc07d9fb0a2fbaa0336c0f1da07b3a56eac5da48;p=yaz-moved-to-github.git Added yaz_iconv flush. --- diff --git a/util/yaziconv.c b/util/yaziconv.c index bf3b922..f91c60b 100644 --- a/util/yaziconv.c +++ b/util/yaziconv.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: yaziconv.c,v 1.7 2007-03-09 08:39:38 adam Exp $ + * $Id: yaziconv.c,v 1.8 2007-03-21 08:37:57 adam Exp $ */ #if HAVE_CONFIG_H @@ -44,6 +44,11 @@ void convert (FILE *inf, yaz_iconv_t cd, int verbose) { if (outbuf != outbuf0) fwrite (outbuf0, 1, outbuf - outbuf0, stdout); + outbuf = outbuf0; + outbytesleft = CHUNK_OUT; + r = yaz_iconv (cd, 0, 0, &outbuf, &outbytesleft); + if (outbuf != outbuf0) + fwrite (outbuf0, 1, outbuf - outbuf0, stdout); break; } inbytesleft = r;