From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/dktools/test-strms.ctr | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 support/dktools/test-strms.ctr (limited to 'support/dktools/test-strms.ctr') diff --git a/support/dktools/test-strms.ctr b/support/dktools/test-strms.ctr new file mode 100644 index 0000000000..dd4910804c --- /dev/null +++ b/support/dktools/test-strms.ctr @@ -0,0 +1,36 @@ + +#include "dk4conf.h" + +#include + +#include "dk4strm.h" +#include "dk4strmw.h" +#include "dk4strms.h" + +static const char t1[] = { "Dies ist ein Test-String." }; + +int main(void) +{ + dk4_stream_t *wrstr; + + wrstr = dk4stream_open_file_writer("/tmp/test.dat.gz", NULL); + if (NULL != wrstr) { + dk4stream_serialize_u32(wrstr, 25UL, NULL); + dk4stream_serialize_i32(wrstr, -16L, NULL); + dk4stream_serialize_string(wrstr, t1, NULL); + dk4stream_serialize_u16(wrstr, 50U, NULL); + dk4stream_serialize_double(wrstr, M_PI, 1.0e-6, NULL); + dk4stream_serialize_i16(wrstr, -32, NULL); + dk4stream_serialize_double_0(wrstr, NULL); + dk4stream_serialize_u8(wrstr, 100, NULL); + dk4stream_serialize_i8(wrstr, -64, NULL); + dk4stream_close(wrstr, NULL); + } + else { + } + return 0; +} + + +/* vim: set ai sw=4 ts=4 : */ + -- cgit v1.2.3