X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fodr.c;h=e424b20e17a00fa09d0d766506bc871f2ecccb94;hb=80559dbf0a5d6993eef844e6f6198d28ff5a44fa;hp=49c775314bc53056a38a7d73564850ff1b959a63;hpb=eeefb8a3c1f94ccff4435e32bb675ae9dc75b20f;p=yaz-moved-to-github.git diff --git a/src/odr.c b/src/odr.c index 49c7753..e424b20 100644 --- a/src/odr.c +++ b/src/odr.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ @@ -64,7 +64,7 @@ void odr_perror(ODR o, const char *message) fprintf(stderr, "%s: %s (code %d:%d)", message, odr_errlist[err], err, x); if (e && *e) fprintf(stderr, " element %s", e); - + fprintf(stderr, "\n"); if (element_path) { @@ -177,7 +177,7 @@ void odr_setprint(ODR o, FILE *file) void odr_set_stream(ODR o, void *handle, - void (*stream_write)(ODR o, + void (*stream_write)(ODR o, void *handle, int type, const char *buf, int len), void (*stream_close)(void *handle)) @@ -254,7 +254,7 @@ void odr_reset(ODR o) yaz_iconv(o->op->iconv_handle, 0, 0, 0, 0); yaz_log(log_level, "odr_reset o=%p", o); } - + void odr_destroy(ODR o) { nmem_destroy(o->mem); @@ -272,8 +272,8 @@ 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; + o->bp = buf; + o->buf = buf; o->op->can_grow = can_grow; o->top = o->pos = 0; o->size = len;