/*
- * Copyright (c) 1995-2003, Index Data
+ * Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
- * $Id: odr_cons.c,v 1.2 2004-08-11 12:15:38 adam Exp $
+ * $Id: odr_cons.c,v 1.4 2004-10-15 00:19:00 adam Exp $
*
*/
+
+/**
+ * \file odr_cons.c
+ * \brief Implements ODR constructed codec.
+ */
+
#if HAVE_CONFIG_H
#include <config.h>
#endif
}
o->op->stack[++(o->op->stackp)].lenb = o->bp;
o->op->stack[o->op->stackp].len_offset = odr_tell(o);
+ o->op->stack_names[o->op->stackp] = name ? name : "?";
+ o->op->stack_names[o->op->stackp + 1] = 0;
#ifdef ODR_DEBUG
fprintf(stderr, "[cons_begin(%d)]", o->op->stackp);
#endif
if (odr_write(o, dummy, lenlen) < 0) /* dummy */
{
+ o->op->stack_names[o->op->stackp] = 0;
--(o->op->stackp);
return 0;
}
odr_max(o))) < 0)
{
odr_seterror(o, OOTHER, 31);
+ o->op->stack_names[o->op->stackp] = 0;
--(o->op->stackp);
return 0;
}
if (o->op->stack[o->op->stackp].len > odr_max(o))
{
odr_seterror(o, OOTHER, 32);
+ o->op->stack_names[o->op->stackp] = 0;
--(o->op->stackp);
return 0;
}
else
{
odr_seterror(o, OOTHER, 33);
+ o->op->stack_names[o->op->stackp] = 0;
--(o->op->stackp);
return 0;
}
odr_seterror(o, OOTHER, 34);
return 0;
}
+ o->op->stack_names[o->op->stackp] = 0;
switch (o->direction)
{
case ODR_DECODE: