YAZ  5.23.1
Data Structures | Macros
odr-priv.h File Reference

Internal ODR definitions. More...

#include <yaz/odr.h>
#include <yaz/yaz-util.h>

Go to the source code of this file.

Data Structures

struct  Odr_ber_tag
 Utility structure used by ber_tag. More...
 
struct  odr_constack
 stack for BER constructed items More...
 
struct  Odr_private
 ODR private data. More...
 

Macros

#define odr_max(o)   ((o)->op->size - ((o)->op->bp - (o)->op->buf))
 
#define ODR_MAX_STACK   2000
 
#define ODR_STACK_POP(x)   (x)->op->stack_top = (x)->op->stack_top->prev
 
#define ODR_STACK_EMPTY(x)   (!(x)->op->stack_top)
 
#define ODR_STACK_NOT_EMPTY(x)   ((x)->op->stack_top)
 
#define odr_tell(o)   ((o)->op->pos)
 
#define odr_putc(o, c)
 

Detailed Description

Internal ODR definitions.

Definition in file odr-priv.h.

Macro Definition Documentation

#define odr_max (   o)    ((o)->op->size - ((o)->op->bp - (o)->op->buf))
#define ODR_MAX_STACK   2000

Definition at line 78 of file odr-priv.h.

Referenced by odr_constructed_begin().

#define odr_putc (   o,
 
)
Value:
( \
( \
(o)->op->pos < (o)->op->size ? \
( \
(o)->op->buf[(o)->op->pos++] = (c), \
0 \
) : \
( \
odr_grow_block((o), 1) == 0 ? \
( \
(o)->op->buf[(o)->op->pos++] = (c), \
0 \
) : \
( \
(o)->error = OSPACE, \
-1 \
) \
) \
) == 0 ? \
( \
(o)->op->pos > (o)->op->top ? \
( \
(o)->op->top = (o)->op->pos, \
0 \
) : \
0 \
) : \
-1 \
)
#define OSPACE
Definition: odr.h:153
int odr_grow_block(ODR b, int min_bytes)
Definition: odr_mem.c:77

Definition at line 129 of file odr-priv.h.

Referenced by ber_bitstring(), ber_boolean(), ber_enclen(), ber_enctag(), ber_null(), ber_oidc(), and odr_constructed_end().

#define ODR_STACK_EMPTY (   x)    (!(x)->op->stack_top)

Definition at line 118 of file odr-priv.h.

Referenced by ber_tag(), odr_constructed_end(), and odr_constructed_more().

#define ODR_STACK_NOT_EMPTY (   x)    ((x)->op->stack_top)

Definition at line 119 of file odr-priv.h.

Referenced by ber_tag(), and odr_peektag().

#define ODR_STACK_POP (   x)    (x)->op->stack_top = (x)->op->stack_top->prev

Definition at line 117 of file odr-priv.h.

Referenced by odr_constructed_begin(), and odr_constructed_end().

#define odr_tell (   o)    ((o)->op->pos)

Definition at line 121 of file odr-priv.h.

Referenced by ber_enclen(), ber_oidc(), odr_constructed_begin(), and odr_constructed_end().