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-dk4str8.c | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 support/dktools/test-dk4str8.c (limited to 'support/dktools/test-dk4str8.c') diff --git a/support/dktools/test-dk4str8.c b/support/dktools/test-dk4str8.c new file mode 100644 index 0000000000..05e48be6e3 --- /dev/null +++ b/support/dktools/test-dk4str8.c @@ -0,0 +1,60 @@ +/* + 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-dk4str8.ctr +*/ + +/** @file test-dk4str8.c The test-dk4str8 module. +*/ + + +#line 1 "test-dk4str8.ctr" + + +#include "dk4conf.h" +#include "dk4types.h" + +#include + +#include "dk4mem.h" +#include "dk4error.h" +#include "dk4str8.h" + + +int main(void) +{ + char buffer[256]; + char *p1; + char *p2; + + +#line 19 "test-dk4str8.ctr" + + +#line 20 "test-dk4str8.ctr" + while(NULL != fgets(buffer, sizeof(buffer), stdin)) { + dk4str8_normalize(buffer, NULL); + p1 = dk4str8_start(buffer, NULL); + if (NULL != p1) { + p2 = dk4str8_next(p1, NULL); + if (NULL != p2) { + printf("p1 = \"%s\"\n", p1); + printf("p2 = \"%s\"\n", p2); + if (dk4str8_is_abbr(p1, p2, '$', 1)) { + printf("yes\n"); + } else { + printf("no\n"); + } + } + } + } + + +#line 37 "test-dk4str8.ctr" + + +#line 38 "test-dk4str8.ctr" + return 0; +} + -- cgit v1.2.3