projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
document parameter (Doxygen warning)
[yaz-moved-to-github.git]
/
zoom
/
zoomtst1.c
diff --git
a/zoom/zoomtst1.c
b/zoom/zoomtst1.c
index
a70e173
..
73744c9
100644
(file)
--- a/
zoom/zoomtst1.c
+++ b/
zoom/zoomtst1.c
@@
-1,7
+1,6
@@
-/*
- * $Id: zoomtst1.c,v 1.3 2001-11-18 21:14:23 adam Exp $
- *
- * Synchronous single-target client doing search (but no retrieval)
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2013 Index Data
+ * See the file LICENSE for details.
*/
#include <stdlib.h>
*/
#include <stdlib.h>
@@
-23,19
+22,31
@@
int main(int argc, char **argv)
exit (1);
}
z = ZOOM_connection_new (argv[1], 0);
exit (1);
}
z = ZOOM_connection_new (argv[1], 0);
-
+
if ((error = ZOOM_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);
+ fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
+ exit (2);
}
}
+ ZOOM_connection_option_set(z, "saveAPDU", "1");
r = ZOOM_connection_search_pqf (z, argv[2]);
if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
r = ZOOM_connection_search_pqf (z, argv[2]);
if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
- fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
+ fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
else
else
- printf ("Result count: %d\n", ZOOM_resultset_size(r));
+ printf ("Result count: %ld\n", (long) ZOOM_resultset_size(r));
+ puts("APDUlog");
+ puts(ZOOM_connection_option_get(z, "APDU"));
ZOOM_resultset_destroy (r);
ZOOM_connection_destroy (z);
exit (0);
}
ZOOM_resultset_destroy (r);
ZOOM_connection_destroy (z);
exit (0);
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+