X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fyaziconv.c;h=9f7f7975cce2de57a6c926b42169d8115d54cdbb;hp=bf3b922b4fef62cd49e2a99f9c4275ab6334a394;hb=d940392c53c32ccf76fb287cc5b997b9e921a431;hpb=19c0b332044f06ee33eaf66ca92675d9cda8d1b9 diff --git a/util/yaziconv.c b/util/yaziconv.c index bf3b922..9f7f797 100644 --- a/util/yaziconv.c +++ b/util/yaziconv.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2008 Index Data * See the file LICENSE for details. - * - * $Id: yaziconv.c,v 1.7 2007-03-09 08:39:38 adam Exp $ */ #if HAVE_CONFIG_H @@ -44,6 +42,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; @@ -148,7 +151,7 @@ int main (int argc, char **argv) break; default: fprintf (stderr, "yaziconv: Usage\n" - "siconv -f encoding -t encoding [-v] [file]\n"); + "yaziconv -f encoding -t encoding [-v] [file]\n"); exit(1); } }