X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fodr.c;h=4cf86adba8c0dbe66c2f329c306a3e95511bf8b5;hb=388a09802a50b37d3b3679949ac91b13594d3260;hp=54ff61361e74f80731ca60df7956e54bb918dd3c;hpb=3cef72d7093afaa8b106e4160ef0885b2ac50335;p=yaz-moved-to-github.git diff --git a/src/odr.c b/src/odr.c index 54ff613..4cf86ad 100644 --- a/src/odr.c +++ b/src/odr.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: odr.c,v 1.3 2004-08-13 07:30:06 adam Exp $ + * $Id: odr.c,v 1.5 2004-08-24 08:44:10 adam Exp $ * */ #if HAVE_CONFIG_H @@ -110,12 +110,12 @@ void odr_FILE_write(ODR o, void *handle, int type, #endif for (i = 0; i 3100) { fputs(" ..... ", (FILE*) handle); i = len - 1000; } - unsigned c = ((const unsigned char *) buf)[i]; if (strchr("\r\n\f\t", c) || c >= ' ' && c <= 126) putc(c, (FILE*) handle); else @@ -221,6 +221,7 @@ void odr_destroy(ODR o) void odr_setbuf(ODR o, char *buf, int len, int can_grow) { + odr_seterror(o, ONONE, 0); o->bp = (unsigned char *) buf; o->buf = (unsigned char *) buf;