+
+void odr_setbuf(ODR o, char *buf, int len, int can_grow)
+{
+ o->bp = (unsigned char *) buf;
+
+ o->buf = (unsigned char *) buf;
+ o->can_grow = can_grow;
+ o->top = o->pos = 0;
+ o->size = len;
+}
+
+char *odr_getbuf(ODR o, int *len, int *size)
+{
+ *len = o->top;
+ if (size)
+ *size = o->size;
+ return (char*) o->buf;
+}
+