/*
- * Copyright (c) 1995-2002, Index Data.
+ * Copyright (c) 1995-2003, Index Data.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation, in whole or in part, for any purpose, is hereby granted,
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*
- * $Id: odr-priv.h,v 1.1 2002-07-25 13:20:20 adam Exp $
+ * $Id: odr-priv.h,v 1.4 2003-03-11 11:03:31 adam Exp $
*/
#ifndef ODR_PRIV_H
#define ODR_PRIV_H
-#if HAVE_ICONV_H
-#include <iconv.h>
-#endif
-
#include <yaz/odr.h>
+#include <yaz/yaz-util.h>
struct Odr_ber_tag { /* used to be statics in ber_tag... */
int lclass;
int lcons;
};
+#define odr_max(o) ((o)->size - ((o)->bp - (o)->buf))
+#define odr_offset(o) ((o)->bp - (o)->buf)
+
struct Odr_private {
/* stack for constructed types */
#define ODR_MAX_STACK 50
odr_constack stack[ODR_MAX_STACK];
struct Odr_ber_tag odr_ber_tag;
-#if HAVE_ICONV_H
- iconv_t iconv_handle;
-#endif
+ yaz_iconv_t iconv_handle;
+ int error_id;
};
/* Private macro.