1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2012 Index Data
3 * See the file LICENSE for details.
7 * \brief Implements ODR NULL codec
16 * Top level null en/decoder.
17 * Returns 1 on success, 0 on error.
19 int odr_null(ODR o, Odr_null **p, int opt, const char *name)
25 if (o->op->t_class < 0)
27 o->op->t_class = ODR_UNIVERSAL;
28 o->op->t_tag = ODR_NULL;
30 res = ber_tag(o, p, o->op->t_class, o->op->t_tag, &cons, opt, name);
34 return odr_missing(o, opt, name);
35 if (o->direction == ODR_PRINT)
38 odr_printf(o, "NULL\n");
43 #ifdef ODR_STRICT_NULL
44 odr_seterror(OPROTO, 42);
47 /* Warning: Bad NULL */
50 if (o->direction == ODR_DECODE)
57 * c-file-style: "Stroustrup"
58 * indent-tabs-mode: nil
60 * vim: shiftwidth=4 tabstop=8 expandtab