2 * Copyright (c) 1995-2003, Index Data
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
6 * $Id: odr_any.c,v 1.2 2004-08-11 12:15:38 adam Exp $
15 * This is a catch-all type. It stuffs a random ostring (assumed to be properly
16 * encoded) into the stream, or reads a full data element. Implicit tagging
17 * does not work, and neither does the optional flag, unless the element
18 * is the last in a sequence.
20 int odr_any(ODR o, Odr_any **p, int opt, const char *name)
24 if (o->direction == ODR_PRINT)
27 odr_printf(o, "ANY (len=%d)\n", (*p)->len);
30 if (o->direction == ODR_DECODE)
31 *p = (Odr_oct *)odr_malloc(o, sizeof(**p));
35 return odr_missing(o, opt, name);