projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Announce new functionality API on Debian
[yaz-moved-to-github.git]
/
doc
/
odr.xml
diff --git
a/doc/odr.xml
b/doc/odr.xml
index
627f5c9
..
45f8326
100644
(file)
--- a/
doc/odr.xml
+++ b/
doc/odr.xml
@@
-94,7
+94,7
@@
</para>
<synopsis>
</para>
<synopsis>
- void *odr_malloc(ODR o, int size);
+ void *odr_malloc(ODR o, size_t size);
</synopsis>
<para>
</synopsis>
<para>
@@
-120,7
+120,7
@@
</para>
<synopsis>
</para>
<synopsis>
- int odr_total(ODR o);
+ size_t odr_total(ODR o);
</synopsis>
<para>
</synopsis>
<para>
@@
-262,7
+262,7
@@
<example id="example.odr.encoding.and.decoding.functions">
<title>Encoding and decoding functions</title>
<synopsis>
<example id="example.odr.encoding.and.decoding.functions">
<title>Encoding and decoding functions</title>
<synopsis>
- 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);
</synopsis>
int z_APDU(ODR o, Z_APDU **p, int optional, const char *name);
</synopsis>
@@
-308,10
+308,10
@@
informative operation.
</para>
<programlisting><![CDATA[
informative operation.
</para>
<programlisting><![CDATA[
-void do_nothing_useful(int value)
+void do_nothing_useful(Odr_int value)
{
ODR encode, decode;
{
ODR encode, decode;
- int *valp, *resvalp;
+ Odr_int *valp, *resvalp;
char *bufferp;
int len;
char *bufferp;
int len;
@@
-337,7
+337,8
@@
void do_nothing_useful(int value)
printf("decoding went bad\n");
return;
}
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);
/* clean up */
odr_destroy(encode);
@@
-585,11
+586,11
@@
void do_nothing_useful(int value)
</para>
<synopsis>
</para>
<synopsis>
- 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);
</synopsis>
<para>
</synopsis>
<para>
- (we don't allow values that can't be contained in a C integer.)
+ The <literal>Odr_int</literal> is just a simple integer.
</para>
<para>
</para>
<para>
@@
-638,7
+639,7
@@
void do_nothing_useful(int value)
<sect3 id="odr.boolean"><title>BOOLEAN</title>
<synopsis>
<sect3 id="odr.boolean"><title>BOOLEAN</title>
<synopsis>
-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);
</synopsis>
</sect3>
</synopsis>
</sect3>
@@
-652,7
+653,7
@@
int odr_bool(ODR o, bool_t **p, int optional, const char *name);
<sect3 id="odr.null"><title>NULL</title>
<synopsis>
<sect3 id="odr.null"><title>NULL</title>
<synopsis>
-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);
</synopsis>
<para>
</synopsis>
<para>
@@
-794,7
+795,7
@@
int odr_explicit_tag(ODR o, Odr_fun fun, int class, int tag,
</para>
<screen>
</para>
<screen>
-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);
{
return odr_implicit_tag(o, odr_integer, p,
ODR_CONTEXT, 210, optional, name);
@@
-866,8
+867,8
@@
MySequence ::= SEQUENCE {
<screen>
typedef struct MySequence
{
<screen>
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)
} 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;
typedef struct MyArray
{
int num_elements;
- int **elements;
+ Odr_int **elements;
} MyArray;
</screen>
} MyArray;
</screen>
@@
-1194,9
+1195,9
@@
typedef struct MyChoice
} which;
union
{
} which;
union
{
- int *untagged;
- int *tagged;
- bool_t *other;
+ Odr_int *untagged;
+ Odr_int *tagged;
+ Odr_bool *other;
} u;
};
</screen>
} u;
};
</screen>