Moved ignore files.
[yaz-moved-to-github.git] / zoom / zoomtst3.c
index 4b6cf9b..98f797c 100644 (file)
@@ -1,8 +1,10 @@
-/*
- * $Id: zoomtst3.c,v 1.9 2005-06-25 15:46:08 adam Exp $
- *
- * Asynchronous multi-target client doing search and piggyback retrieval
- */
+/* $Id: zoomtst3.c,v 1.13 2007-01-10 13:25:46 adam Exp $  */
+
+/** \file zoomtst3.c
+    \brief Asynchronous multi-target client
+    
+    Performs search and piggyback retrieval of records
+*/
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -24,8 +26,8 @@ int main(int argc, char **argv)
 
     if (argc < 3)
     {
-        fprintf (stderr, "usage:\n%s target1 target2 ... targetN query\n",
-                 *argv);
+        fprintf (stderr, "usage:\n%s target1 target2 ... targetN query\n"
+                         "%s number target query\n", *argv, *argv);
         exit (1);
     }
     if (argc == 4 && isdigit(argv[1][0]) && !strchr(argv[1],'.'))
@@ -66,7 +68,9 @@ int main(int argc, char **argv)
     /* network I/O. pass number of connections and array of connections */
     while ((i = ZOOM_event (no, z)))
     {
-        printf ("no = %d event = %d\n", i-1,
+        int peek = ZOOM_connection_peek_event(z[i-1]);
+        printf ("no = %d peek = %d event = %d\n", i-1,
+                peek,
                 ZOOM_connection_last_event(z[i-1]));
     }
     
@@ -84,7 +88,7 @@ int main(int argc, char **argv)
         {
             /* OK, no major errors. Look at the result count */
             int pos;
-            printf ("%s: %d hits\n", tname, ZOOM_resultset_size(r[i]));
+            printf ("%s: %ld hits\n", tname, (long) ZOOM_resultset_size(r[i]));
             /* go through all records at target */
             for (pos = 0; pos < 10; pos++)
             {