2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.3 1995-03-07 10:21:31 quinn
8 * odr_errno-->odr_error
10 * Revision 1.2 1995/03/07 10:19:05 quinn
11 * Addded some method functions to the ODR type.
13 * Revision 1.1 1995/03/07 09:23:15 quinn
14 * Installing top-level API and documentation.
27 "Memoy allocation failed",
30 "Required data element missing",
35 void odr_perror(ODR o, char *message)
37 fprintf(stderr, "%s: %s\n", message, odr_errlist[o->error]);
45 void odr_setprint(ODR o, FILE *file)
50 ODR odr_createmem(int direction)
54 if (!(r = malloc(sizeof(*r))))
56 r->direction = direction;
75 void odr_destroy(ODR o)
80 void odr_setbuf(ODR o, char *buf, int len)
82 o->buf = o->bp = (unsigned char *) buf;
83 o->buflen = o->left = len;
86 char *odr_getbuf(ODR o, int *len)
88 *len = o->bp - o->buf;
89 return (char *) o->buf;