From 4bace2a54c44fa467f26cbfa2cc27159cb8fc268 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 23 Sep 2009 12:41:39 +0200 Subject: [PATCH] More clean-up (remove util.c). --- src/Makefile.am | 2 +- src/client.c | 3 ++- src/connection.c | 2 -- src/database.c | 1 + src/http.c | 6 +++++- src/http.h | 1 + src/http_command.c | 2 +- src/logic.c | 2 +- src/pazpar2.c | 6 +++--- src/pazpar2.h | 3 --- src/reclists.c | 1 - src/util.c | 32 -------------------------------- src/util.h | 4 ---- win/makefile | 1 - 14 files changed, 15 insertions(+), 51 deletions(-) delete mode 100644 src/util.c diff --git a/src/Makefile.am b/src/Makefile.am index b57ced2..62279a0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,7 @@ libpazpar2_a_SOURCES = pazpar2_config.c pazpar2_config.h eventl.c eventl.h \ record.h record.c reclists.c reclists.h \ relevance.c relevance.h termlists.c termlists.h \ normalize7bit.h normalize7bit.c \ - util.c util.h zeerex.c zeerex.h database.c database.h \ + zeerex.c zeerex.h database.c database.h \ settings.h settings.c sel_thread.c sel_thread.h getaddrinfo.c \ charsets.c charsets.h \ client.c client.h connection.c connection.h host.h parameters.h \ diff --git a/src/client.c b/src/client.c index 775d0cd..8c12a9e 100644 --- a/src/client.c +++ b/src/client.c @@ -59,10 +59,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #endif #include "pazpar2.h" - +#include "parameters.h" #include "client.h" #include "connection.h" #include "settings.h" +#include "relevance.h" /** \brief Represents client state for a connection to one search target */ struct client { diff --git a/src/connection.c b/src/connection.c index 979f739..5a28a75 100644 --- a/src/connection.c +++ b/src/connection.c @@ -42,12 +42,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include "connection.h" -#include "eventl.h" #include "pazpar2.h" #include "host.h" #include "client.h" #include "settings.h" -#include "parameters.h" /** \brief Represents a physical, reusable connection to a remote Z39.50 host diff --git a/src/database.c b/src/database.c index e030ecc..3dfe74e 100644 --- a/src/database.c +++ b/src/database.c @@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include "pazpar2.h" #include "host.h" diff --git a/src/http.c b/src/http.c index 0e1c47b..bb5a36c 100644 --- a/src/http.c +++ b/src/http.c @@ -63,12 +63,16 @@ typedef int socklen_t; #include #include "util.h" -#include "eventl.h" #include "pazpar2.h" #include "http.h" #define MAX_HTTP_HEADER 4096 +#ifdef WIN32 +#define strncasecmp _strnicmp +#define strcasecmp _stricmp +#endif + static void proxy_io(IOCHAN i, int event); static struct http_channel *http_create(const char *addr, struct conf_server *server); diff --git a/src/http.h b/src/http.h index c93a85b..e3f6078 100644 --- a/src/http.h +++ b/src/http.h @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef HTTP_H #define HTTP_H +#include "eventl.h" // Generic I/O buffer struct http_buf { diff --git a/src/http_command.c b/src/http_command.c index 32c1dcb..0cb7442 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include "util.h" #include "eventl.h" +#include "parameters.h" #include "pazpar2.h" #include "http.h" #include "settings.h" diff --git a/src/logic.c b/src/logic.c index 3da6ca3..2abae16 100644 --- a/src/logic.c +++ b/src/logic.c @@ -57,7 +57,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif - +#include "parameters.h" #include "pazpar2.h" #include "eventl.h" #include "http.h" diff --git a/src/pazpar2.c b/src/pazpar2.c index 34bbf42..4ada8dd 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -27,11 +27,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include +#include "parameters.h" #include "pazpar2.h" -#include "database.h" -#include "settings.h" #include - +#include +#include #include static struct conf_config *sc_stop_config = 0; diff --git a/src/pazpar2.h b/src/pazpar2.h index caeba3f..c111848 100644 --- a/src/pazpar2.h +++ b/src/pazpar2.h @@ -26,11 +26,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "termlists.h" -#include "relevance.h" #include "reclists.h" -#include "eventl.h" #include "pazpar2_config.h" -#include "parameters.h" #include "http.h" struct record; diff --git a/src/reclists.c b/src/reclists.c index 7d92643..48ce8e7 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "pazpar2.h" #include "reclists.h" -#include "parameters.h" static struct reclist_sortparms *qsort_sortparms = 0; /* thread pr */ diff --git a/src/util.c b/src/util.c deleted file mode 100644 index d69cd55..0000000 --- a/src/util.c +++ /dev/null @@ -1,32 +0,0 @@ -/* This file is part of Pazpar2. - Copyright (C) 2006-2009 Index Data - -Pazpar2 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. - -Pazpar2 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 - -*/ - -#if HAVE_CONFIG_H -#include -#endif - -#include -#include - -void die(char *string, char *add) -{ - yaz_log(YLOG_FATAL, "Fatal error: %s (%s)", string, add ? add : ""); - abort(); -} - diff --git a/src/util.h b/src/util.h index bfa6320..f8ea2ea 100644 --- a/src/util.h +++ b/src/util.h @@ -22,9 +22,5 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA void die(char *string, char *add); -#ifdef WIN32 -#define strncasecmp _strnicmp -#define strcasecmp _stricmp -#endif #endif diff --git a/win/makefile b/win/makefile index 551397e..fca7041 100644 --- a/win/makefile +++ b/win/makefile @@ -189,7 +189,6 @@ PAZPAR2_OBJS = \ "$(OBJDIR)\relevance.obj" \ "$(OBJDIR)\termlists.obj" \ "$(OBJDIR)\normalize7bit.obj" \ - "$(OBJDIR)\util.obj" \ "$(OBJDIR)\zeerex.obj" \ "$(OBJDIR)\database.obj" \ "$(OBJDIR)\settings.obj" \ -- 1.7.10.4