1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2008 Index Data
3 * See the file LICENSE for details.
8 * \brief Implements ODR ANY codec
18 * This is a catch-all type. It stuffs a random ostring (assumed to be properly
19 * encoded) into the stream, or reads a full data element. Implicit tagging
20 * does not work, and neither does the optional flag, unless the element
21 * is the last in a sequence.
23 int odr_any(ODR o, Odr_any **p, int opt, const char *name)
27 if (o->direction == ODR_PRINT)
30 odr_printf(o, "ANY (len=%d)\n", (*p)->len);
33 if (o->direction == ODR_DECODE)
34 *p = (Odr_oct *)odr_malloc(o, sizeof(**p));
38 return odr_missing(o, opt, name);
43 * indent-tabs-mode: nil
45 * vim: shiftwidth=4 tabstop=8 expandtab