From: Adam Dickmeiss Date: Tue, 29 Apr 2003 21:20:33 +0000 (+0000) Subject: Fixed a few warnings on non-libxml2 systems X-Git-Tag: YAZ.2.0.2.RH.2~49 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=bc9920b48da91d87e1c0e033a9151663998d6b6b Fixed a few warnings on non-libxml2 systems --- diff --git a/client/client.c b/client/client.c index 697dc0d..d4986d0 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * 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 @@ -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); diff --git a/server/seshigh.c b/server/seshigh.c index a2a28f9..f2a9bfb 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -2,7 +2,7 @@ * 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")) { - char *charset = 0; - int ret = -1; - Z_SOAP *soap_package = 0; char *db = "Default"; const char *p0 = hreq->path, *p1; - static Z_SOAP_Handler soap_handlers[2] = { #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}, -#endif {0, 0, 0} }; +#endif if (*p0 == '/') p0++; diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index 7ce62e7..b2bfeea 100644 --- a/zutil/zoom-c.c +++ b/zutil/zoom-c.c @@ -2,7 +2,7 @@ * 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. */ @@ -106,11 +106,13 @@ static void set_dset_error (ZOOM_connection c, int error, 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); } +#endif static void set_ZOOM_error (ZOOM_connection c, int error, const char *addinfo)