YAZ 5.37.0
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)
#define ODR_MAX_STACK   2000
#define ODR_STACK_POP(x)
#define ODR_STACK_EMPTY(x)
#define ODR_STACK_NOT_EMPTY(x)
#define odr_tell(o)
#define odr_putc(o, c)

Detailed Description

Internal ODR definitions.

Definition in file odr-priv.h.

Macro Definition Documentation

◆ odr_max

#define odr_max ( o)
Value:
((o)->op->size - ((o)->op->bp - (o)->op->buf))

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

Referenced by ber_any(), ber_bitstring(), ber_boolean(), ber_integer(), ber_null(), ber_octetstring(), ber_oidc(), ber_tag(), odr_choice(), odr_constructed_begin(), and odr_peektag().

◆ ODR_MAX_STACK

#define ODR_MAX_STACK   2000

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

Referenced by odr_constructed_begin().

◆ odr_putc

#define odr_putc ( o,
c )
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

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().

◆ ODR_STACK_EMPTY

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

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

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

◆ ODR_STACK_NOT_EMPTY

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

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

Referenced by ber_tag(), and odr_peektag().

◆ ODR_STACK_POP

#define ODR_STACK_POP ( x)
Value:
(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().

◆ odr_tell

#define odr_tell ( o)
Value:
((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().