X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomtst2.c;fp=zoom%2Fzoomtst2.c;h=c0d85dbd30a5321b603f42778126148c9cc8c517;hp=9dede46ba944bcf21dc69a1ac5c1fc6c33cca15a;hb=13671e7cc0f3dd4e4b02f94d64a50778c5696ba6;hpb=b340923765c14d2ba050a171bb557474044d7e6a diff --git a/zoom/zoomtst2.c b/zoom/zoomtst2.c index 9dede46..c0d85db 100644 --- a/zoom/zoomtst2.c +++ b/zoom/zoomtst2.c @@ -1,5 +1,5 @@ /* - * $Id: zoomtst2.c,v 1.2 2001-11-15 13:16:02 adam Exp $ + * $Id: zoomtst2.c,v 1.3 2001-11-18 21:14:23 adam Exp $ * * Asynchronous single-target client performing search (no retrieval) */ @@ -11,8 +11,8 @@ int main(int argc, char **argv) { - Z3950_connection z; - Z3950_resultset r; + ZOOM_connection z; + ZOOM_resultset r; int error; const char *errmsg, *addinfo; @@ -25,30 +25,30 @@ int main(int argc, char **argv) } /* create connection (don't connect yet) */ - z = Z3950_connection_create(0); + z = ZOOM_connection_create(0); /* option: set async operation */ - Z3950_connection_option_set (z, "async", "1"); + ZOOM_connection_option_set (z, "async", "1"); /* connect to target and initialize */ - Z3950_connection_connect (z, argv[1], 0); + ZOOM_connection_connect (z, argv[1], 0); /* search using prefix query format */ - r = Z3950_connection_search_pqf (z, argv[2]); + r = ZOOM_connection_search_pqf (z, argv[2]); /* block here: only one connection */ - while (Z3950_event (1, &z)) + while (ZOOM_event (1, &z)) ; /* see if any error occurred */ - if ((error = Z3950_connection_error(z, &errmsg, &addinfo))) + if ((error = ZOOM_connection_error(z, &errmsg, &addinfo))) { fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo); exit (2); } else /* OK print hit count */ - printf ("Result count: %d\n", Z3950_resultset_size(r)); - Z3950_resultset_destroy (r); - Z3950_connection_destroy (z); + printf ("Result count: %d\n", ZOOM_resultset_size(r)); + ZOOM_resultset_destroy (r); + ZOOM_connection_destroy (z); exit (0); }