X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fodr-priv.h;h=abc355abffe8a0edcb06f8451a7861e62a363ef7;hb=8b40c551d14fe46439095674ba19cee2fe9a8e1c;hp=ce69d09de72f6e409da14c7479dab59ccc7a34dd;hpb=0a7d4354288c747883261e9f430a7e0069225a5b;p=yaz-moved-to-github.git diff --git a/src/odr-priv.h b/src/odr-priv.h index ce69d09..abc355a 100644 --- a/src/odr-priv.h +++ b/src/odr-priv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2003, Index Data. + * Copyright (C) 1995-2005, Index Data ApS * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -23,7 +23,12 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: odr-priv.h,v 1.2 2004-08-11 12:15:38 adam Exp $ + * $Id: odr-priv.h,v 1.6 2005-06-25 15:46:04 adam Exp $ + */ + +/** + * \file odr-priv.h + * \brief Internal ODR definitions */ #ifndef ODR_PRIV_H @@ -43,17 +48,30 @@ struct Odr_ber_tag { /* used to be statics in ber_tag... */ #define odr_max(o) ((o)->size - ((o)->bp - (o)->buf)) #define odr_offset(o) ((o)->bp - (o)->buf) +typedef struct odr_constack +{ + const unsigned char *base; /* starting point of data */ + int base_offset; + int len; /* length of data, if known, else -1 + (decoding only) */ + const unsigned char *lenb; /* where to encode length */ + int len_offset; + int lenlen; /* length of length-field */ +} odr_constack; + struct Odr_private { /* stack for constructed types */ #define ODR_MAX_STACK 50 int stackp; /* top of stack (-1 == initial state) */ odr_constack stack[ODR_MAX_STACK]; + const char *stack_names[1 + ODR_MAX_STACK]; struct Odr_ber_tag odr_ber_tag; yaz_iconv_t iconv_handle; int error_id; char element[80]; - void (*stream_puts)(void *handle, const char *strz); + void (*stream_write)(ODR o, void *handle, int type, + const char *buf, int len); void (*stream_close)(void *handle); }; @@ -95,3 +113,11 @@ struct Odr_private { ) #endif +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +