X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fodr.h;h=7f9308ff2d6ec859bd863edb124277d162923485;hp=865e4d4611d9ff2b760f0a0020c87a6be5b4f438;hb=ce627148dbba2878565b8d9da33f6b25f33da4bd;hpb=28c5fe25e891098bcf5f18dfd0e3abe729dc340f diff --git a/include/yaz/odr.h b/include/yaz/odr.h index 865e4d4..7f9308f 100644 --- a/include/yaz/odr.h +++ b/include/yaz/odr.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data. + * Copyright (C) Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -127,14 +127,6 @@ struct odr int error; /* current error state (0==OK) */ - char *buf; /* memory handle */ - int top; /* top of buffer (max pos when encoding) */ - int size; /* current buffer size (encoding+decoding) */ - - int pos; /* current position (encoding) */ - - const char *bp; /* position in buffer (decoding) */ - NMEM mem; /* memory handle for decoding (primarily) */ struct Odr_private *op; @@ -171,6 +163,7 @@ typedef struct odr_arm extern char *odr_errlist[]; +YAZ_EXPORT int odr_offset(ODR o); YAZ_EXPORT int odr_geterror(ODR o); YAZ_EXPORT int odr_geterrorx(ODR o, int *x); YAZ_EXPORT void odr_seterror(ODR o, int errorno, int errorid); @@ -178,6 +171,7 @@ YAZ_EXPORT void odr_setelement(ODR o, const char *addinfo); YAZ_EXPORT const char *odr_getelement(ODR o); YAZ_EXPORT void odr_perror(ODR o, const char *message); YAZ_EXPORT void odr_setprint(ODR o, FILE *file); +YAZ_EXPORT void odr_setprint_noclose(ODR o, FILE *file); YAZ_EXPORT ODR odr_createmem(int direction); YAZ_EXPORT void odr_reset(ODR o); YAZ_EXPORT void odr_destroy(ODR o); @@ -218,8 +212,6 @@ YAZ_EXPORT Odr_null *odr_nullval(void); ((mask)->bits[(num) >> 3] & (0X80 >> ((num) & 0X07)) ? 1 : 0) : 0) -#define odr_tell(o) ((o)->pos) -#define odr_offset(o) ((o)->bp - (o)->buf) #define odr_ok(o) (!(o)->error) #define odr_getmem(o) ((o)->mem)