X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fodr.xml;h=627f5c91966e6af38424bc8e636af35aa1ae6f4d;hb=16ae6b899b1eb60c570650b7acc8e673531f5510;hp=51189f3ea64dcebf2610164f93182ba86001862b;hpb=d940392c53c32ccf76fb287cc5b997b9e921a431;p=yaz-moved-to-github.git
diff --git a/doc/odr.xml b/doc/odr.xml
index 51189f3..627f5c9 100644
--- a/doc/odr.xml
+++ b/doc/odr.xml
@@ -104,7 +104,7 @@
- void odr_reset(ODR o, int size);
+ void odr_reset(ODR o);
@@ -321,23 +321,23 @@ void do_nothing_useful(int value)
if (!(decode = odr_createmem(ODR_DECODE)))
return;
- valp = &value;
- if (odr_integer(encode, &valp, 0, 0) == 0)
+ valp = &value;
+ if (odr_integer(encode, &valp, 0, 0) == 0)
{
printf("encoding went bad\n");
return;
}
- bufferp = odr_getbuf(encode, &len);
- printf("length of encoded data is %d\n", len);
+ bufferp = odr_getbuf(encode, &len, 0);
+ printf("length of encoded data is %d\n", len);
/* now let's decode the thing again */
- odr_setbuf(decode, bufferp, len);
- if (odr_integer(decode, &resvalp, 0, 0) == 0)
+ odr_setbuf(decode, bufferp, len, 0);
+ if (odr_integer(decode, &resvalp, 0, 0) == 0)
{
printf("decoding went bad\n");
return;
}
- printf("the value is %d\n", *resvalp);
+ printf("the value is %d\n", *resvalp);
/* clean up */
odr_destroy(encode);
@@ -504,7 +504,7 @@ void do_nothing_useful(int value)
Summary and Synopsis
- #include <odr.h>
+ #include <yaz/odr.h>
ODR odr_createmem(int direction);
@@ -512,19 +512,17 @@ void do_nothing_useful(int value)
void odr_reset(ODR o);
- char *odr_getbuf(ODR o, int *len);
+ char *odr_getbuf(ODR o, int *len, int *size);
- void odr_setbuf(ODR o, char *buf, int len);
+ void odr_setbuf(ODR o, char *buf, int len, int can_grow);
void *odr_malloc(ODR o, int size);
- ODR_MEM odr_extract_mem(ODR o);
-
- void odr_release_mem(ODR_MEM r);
+ NMEM odr_extract_mem(ODR o);
int odr_geterror(ODR o);
- void odr_perror(char *message);
+ void odr_perror(ODR o, const char *message);
extern char *odr_errlist[];