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-binenc.c | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 support/dktools/test-binenc.c (limited to 'support/dktools/test-binenc.c') diff --git a/support/dktools/test-binenc.c b/support/dktools/test-binenc.c new file mode 100644 index 0000000000..e5c3dfe101 --- /dev/null +++ b/support/dktools/test-binenc.c @@ -0,0 +1,45 @@ +/* + 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-binenc.ctr +*/ + +/** @file test-binenc.c The test-binenc module. +*/ + + +#line 1 "test-binenc.ctr" + + +#include "dk4conf.h" +#include + + +#include "dk4binenc.h" + + +static char tbuf[9]; + + +static const unsigned char srcbuf[] = { + 0x01, 0x02, 0x0A, 0x0F, 0x20, 0x24, 0xFF +}; + +int main(void) +{ + int res; + + res = dk4binenc( + tbuf, sizeof(tbuf), srcbuf, sizeof(srcbuf), + DK4_BINARY_TO_TEXT_ENCODING_A85, + NULL + ); + if (0 < res) { + fputs(tbuf, stdout); + fputc('\n', stdout); + } else { + fputs("buffer to small\n", stdout); + } + return 0; +} -- cgit v1.2.3