1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2008 Index Data
3 * See the file LICENSE for details.
8 #include <yaz/xmalloc.h>
11 int main(int argc, char **argv)
16 const char *errmsg, *addinfo;
20 fprintf (stderr, "usage:\n%s target query\n", *argv);
21 fprintf (stderr, " eg. bagel.indexdata.dk/gils computer\n");
24 z = ZOOM_connection_new (argv[1], 0);
26 if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
28 fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
32 r = ZOOM_connection_search_pqf (z, argv[2]);
33 if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
34 fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
36 printf ("Result count: %ld\n", (long) ZOOM_resultset_size(r));
37 ZOOM_resultset_destroy (r);
38 ZOOM_connection_destroy (z);
44 * indent-tabs-mode: nil
46 * vim: shiftwidth=4 tabstop=8 expandtab