X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr_any.c;h=4cf196b221e0f8e901487865fcf0a0091a20ce01;hp=ac1a4f530e665bd5182e619e071b7eb10199663f;hb=8cb8947e3a7bff4dbf8f124871cb4905df1adce7;hpb=c6e47cbbff56f39f6d81b079ebaeac41d793d4d9 diff --git a/src/odr_any.c b/src/odr_any.c index ac1a4f5..4cf196b 100644 --- a/src/odr_any.c +++ b/src/odr_any.c @@ -1,17 +1,20 @@ -/* - * Copyright (c) 1995-2003, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) Index Data * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss - * - * $Id: odr_any.c,v 1.1 2003-10-27 12:21:33 adam Exp $ */ + +/** + * \file odr_any.c + * \brief Implements ODR ANY codec + */ + #if HAVE_CONFIG_H #include #endif #include "odr-priv.h" -/* +/** * This is a catch-all type. It stuffs a random ostring (assumed to be properly * encoded) into the stream, or reads a full data element. Implicit tagging * does not work, and neither does the optional flag, unless the element @@ -20,17 +23,26 @@ int odr_any(ODR o, Odr_any **p, int opt, const char *name) { if (o->error) - return 0; + return 0; if (o->direction == ODR_PRINT) { - odr_prname(o, name); - fprintf(o->print, "ANY (len=%d)\n", (*p)->len); - return 1; + odr_prname(o, name); + odr_printf(o, "ANY (len=%d)\n", (*p)->len); + return 1; } if (o->direction == ODR_DECODE) - *p = (Odr_oct *)odr_malloc(o, sizeof(**p)); + *p = (Odr_oct *)odr_malloc(o, sizeof(**p)); if (ber_any(o, p)) - return 1; + return 1; *p = 0; return odr_missing(o, opt, name); } +/* + * Local variables: + * c-basic-offset: 4 + * c-file-style: "Stroustrup" + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +