X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fsiconvtst.c;h=072997be3a3dfc0b0b9426e09e06a5fb5850f113;hb=b08d68a3edac5a93dce61f98d2f030ea722311c4;hp=88523911d548def17c1809456c5dba2ce4a7ca0a;hpb=33c972afb7998b7598f72ab1f4c072f92c2d6407;p=yaz-moved-to-github.git diff --git a/util/siconvtst.c b/util/siconvtst.c index 8852391..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.3 2002-08-27 21:45:28 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