From: Adam Dickmeiss Date: Mon, 3 Mar 2003 19:57:35 +0000 (+0000) Subject: Fixed warnings. Updated headers X-Git-Tag: YAZ.2.0.1~50 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ba8d526ec24077c455979314147aaff20746a8ca;p=yaz-moved-to-github.git Fixed warnings. Updated headers --- diff --git a/comstack/unix.c b/comstack/unix.c index bfd6de1..e5cd9e5 100644 --- a/comstack/unix.c +++ b/comstack/unix.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: unix.c,v 1.10 2003-02-21 12:08:58 adam Exp $ + * $Id: unix.c,v 1.11 2003-03-03 19:57:35 adam Exp $ * UNIX socket COMSTACK. By Morten Bøgeskov. */ #ifndef WIN32 @@ -22,6 +22,7 @@ #include #include #include +#include #ifndef YAZ_SOCKLEN_T #define YAZ_SOCKLEN_T int diff --git a/cql/cqlutil.c b/cql/cqlutil.c index d1caa2d..15e2827 100644 --- a/cql/cqlutil.c +++ b/cql/cqlutil.c @@ -1,4 +1,4 @@ -/* $Id: cqlutil.c,v 1.2 2003-02-14 18:49:23 adam Exp $ +/* $Id: cqlutil.c,v 1.3 2003-03-03 19:57:35 adam Exp $ Copyright (C) 2002-2003 Index Data Aps @@ -20,7 +20,7 @@ void cql_fputs(const char *buf, void *client_data) struct cql_node *cql_node_dup (struct cql_node *cp) { - struct cql_node *cn; + struct cql_node *cn = 0; if (!cp) return 0; diff --git a/include/yaz/comstack.h b/include/yaz/comstack.h index 6993d5b..c2de900 100644 --- a/include/yaz/comstack.h +++ b/include/yaz/comstack.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2001, Index Data. + * Copyright (c) 1995-2003, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -23,7 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: comstack.h,v 1.8 2003-02-21 12:08:58 adam Exp $ + * $Id: comstack.h,v 1.9 2003-03-03 19:57:35 adam Exp $ */ #ifndef COMSTACK_H diff --git a/include/yaz/diagbib1.h b/include/yaz/diagbib1.h index 789d689..1a953dd 100644 --- a/include/yaz/diagbib1.h +++ b/include/yaz/diagbib1.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2000, Index Data. + * Copyright (c) 1995-2003, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -23,35 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Log: diagbib1.h,v $ - * Revision 1.2 2000-02-28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.1 1999/11/30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.6 1997/09/01 08:49:48 adam - * New windows NT/95 port using MSV5.0. To export DLL functions the - * YAZ_EXPORT modifier was added. Defined in yconfig.h. - * - * Revision 1.5 1997/05/14 06:53:39 adam - * C++ support. - * - * Revision 1.4 1995/09/29 17:12:02 quinn - * Smallish - * - * Revision 1.3 1995/09/27 15:02:47 quinn - * Modified function heads & prototypes. - * - * Revision 1.2 1995/05/16 08:50:30 quinn - * License, documentation, and memory fixes - * - * Revision 1.1 1995/03/30 09:39:40 quinn - * Moved .h files to include directory - * - * Revision 1.1 1995/03/15 13:46:09 adam - * New function diagbib1_str. - * + * $Id: diagbib1.h,v 1.3 2003-03-03 19:57:35 adam Exp $ */ #ifndef DIAGBIB1_H diff --git a/include/yaz/ill.h b/include/yaz/ill.h index 4a70499..daa9acb 100644 --- a/include/yaz/ill.h +++ b/include/yaz/ill.h @@ -1,25 +1,8 @@ /* - * Copyright (c) 1999-2001, Index Data + * Copyright (c) 1999-2003, Index Data * See the file LICENSE for details. * - * $Log: ill.h,v $ - * Revision 1.5 2001-02-20 11:25:32 adam - * Added ill_get_APDU and ill_get_Cancel. - * - * Revision 1.4 2000/02/28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.3 2000/01/31 13:15:21 adam - * Removed uses of assert(3). Cleanup of ODR. CCL parser update so - * that some characters are not surrounded by spaces in resulting term. - * ILL-code updates. - * - * Revision 1.2 2000/01/15 09:39:50 adam - * Implemented ill_get_ILLRequest. More ILL testing for client. - * - * Revision 1.1 1999/12/16 23:36:19 adam - * Implemented ILL protocol. Minor updates ASN.1 compiler. - * + * $Id: ill.h,v 1.6 2003-03-03 19:57:35 adam Exp $ */ #ifndef ILL_H #define ILL_H diff --git a/include/yaz/logrpn.h b/include/yaz/logrpn.h index d1f4c07..07af8ca 100644 --- a/include/yaz/logrpn.h +++ b/include/yaz/logrpn.h @@ -1,22 +1,8 @@ /* - * Copyright (c) 1997-2000, Index Data. + * Copyright (c) 1997-2003, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss - * - * $Log: logrpn.h,v $ - * Revision 1.3 2003-01-06 08:20:27 adam - * SRW, CQL, 2003 - * - * Revision 1.2 2000/02/28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.1 1999/11/30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.1 1998/11/16 16:02:32 adam - * Added loggin utilies, log_rpn_query and log_scan_term. These used - * to be part of Zebra. * + * $Id: logrpn.h,v 1.4 2003-03-03 19:57:35 adam Exp $ */ #ifndef LOG_RPN_H diff --git a/include/yaz/options.h b/include/yaz/options.h index 1f3a804..4ad5968 100644 --- a/include/yaz/options.h +++ b/include/yaz/options.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2000, Index Data. + * Copyright (c) 1995-2003, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -23,42 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Log: options.h,v $ - * Revision 1.2 2000-02-28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.1 1999/11/30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.6 1997/09/01 08:49:50 adam - * New windows NT/95 port using MSV5.0. To export DLL functions the - * YAZ_EXPORT modifier was added. Defined in yconfig.h. - * - * Revision 1.5 1997/05/14 06:53:43 adam - * C++ support. - * - * Revision 1.4 1995/09/29 17:12:05 quinn - * Smallish - * - * Revision 1.3 1995/09/27 15:02:48 quinn - * Modified function heads & prototypes. - * - * Revision 1.2 1995/05/16 08:50:36 quinn - * License, documentation, and memory fixes - * - * Revision 1.1 1995/03/30 09:39:42 quinn - * Moved .h files to include directory - * - * Revision 1.1 1995/03/27 08:35:19 quinn - * Created util library - * Added memory debugging module. Imported options-manager - * - * Revision 1.2 1994/08/16 16:16:03 adam - * bfile header created. - * - * Revision 1.1 1994/08/16 16:04:35 adam - * Added header file options.h - * + * $Id: options.h,v 1.3 2003-03-03 19:57:35 adam Exp $ */ #ifndef OPTIONS_H diff --git a/include/yaz/statserv.h b/include/yaz/statserv.h index a501fec..c8cf21e 100644 --- a/include/yaz/statserv.h +++ b/include/yaz/statserv.h @@ -23,84 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Log: statserv.h,v $ - * Revision 1.5 2000-04-05 07:39:55 adam - * Added shared library support (libtool). - * - * Revision 1.4 2000/03/15 12:59:49 adam - * Added handle member to statserv_control. - * - * Revision 1.3 2000/03/14 09:06:11 adam - * Added POSIX threads support for frontend server. - * - * Revision 1.2 2000/02/28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.1 1999/11/30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.17 1999/07/06 12:17:15 adam - * Added option -1 that runs server once (for profiling purposes). - * - * Revision 1.16 1999/06/10 11:45:30 adam - * Added bend_start, bend_stop handlers and removed pre_init. - * Handlers bend_start/bend_stop are called when service/daemon is - * started/stopped. - * - * Revision 1.15 1999/04/16 14:45:55 adam - * Added interface for tcpd wrapper for access control. - * - * Revision 1.14 1999/02/02 13:57:32 adam - * Uses preprocessor define WIN32 instead of WINDOWS to build code - * for Microsoft WIN32. - * - * Revision 1.13 1998/02/10 10:28:56 adam - * Added app_name, service_dependencies, service_display_name and - * options_func. options_func allows us to specify a different function - * to interogate the command line arguments. The other members allow us - * to pass the full service details accross to the service manager (CW). - * - * Revision 1.??? 1997/12/18 Chas - * Added app_name, service_dependencies, service_display_name and - * options_func. options_func allows us to specify a different function - * to interogate the command line arguments. The other members allow us - * to pass the full service details accross to the service manager. - * - * Revision 1.12 1997/11/07 13:31:47 adam - * Added NT Service name part of statserv_options_block. Moved NT - * service utility to server library. - * - * Revision 1.11 1997/10/27 14:03:01 adam - * Added new member to statserver_options_block, pre_init, which - * specifies a callback to be invoked after command line parsing and - * before the server listens for the first time. - * - * Revision 1.10 1997/09/01 09:31:26 adam - * Removed definition statserv_remove to eventl.h. (A hack really). - * - * Revision 1.9 1997/09/01 08:49:53 adam - * New windows NT/95 port using MSV5.0. To export DLL functions the - * YAZ_EXPORT modifier was added. Defined in yconfig.h. - * - * Revision 1.8 1997/05/14 06:53:51 adam - * C++ support. - * - * Revision 1.7 1995/09/29 17:12:12 quinn - * Smallish - * - * Revision 1.6 1995/09/27 15:02:53 quinn - * Modified function heads & prototypes. - * - * Revision 1.5 1995/06/19 12:38:31 quinn - * Reorganized include-files. Added small features. - * - * Revision 1.4 1995/06/15 07:45:08 quinn - * Moving to v3. - * - * Revision 1.3 1995/05/16 08:50:38 quinn - * License, documentation, and memory fixes - * - * + * $Id: statserv.h,v 1.6 2003-03-03 19:57:35 adam Exp $ */ #ifndef STATSERVER_H diff --git a/include/yaz/tcpip.h b/include/yaz/tcpip.h index ab74553..a9581db 100644 --- a/include/yaz/tcpip.h +++ b/include/yaz/tcpip.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2000, Index Data. + * Copyright (c) 1995-2003, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -23,68 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Log: tcpip.h,v $ - * Revision 1.3 2000-11-23 10:58:32 adam - * SSL comstack support. Separate POSIX thread support library. - * - * Revision 1.2 2000/02/28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.1 1999/11/30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.13 1999/06/16 11:55:24 adam - * Added APDU log to client. - * - * Revision 1.12 1999/01/08 11:23:19 adam - * Added const modifier to some of the BER/ODR encoding routines. - * - * Revision 1.11 1998/06/22 11:32:38 adam - * Added 'conditional cs_listen' feature. - * - * Revision 1.10 1998/05/18 13:07:01 adam - * Changed the way attribute sets are handled by the retriaval module. - * Extended Explain conversion / schema. - * Modified server and client to work with ASN.1 compiled protocol handlers. - * - * Revision 1.9 1997/09/01 08:49:54 adam - * New windows NT/95 port using MSV5.0. To export DLL functions the - * YAZ_EXPORT modifier was added. Defined in yconfig.h. - * - * Revision 1.8 1997/05/14 06:53:52 adam - * C++ support. - * - * Revision 1.7 1996/07/06 19:58:32 quinn - * System headerfiles gathered in yconfig - * - * Revision 1.6 1996/02/10 12:23:42 quinn - * Enable inetd operations fro TCP/IP stack - * - * Revision 1.5 1995/09/29 17:12:13 quinn - * Smallish - * - * Revision 1.4 1995/09/28 10:12:36 quinn - * Windows-support changes - * - * Revision 1.3 1995/09/27 15:02:53 quinn - * Modified function heads & prototypes. - * - * Revision 1.2 1995/05/16 08:50:39 quinn - * License, documentation, and memory fixes - * - * Revision 1.1 1995/03/30 09:39:43 quinn - * Moved .h files to include directory - * - * Revision 1.3 1995/03/27 08:36:11 quinn - * Some work on nonblocking operation in xmosi.c and rfct.c. - * Added protocol parameter to cs_create() - * - * Revision 1.2 1995/03/14 10:28:43 quinn - * Adding server-side support to tcpip.c and fixing bugs in nonblocking I/O - * - * Revision 1.1 1995/02/09 15:51:52 quinn - * Works better now. - * + * $Id: tcpip.h,v 1.4 2003-03-03 19:57:35 adam Exp $ */ #ifndef TCPIP_H diff --git a/include/yaz/yaz-ccl.h b/include/yaz/yaz-ccl.h index 4aeb420..0f8fb9c 100644 --- a/include/yaz/yaz-ccl.h +++ b/include/yaz/yaz-ccl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-2000, Index Data. + * Copyright (c) 1995-2003, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -23,39 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Log: yaz-ccl.h,v $ - * Revision 1.4 2000-05-25 19:57:35 adam - * Changed include of yaz-util.h to wrbuf.h. - * - * Revision 1.3 2000/02/28 11:20:06 adam - * Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL. - * - * Revision 1.2 1999/12/20 15:20:13 adam - * Implemented ccl_pquery to convert from CCL tree to prefix query. - * - * Revision 1.1 1999/11/30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.8 1997/09/01 08:49:54 adam - * New windows NT/95 port using MSV5.0. To export DLL functions the - * YAZ_EXPORT modifier was added. Defined in yconfig.h. - * - * Revision 1.7 1997/06/23 10:30:45 adam - * Added ODR stream as parameter to ccl_rpn_query and ccl_scan_query. - * - * Revision 1.6 1997/05/14 06:53:54 adam - * C++ support. - * - * Revision 1.5 1995/09/29 17:12:14 quinn - * Smallish - * - * Revision 1.4 1995/09/27 15:02:54 quinn - * Modified function heads & prototypes. - * - * Revision 1.3 1995/05/16 08:50:40 quinn - * License, documentation, and memory fixes - * - * + * $Id: yaz-ccl.h,v 1.5 2003-03-03 19:57:35 adam Exp $ */ #ifndef YAZ_CCL_H diff --git a/server/statserv.c b/server/statserv.c index b041f1a..4e3db64 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -6,7 +6,7 @@ * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.97 2003-02-23 14:46:10 adam Exp $ + * $Id: statserv.c,v 1.98 2003-03-03 19:57:35 adam Exp $ */ #include @@ -658,8 +658,7 @@ static int add_listener(char *where, int what) } if (cs_bind(l, ap, CS_SERVER) < 0) { - yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to bind to %s", - where, errno); + yaz_log(LOG_FATAL|LOG_ERRNO, "Failed to bind to %s", where); cs_close (l); return -1; } diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 270942b..37b487b 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,5 +1,5 @@ /* - * $Id: zoomsh.c,v 1.17 2003-02-24 13:14:49 adam Exp $ + * $Id: zoomsh.c,v 1.18 2003-03-03 19:57:36 adam Exp $ * * ZOOM-C Shell */ @@ -19,6 +19,7 @@ #include #include +#include #include #define MAX_CON 100 @@ -326,7 +327,8 @@ static void cmd_scan (ZOOM_connection *c, ZOOM_resultset *r, int occ = 0; size_t len = 0; const char *term = ZOOM_scanset_term(s[i], p, &occ, &len); - printf ("%.*s %d\n", len, term, occ); + fwrite(term, 1, len, stdout); + printf (" %d\n", occ); } ZOOM_scanset_destroy(s[i]); } diff --git a/zutil/srw.c b/zutil/srw.c index 4a66bbd..813908d 100644 --- a/zutil/srw.c +++ b/zutil/srw.c @@ -2,7 +2,7 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: srw.c,v 1.7 2003-02-23 14:26:58 adam Exp $ + * $Id: srw.c,v 1.8 2003-03-03 19:57:37 adam Exp $ */ #include @@ -45,13 +45,17 @@ static int match_element(xmlNodePtr ptr, const char *elem) return 0; } +#define CHECK_TYPE 0 + static int match_xsd_string_n(xmlNodePtr ptr, const char *elem, ODR o, char **val, int *len) { +#if CHECK_TYPE struct _xmlAttr *attr; +#endif if (!match_element(ptr, elem)) return 0; -#if 0 +#if CHECK_TYPE for (attr = ptr->properties; attr; attr = attr->next) if (!strcmp(attr->name, "type") && attr->children && attr->children->type == XML_TEXT_NODE) @@ -85,10 +89,12 @@ static int match_xsd_string(xmlNodePtr ptr, const char *elem, ODR o, static int match_xsd_integer(xmlNodePtr ptr, const char *elem, ODR o, int **val) { +#if CHECK_TYPE struct _xmlAttr *attr; +#endif if (!match_element(ptr, elem)) return 0; -#if 0 +#if CHECK_TYPE for (attr = ptr->properties; attr; attr = attr->next) if (!strcmp(attr->name, "type") && attr->children && attr->children->type == XML_TEXT_NODE) diff --git a/zutil/srwtst.c b/zutil/srwtst.c index 984b460..be4cad7 100644 --- a/zutil/srwtst.c +++ b/zutil/srwtst.c @@ -2,7 +2,7 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: srwtst.c,v 1.4 2003-02-23 14:26:58 adam Exp $ + * $Id: srwtst.c,v 1.5 2003-03-03 19:57:37 adam Exp $ */ #include @@ -53,6 +53,18 @@ int main(int argc, char **argv) if (sr->which == Z_SRW_searchRetrieve_request) { Z_SRW_searchRetrieveRequest *req = sr->u.request; + switch(req->query_type) + { + case Z_SRW_query_type_cql: + fprintf(stderr, "CQL: %s\n", req->query.cql); + break; + case Z_SRW_query_type_xcql: + fprintf(stderr, "XCQL\n"); + break; + case Z_SRW_query_type_pqf: + fprintf(stderr, "PQF: %s\n", req->query.pqf); + break; + } } else if (sr->which == Z_SRW_searchRetrieve_response) {