Fixed a few warnings on non-libxml2 systems
[yaz-moved-to-github.git] / client / client.c
index 88109e9..d4986d0 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.187 2003-04-29 21:04:46 adam Exp $
+ * $Id: client.c,v 1.189 2003-04-29 21:20:33 adam Exp $
  */
 
 #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;
@@ -523,6 +512,17 @@ int session_connect(const char *arg)
     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;
@@ -1930,7 +1930,6 @@ static int send_presentRequest(const char *arg)
     oident prefsyn;
     int nos = 1;
     int oid[OID_SIZE];
-    char *p;
     char setstring[100];
 
     req->referenceId = set_refid (out);
@@ -2875,6 +2874,7 @@ static void initialize(void)
 struct timeval tv_start, tv_end;
 #endif
 
+#if HAVE_XML2
 static void handle_srw_response(Z_SRW_searchRetrieveResponse *res)
 {
     int i;
@@ -2985,6 +2985,7 @@ static void http_response(Z_HTTP_Response *hres)
             close_session();
     }
 }
+#endif
 
 void wait_and_handle_response() 
 {
@@ -3100,10 +3101,12 @@ void wait_and_handle_response()
                 close_session ();
             }
         }
+#if HAVE_XML2
         else if (gdu->which == Z_GDU_HTTP_Response)
         {
             http_response(gdu->u.HTTP_Response);
         }
+#endif
         if (conn && !cs_more(conn))
             break;
     }