1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2009 Index Data
3 * See the file LICENSE for details.
7 * \brief Implements ODR IMPLICIT tagging codec
15 int odr_peektag(ODR o, int *zclass, int *tag, int *cons)
17 if (o->direction != ODR_DECODE)
19 odr_seterror(o, OOTHER, 48);
22 if (ODR_STACK_NOT_EMPTY(o) && !odr_constructed_more(o))
24 if (ber_dectag(o->bp, zclass, tag, cons, odr_max(o)) <= 0)
26 odr_seterror(o, OREQUIRED, 49);
32 int odr_implicit_settag(ODR o, int zclass, int tag)
36 if (o->op->t_class < 0)
38 o->op->t_class = zclass;
44 int odr_initmember(ODR o, void *p, int size)
46 char **pp = (char **) p;
50 if (o->direction == ODR_DECODE)
51 *pp = (char *)odr_malloc(o, size);
62 * c-file-style: "Stroustrup"
63 * indent-tabs-mode: nil
65 * vim: shiftwidth=4 tabstop=8 expandtab