X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=doc%2Fodr.xml;h=0f6ac6f6ef672c6ba636916e40acf5fb968ea7be;hp=627f5c91966e6af38424bc8e636af35aa1ae6f4d;hb=8356ea58313ee1f350226172cf99bfb0b7c5583c;hpb=6b76baf0fb5d0d437caedd8076f77f372d775758 diff --git a/doc/odr.xml b/doc/odr.xml index 627f5c9..0f6ac6f 100644 --- a/doc/odr.xml +++ b/doc/odr.xml @@ -262,7 +262,7 @@ Encoding and decoding functions - int odr_integer(ODR o, int **p, int optional, const char *name); + int odr_integer(ODR o, Odr_int **p, int optional, const char *name); int z_APDU(ODR o, Z_APDU **p, int optional, const char *name); @@ -311,7 +311,7 @@ void do_nothing_useful(int value) { ODR encode, decode; - int *valp, *resvalp; + Odr_int *valp, *resvalp; char *bufferp; int len; @@ -337,7 +337,8 @@ void do_nothing_useful(int value) printf("decoding went bad\n"); return; } - printf("the value is %d\n", *resvalp); + /* ODR_INT_PRINTF format for printf (such as %d) */ + printf("the value is " ODR_INT_PRINTF "\n", *resvalp); /* clean up */ odr_destroy(encode); @@ -585,11 +586,11 @@ void do_nothing_useful(int value) - int odr_integer(ODR o, int **p, int optional, const char *name); + int odr_integer(ODR o, Odr_int **p, int optional, const char *name); - (we don't allow values that can't be contained in a C integer.) + The Odr_int is just a simple integer. @@ -638,7 +639,7 @@ void do_nothing_useful(int value) BOOLEAN -int odr_bool(ODR o, bool_t **p, int optional, const char *name); +int odr_bool(ODR o, Odr_bool **p, int optional, const char *name); @@ -652,7 +653,7 @@ int odr_bool(ODR o, bool_t **p, int optional, const char *name); NULL -int odr_null(ODR o, bool_t **p, int optional, const char *name); +int odr_null(ODR o, Odr_null **p, int optional, const char *name); @@ -794,7 +795,7 @@ int odr_explicit_tag(ODR o, Odr_fun fun, int class, int tag, -int myInt(ODR o, int **p, int optional, const char *name) +int myInt(ODR o, Odr_int **p, int optional, const char *name) { return odr_implicit_tag(o, odr_integer, p, ODR_CONTEXT, 210, optional, name); @@ -866,8 +867,8 @@ MySequence ::= SEQUENCE { typedef struct MySequence { - int *intval; - bool_t *boolval; + Odr_int *intval; + Odr_bool *boolval; } MySequence; int mySequence(ODR o, MySequence **p, int optional, const char *name) @@ -1070,7 +1071,7 @@ MyArray ::= SEQUENCE OF INTEGER typedef struct MyArray { int num_elements; - int **elements; + Odr_int **elements; } MyArray; @@ -1194,9 +1195,9 @@ typedef struct MyChoice } which; union { - int *untagged; - int *tagged; - bool_t *other; + Odr_int *untagged; + Odr_int *tagged; + Odr_bool *other; } u; };