blob: 9d22ae90f7d51e800983d7e3c2c767b4f7188755 (
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
|
#include "dk4conf.h"
#include "dk4types.h"
#include <stdio.h>
#include "dk4mem.h"
#include "dk4error.h"
#include "dk4str8.h"
int main(void)
{
char buffer[256];
char *p1;
char *p2;
$!trace-init test-dk4str8.deb
$? "+ main"
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");
}
}
}
}
$? "- main"
$!trace-end
return 0;
}
|