2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: odr_any.c,v 1.4 2005-01-15 19:47:14 adam Exp $
10 * \brief Implements ODR ANY codec
20 * This is a catch-all type. It stuffs a random ostring (assumed to be properly
21 * encoded) into the stream, or reads a full data element. Implicit tagging
22 * does not work, and neither does the optional flag, unless the element
23 * is the last in a sequence.
25 int odr_any(ODR o, Odr_any **p, int opt, const char *name)
29 if (o->direction == ODR_PRINT)
32 odr_printf(o, "ANY (len=%d)\n", (*p)->len);
35 if (o->direction == ODR_DECODE)
36 *p = (Odr_oct *)odr_malloc(o, sizeof(**p));
40 return odr_missing(o, opt, name);