2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1995-03-07 10:19:05 quinn
8 * Addded some method functions to the ODR type.
10 * Revision 1.1 1995/03/07 09:23:15 quinn
11 * Installing top-level API and documentation.
24 "Memoy allocation failed",
27 "Required data element missing",
32 void odr_perror(ODR o, char *message)
34 fprintf(stderr, "%s: %s\n", message, odr_errlist[o->error]);
42 void odr_setprint(ODR o, FILE *file)
47 ODR odr_createmem(int direction)
51 if (!(r = malloc(sizeof(*r))))
53 r->direction = direction;
72 void odr_destroy(ODR o)
77 void odr_setbuf(ODR o, char *buf, int len)
79 o->buf = o->bp = (unsigned char *) buf;
80 o->buflen = o->left = len;
83 char *odr_getbuf(ODR o, int *len)
85 *len = o->bp - o->buf;
86 return (char *) o->buf;