X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr.c;h=9cbac0d0b501aed6e2b3a2224825ea9be6f635d5;hp=d0c928866817d26b1f84b64cf38736de272c01df;hb=ce627148dbba2878565b8d9da33f6b25f33da4bd;hpb=03b00294a8f57bfd02c81e7ac4ee2bb280177f98 diff --git a/src/odr.c b/src/odr.c index d0c9288..9cbac0d 100644 --- a/src/odr.c +++ b/src/odr.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -166,6 +166,10 @@ void odr_setprint(ODR o, FILE *file) odr_set_stream(o, file, odr_FILE_write, odr_FILE_close); } +void odr_setprint_noclose(ODR o, FILE *file) +{ + odr_set_stream(o, file, odr_FILE_write, 0); +} void odr_set_stream(ODR o, void *handle, void (*stream_write)(ODR o, @@ -213,7 +217,7 @@ ODR odr_createmem(int direction) o->op->enable_bias = 1; o->op->odr_ber_tag.lclass = -1; o->op->iconv_handle = 0; - odr_setprint(o, stderr); + odr_setprint_noclose(o, stderr); odr_reset(o); yaz_log(log_level, "odr_createmem dir=%d o=%p", direction, o); return o;