X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fsiconvtst.c;h=072997be3a3dfc0b0b9426e09e06a5fb5850f113;hb=b08d68a3edac5a93dce61f98d2f030ea722311c4;hp=cbe4ec2d77986a3b0e971d638e77ceb2dcb70071;hpb=941c141092dc2ea6a2b6f5cc7bac181798113ae7;p=yaz-moved-to-github.git diff --git a/util/siconvtst.c b/util/siconvtst.c index cbe4ec2..072997b 100644 --- a/util/siconvtst.c +++ b/util/siconvtst.c @@ -2,7 +2,7 @@ * Copyright (c) 1997-2002, Index Data * See the file LICENSE for details. * - * $Id: siconvtst.c,v 1.4 2002-08-28 19:33:53 adam Exp $ + * $Id: siconvtst.c,v 1.6 2002-12-10 10:59:28 adam Exp $ */ #if HAVE_CONFIG_H @@ -15,14 +15,15 @@ #include -#define CHUNK 8 +#define CHUNK_IN 64 +#define CHUNK_OUT 64 void convert (FILE *inf, yaz_iconv_t cd) { - char inbuf0[CHUNK], *inbuf = inbuf0; - char outbuf0[CHUNK], *outbuf = outbuf0; - size_t outbytesleft = CHUNK; - size_t inbytesleft = CHUNK; + char inbuf0[CHUNK_IN], *inbuf = inbuf0; + char outbuf0[CHUNK_OUT], *outbuf = outbuf0; + size_t inbytesleft = CHUNK_IN; + size_t outbytesleft = CHUNK_OUT; int mustread = 1; while (1) @@ -61,15 +62,30 @@ void convert (FILE *inf, yaz_iconv_t cd) size_t i; for (i = 0; i