2 * $Id: zoomtst1.c,v 1.1 2001-10-23 21:00:20 adam Exp $
4 * Synchronous single-target client doing search (but no retrieval)
12 int main(int argc, char **argv)
17 const char *errmsg, *addinfo;
21 fprintf (stderr, "usage:\n%s target query\n", *argv);
22 fprintf (stderr, " eg. bagel.indexdata.dk/gils computer\n");
25 z = Z3950_connection_new (argv[1], 0);
27 if ((error = Z3950_connection_error(z, &errmsg, &addinfo)))
29 fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
33 r = Z3950_connection_search_pqf (z, argv[2]);
34 if ((error = Z3950_connection_error(z, &errmsg, &addinfo)))
35 fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
37 printf ("Result count: %d\n", Z3950_resultset_size(r));
38 Z3950_resultset_destroy (r);
39 Z3950_connection_destroy (z);