#include <stdio.h>
#include <string.h>
#include <elwix.h>
int main(int argc, char **argv)
{
int ret;
char str[256], *s, s0[2][256];
ait_val_t *v;
if (argc < 2) {
printf("regex:: regex_Verify([0-9]+) -> %s\n",
regex_Verify("[0-9]+", "shmink132sdf09", NULL, NULL));
printf("regex:: %s regex_Get([0-9]+) -> %d\n", str,
regex_Get("[0-9]+", "shmink132sdf09", str, sizeof str));
printf("regex:: %s not match regex_Get([ab]+) -> %d\n", str,
regex_Get("[ab]+", "shmink132sdf09", str, sizeof str));
s = regex_Replace("[0-9]+", "0shmink132sdf09", "XXX");
printf("regex:: regex_Replace([0-9]+) -> %s with XXX\n", s);
e_free(s);
s = regex_Replace("[0-9]+", "shmink132sdf09", NULL);
printf("regex:: regex_Replace([0-9]+) -> %s clear!\n", s);
e_free(s);
}
if (argc > 2) {
char *s2;
v = str_Hex2Dig("PIUK_GN IAH");
printf("S1=%s\n", AIT_GET_LIKE(v, char*));
ait_freeVar(&v);
v = str_Hex2Dig(argv[1]);
printf("%s S1=%s\n", argv[1], AIT_GET_LIKE(v, char*));
s2 = str_Dig2Hex(v);
printf("S2=%s\n", s2);
if (s2)
e_free(s2);
ait_freeVar(&v);
printf( "1=%d\n", str_LTrim(argv[1]));
printf( "2=%d\n", str_RTrim(argv[2]));
printf( "3=%d\n", str_Trim(argv[3]));
printf("'%s' '%s' '%s'\n", argv[1], argv[2], argv[3]);
printf("test p=%s f=%s path2file=%d\n", s0[0], s0[1],
av_Path2File(argv[2], s0[0], 256, s0[1], 256));
return 0;
}
return 0;
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>