YAZ_EXPORT Odr_oid *odr_oiddup_nmem(NMEM nmem, const Odr_oid *o);
YAZ_EXPORT int odr_grow_block(ODR b, int min_bytes);
YAZ_EXPORT int odr_write(ODR o, unsigned char *buf, int bytes);
+YAZ_EXPORT int odr_write2(ODR o, const char *buf, int bytes);
YAZ_EXPORT int odr_seek(ODR o, int whence, int offset);
YAZ_EXPORT int odr_dumpBER(FILE *f, const char *buf, int len);
YAZ_EXPORT void odr_choice_bias(ODR o, int what);
return 0;
}
-int odr_write(ODR o, unsigned char *buf, int bytes)
+int odr_write2(ODR o, const char *buf, int bytes)
{
if (o->pos + bytes >= o->size && odr_grow_block(o, bytes))
{
return 0;
}
+int odr_write(ODR o, unsigned char *buf, int bytes)
+{
+ return odr_write2(o, (char *) buf, bytes);
+}
+
int odr_seek(ODR o, int whence, int offset)
{
if (whence == ODR_S_CUR)