2 * Copyright (c) 1995-2003, Index Data
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
6 * $Id: odr_null.c,v 1.1 2003-10-27 12:21:33 adam Exp $
15 * Top level null en/decoder.
16 * Returns 1 on success, 0 on error.
18 int odr_null(ODR o, Odr_null **p, int opt, const char *name)
26 o->t_class = ODR_UNIVERSAL;
29 if ((res = ber_tag(o, p, o->t_class, o->t_tag, &cons, opt, name)) < 0)
32 return odr_missing(o, opt, name);
33 if (o->direction == ODR_PRINT)
36 fprintf(o->print, "NULL\n");
41 #ifdef ODR_STRICT_NULL
42 odr_seterror(OPROTO, 42);
45 fprintf(stderr, "odr: Warning: Bad NULL\n");
48 if (o->direction == ODR_DECODE)