2 * Copyright (c) 1995-2004, Index Data
3 * See the file LICENSE for details.
5 * $Id: odr_null.c,v 1.3 2004-08-11 12:15:38 adam Exp $
14 * Top level null en/decoder.
15 * Returns 1 on success, 0 on error.
17 int odr_null(ODR o, Odr_null **p, int opt, const char *name)
25 o->t_class = ODR_UNIVERSAL;
28 if ((res = ber_tag(o, p, o->t_class, o->t_tag, &cons, opt, name)) < 0)
31 return odr_missing(o, opt, name);
32 if (o->direction == ODR_PRINT)
35 odr_printf(o, "NULL\n");
40 #ifdef ODR_STRICT_NULL
41 odr_seterror(OPROTO, 42);
44 /* Warning: Bad NULL */
47 if (o->direction == ODR_DECODE)