2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-03-07 13:28:57 quinn
8 * *** empty log message ***
10 * Revision 1.4 1995/03/07 13:16:13 quinn
11 * Fixed bug in odr_reset
13 * Revision 1.3 1995/03/07 10:21:31 quinn
14 * odr_errno-->odr_error
16 * Revision 1.2 1995/03/07 10:19:05 quinn
17 * Addded some method functions to the ODR type.
19 * Revision 1.1 1995/03/07 09:23:15 quinn
20 * Installing top-level API and documentation.
33 "Memoy allocation failed",
36 "Required data element missing",
41 void odr_perror(ODR o, char *message)
43 fprintf(stderr, "%s: %s\n", message, odr_errlist[o->error]);
46 int odr_geterror(ODR o)
51 void odr_setprint(ODR o, FILE *file)
56 ODR odr_createmem(int direction)
60 if (!(r = malloc(sizeof(*r))))
62 r->direction = direction;
81 void odr_destroy(ODR o)
86 void odr_setbuf(ODR o, char *buf, int len)
88 o->buf = o->bp = (unsigned char *) buf;
89 o->buflen = o->left = len;
92 char *odr_getbuf(ODR o, int *len)
94 *len = o->bp - o->buf;
95 return (char *) o->buf;