summaryrefslogtreecommitdiff
path: root/support/dktools/test-bool.ctr
blob: c717e2f2f5ebe31ab3ed42a1e82d92c1f10ee933 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

#include "dk4conf.h"
#include "dk4str8.h"

#include <stdio.h>



$!trace-include



static const char * const teststr[] = {
$!string-table
ja
nein
yes
no
y
n
on
off
o
of
true
tru
tr
t
false
fals
fal
fa
f
0
1
2
+
-
*
/
JA
J
NEIN
N
YES
NO
YE
N
Y
OFF
OF
O
OfF
TRUE
TRU
TR
T
B
FALSE
FALSCH
FAL
FA
F
0815
$!end
};

int main(void)
{
  const char * const	*ptr;
  $!trace-init test-bool.deb
  $? "+ main"
  ptr = teststr;
  while (NULL != *ptr) {
    printf("%d %d \"%s\"\n",
      dk4str8_is_bool(*ptr),
      dk4str8_is_on(*ptr),
      *ptr
    );
    ptr++;
  }
  $? "- main"
  $!trace-end
  return 0;
}