X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=index%2Fapitest.c;h=30470440582f5d9ebf4804c4e29e6a9ad518a63d;hb=a4672c6ad0168d8c39b6806e33b90cba4151ac0d;hp=7207b97927b63cbb421118fc8de78fd644339db1;hpb=6e044d5a523bb4363d07af757ebf1bcfe0ad6c04;p=idzebra-moved-to-github.git diff --git a/index/apitest.c b/index/apitest.c index 7207b97..3047044 100644 --- a/index/apitest.c +++ b/index/apitest.c @@ -1,8 +1,8 @@ #include -#include -#include +#include +#include #include "zebraapi.h" /* Small routine to display GRS-1 record variants ... */ @@ -109,7 +109,7 @@ int main (int argc, char **argv) nmem_init (); - log_init_file("apitest.log"); + yaz_log_init_file("apitest.log"); odr_input = odr_createmem (ODR_DECODE); odr_output = odr_createmem (ODR_ENCODE); @@ -147,9 +147,27 @@ int main (int argc, char **argv) odr_reset (odr_input); continue; } + else + { + char out_str[100]; + int r; +#if 1 + r = zebra_string_norm (zh, 'w', + argv[argno], strlen(argv[argno]), + out_str, sizeof(out_str)); + if (r >= 0) + { + printf ("norm: '%s'\n", out_str); + } + else + { + printf ("norm fail: %d\n", r); + } +#endif + } /* result set name will be called 1,2, etc */ - sprintf (setname, "%d", i); + sprintf (setname, "%d", argno); /* fire up the search */ zebra_search_rpn (zh, odr_input, odr_output, query, 1, &base, setname);