zoomsh: only prints ZOOM> lead if a console is use (isatty)
[yaz-moved-to-github.git] / zoom / zoomtst4.c
index 9bc0eaa..3962561 100644 (file)
@@ -1,8 +1,6 @@
-/*
- * $Id: zoomtst4.c,v 1.8 2005-06-25 15:46:08 adam Exp $
- *
- * Asynchronous multi-target going through proxy doing search and retrieve
- * using present.
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) Index Data
+ * See the file LICENSE for details.
  */
 
 #include <stdio.h>
@@ -47,7 +45,7 @@ int main(int argc, char **argv)
 
     /* set proxy */
     ZOOM_options_set (o, "proxy", argv[1]);
-    
+
     /* create query */
     q = ZOOM_query_create ();
     if (ZOOM_query_prefix (q, argv[argc-1]))
@@ -77,8 +75,8 @@ int main(int argc, char **argv)
                      ZOOM_connection_option_get(z[i], "host"),
                      errmsg, error, addinfo);
         else
-            printf ("%s: %d hits\n", ZOOM_connection_option_get(z[i], "host"),
-                    ZOOM_resultset_size(r[i]));
+            printf ("%s: %ld hits\n", ZOOM_connection_option_get(z[i], "host"),
+                    (long) ZOOM_resultset_size(r[i]));
     }
 
     /* destroy stuff and exit */
@@ -94,6 +92,7 @@ int main(int argc, char **argv)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab