Happy new year.
[idzebra-moved-to-github.git] / test / api / testclient.c
index 78ce9ba..2418dfc 100644 (file)
@@ -1,8 +1,21 @@
-/*
- * $Id: testclient.c,v 1.2 2004-09-22 12:13:10 heikki Exp $
- *
- * Z39.50 client specifically for Zebra testing.
- */
+/* This file is part of the Zebra server.
+   Copyright (C) 1994-2011 Index Data
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+*/
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -68,7 +81,7 @@ int main(int argc, char **argv)
         }
     }
 
-    if (!target || !target)
+    if (!target || !query)
     {
         printf ("%s: missing target/query\n", prog);
         printf ("usage:\n%s [options] target query \n", prog);
@@ -98,11 +111,11 @@ int main(int argc, char **argv)
     }
     else
     {
-       printf ("Result count: %d\n", ZOOM_resultset_size(r));
+       printf ("Result count: %ld\n", (long) ZOOM_resultset_size(r));
        if (check_count != -1 && check_count != ZOOM_resultset_size(r))
        {
-           printf("Wrong number of hits, expected %d, got %d\n",
-                           check_count, ZOOM_resultset_size(r) );
+           printf("Wrong number of hits, expected %d, got %ld\n",
+                           check_count, (long) ZOOM_resultset_size(r) );
            exit(3);
        }
     }
@@ -125,3 +138,12 @@ int main(int argc, char **argv)
     ZOOM_connection_destroy (z);
     exit (exit_code);
 }
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+