X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fodr.h;h=8e72650093335b42c2769532a6a8e5a53a0c4778;hp=0d3cff13ded252b6ce538e5f5bb22c75402676b7;hb=32790840d73b1f4a4bde1478e6b14699aac00e94;hpb=c82db01c9fc0b51254ec6ead5fe3b503ca098ca0 diff --git a/include/yaz/odr.h b/include/yaz/odr.h index 0d3cff1..8e72650 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: @@ -96,15 +96,10 @@ typedef nmem_bool_t Odr_bool; #define ODR_ENCODE 1 #define ODR_PRINT 2 -#define OCT_SIZE 0 - typedef struct odr_oct { char *buf; int len; -#if OCT_SIZE - int size; -#endif } Odr_oct; typedef void Odr_null; @@ -132,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; @@ -176,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); @@ -223,8 +211,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)