summaryrefslogtreecommitdiff
path: root/support/dktools/test-strms.c
blob: 17b860fe3de281f29de618f25d58159bd1b8f636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
	WARNING: This file was generated by dkct.
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: test-strms.ctr
*/

/**	@file test-strms.c The test-strms module.
*/


#line 1 "test-strms.ctr"

#include "dk4conf.h"

#include <math.h>

#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 : */