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.ctr | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 support/dktools/test-binenc.ctr (limited to 'support/dktools/test-binenc.ctr') diff --git a/support/dktools/test-binenc.ctr b/support/dktools/test-binenc.ctr new file mode 100644 index 0000000000..0a995eb792 --- /dev/null +++ b/support/dktools/test-binenc.ctr @@ -0,0 +1,33 @@ + + +#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