Fixed a few warnings on non-libxml2 systems
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 29 Apr 2003 21:20:33 +0000 (21:20 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 29 Apr 2003 21:20:33 +0000 (21:20 +0000)
client/client.c
server/seshigh.c
zutil/zoom-c.c

index 697dc0d..d4986d0 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.188 2003-04-29 21:13:08 adam Exp $
+ * $Id: client.c,v 1.189 2003-04-29 21:20:33 adam Exp $
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
@@ -443,17 +443,6 @@ void cmd_open_remember_last_open_command(const char* arg, char* new_open_command
     }
 }
 
     }
 }
 
-int cmd_open(const char *arg)
-{
-    static char cur_host[200];
-    if (arg)
-    {
-        strncpy (cur_host, arg, sizeof(cur_host)-1);
-        cur_host[sizeof(cur_host)-1] = 0;
-    }
-    return session_connect(cur_host);
-}
-
 int session_connect(const char *arg)
 {
     void *add;
 int session_connect(const char *arg)
 {
     void *add;
@@ -523,6 +512,17 @@ int session_connect(const char *arg)
     return 0;
 }
 
     return 0;
 }
 
+int cmd_open(const char *arg)
+{
+    static char cur_host[200];
+    if (arg)
+    {
+        strncpy (cur_host, arg, sizeof(cur_host)-1);
+        cur_host[sizeof(cur_host)-1] = 0;
+    }
+    return session_connect(cur_host);
+}
+
 void try_reconnect() 
 {
     char* open_command;
 void try_reconnect() 
 {
     char* open_command;
@@ -1930,7 +1930,6 @@ static int send_presentRequest(const char *arg)
     oident prefsyn;
     int nos = 1;
     int oid[OID_SIZE];
     oident prefsyn;
     int nos = 1;
     int oid[OID_SIZE];
-    char *p;
     char setstring[100];
 
     req->referenceId = set_refid (out);
     char setstring[100];
 
     req->referenceId = set_refid (out);
index a2a28f9..f2a9bfb 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: seshigh.c,v 1.154 2003-04-24 13:30:32 adam Exp $
+ * $Id: seshigh.c,v 1.155 2003-04-29 21:20:33 adam Exp $
  */
 
 /*
  */
 
 /*
@@ -818,18 +818,18 @@ static void process_http_request(association *assoc, request *req)
 
     if (!strcmp(hreq->method, "GET"))
     {
 
     if (!strcmp(hreq->method, "GET"))
     {
-        char *charset = 0;
-        int ret = -1;
-        Z_SOAP *soap_package = 0;
         char *db = "Default";
         const char *p0 = hreq->path, *p1;
         char *db = "Default";
         const char *p0 = hreq->path, *p1;
-        static Z_SOAP_Handler soap_handlers[2] = {
 #if HAVE_XML2
 #if HAVE_XML2
+        int ret = -1;
+        char *charset = 0;
+        Z_SOAP *soap_package = 0;
+        static Z_SOAP_Handler soap_handlers[2] = {
             {"http://www.loc.gov/zing/srw/v1.0/", 0,
              (Z_SOAP_fun) yaz_srw_codec},
             {"http://www.loc.gov/zing/srw/v1.0/", 0,
              (Z_SOAP_fun) yaz_srw_codec},
-#endif
             {0, 0, 0}
         };
             {0, 0, 0}
         };
+#endif
         
         if (*p0 == '/')
             p0++;
         
         if (*p0 == '/')
             p0++;
index 7ce62e7..b2bfeea 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 2000-2003, Index Data
  * See the file LICENSE for details.
  *
  * Copyright (c) 2000-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: zoom-c.c,v 1.32 2003-04-28 11:04:52 adam Exp $
+ * $Id: zoom-c.c,v 1.33 2003-04-29 21:20:34 adam Exp $
  *
  * ZOOM layer for C, connections, result sets, queries.
  */
  *
  * ZOOM layer for C, connections, result sets, queries.
  */
@@ -106,11 +106,13 @@ static void set_dset_error (ZOOM_connection c, int error,
                 addinfo2 ? addinfo2 : "");
 }
 
                 addinfo2 ? addinfo2 : "");
 }
 
+#if HAVE_XML2
 static void set_HTTP_error (ZOOM_connection c, int error,
                             const char *addinfo, const char *addinfo2)
 {
     set_dset_error(c, error, "HTTP", addinfo, addinfo2);
 }
 static void set_HTTP_error (ZOOM_connection c, int error,
                             const char *addinfo, const char *addinfo2)
 {
     set_dset_error(c, error, "HTTP", addinfo, addinfo2);
 }
+#endif
 
 static void set_ZOOM_error (ZOOM_connection c, int error,
                            const char *addinfo)
 
 static void set_ZOOM_error (ZOOM_connection c, int error,
                            const char *addinfo)