From f34de3e6a08dfb7e5440264730b75ba713e55789 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 11 Aug 2004 12:47:35 +0000 Subject: [PATCH] Document odr_setpring and odr_set_stream. --- doc/odr.xml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/doc/odr.xml b/doc/odr.xml index 2824d6c..4f6ea57 100644 --- a/doc/odr.xml +++ b/doc/odr.xml @@ -1,4 +1,4 @@ - + The ODR Module Introduction @@ -355,6 +355,31 @@ void do_nothing_useful(int value) + Printing + + When an ODR stream is created of type ODR_PRINT + the ODR module will print the contents of a PDU in a readable format. + By default output is written to the stderr stream. + This behavior can be changed, however, by calling the function + + odr_setprint(ODR o, FILE *file); + + before encoders or decoders are being invoked. + It is also possible to direct the output to a buffer (of indeed + another file), by using the more generic mechanism: + + void odr_set_stream(ODR o, void *handle, + void (*stream_puts)(void *handle, const char *strz), + void (*stream_close)(void *handle)); + + Here the user provides an opaque handle and two handlers, + stream_puts for printing, + and stream_close which is supposed + to close/free resources associated with handle. + The stream_close handler is optional and + if NULL for the function is provided, it will not be invoked. + + Diagnostics -- 1.7.10.4