From: Francesco Chemolli Date: Tue, 21 Aug 2012 09:38:16 +0000 (+0200) Subject: Moved cache_cf.cc prototypes to cache_cf.h X-Git-Tag: sourceformat-review-1~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a01b99e095b754738a917ff3bc305336eea2d8e;p=thirdparty%2Fsquid.git Moved cache_cf.cc prototypes to cache_cf.h --- diff --git a/src/ConfigParser.cc b/src/ConfigParser.cc index 9548eb7b7d..2ba9baaa4d 100644 --- a/src/ConfigParser.cc +++ b/src/ConfigParser.cc @@ -34,6 +34,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "ConfigParser.h" #include "Debug.h" #include "globals.h" diff --git a/src/DelaySpec.cc b/src/DelaySpec.cc index b11b113b5e..fee83035ee 100644 --- a/src/DelaySpec.cc +++ b/src/DelaySpec.cc @@ -40,6 +40,7 @@ #include "squid.h" #if USE_DELAY_POOLS +#include "cache_cf.h" #include "DelaySpec.h" #include "Parsing.h" #include "protos.h" diff --git a/src/HelperChildConfig.cc b/src/HelperChildConfig.cc index b75e3252a2..002bdda81e 100644 --- a/src/HelperChildConfig.cc +++ b/src/HelperChildConfig.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "cache_cf.h" #include "Debug.h" #include "HelperChildConfig.h" #include "globals.h" diff --git a/src/Parsing.cc b/src/Parsing.cc index d4eb78b025..b88f54f83c 100644 --- a/src/Parsing.cc +++ b/src/Parsing.cc @@ -33,6 +33,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "compat/strtoll.h" #include "Parsing.h" #include "protos.h" diff --git a/src/SwapDir.cc b/src/SwapDir.cc index 0fa81ef1db..3f870ce4bc 100644 --- a/src/SwapDir.cc +++ b/src/SwapDir.cc @@ -33,8 +33,10 @@ */ #include "squid.h" +#include "cache_cf.h" #include "compat/strtoll.h" #include "ConfigOption.h" +#include "Parsing.h" #include "protos.h" #include "StoreFileSystem.h" #include "SwapDir.h" diff --git a/src/acl/CertificateData.cc b/src/acl/CertificateData.cc index 809e54dac3..972e953616 100644 --- a/src/acl/CertificateData.cc +++ b/src/acl/CertificateData.cc @@ -37,6 +37,7 @@ #include "squid.h" #include "acl/CertificateData.h" #include "acl/Checklist.h" +#include "cache_cf.h" #include "protos.h" #include "wordlist.h" diff --git a/src/acl/DomainData.cc b/src/acl/DomainData.cc index f187b6cc9c..d8f3484cb6 100644 --- a/src/acl/DomainData.cc +++ b/src/acl/DomainData.cc @@ -37,6 +37,7 @@ #include "squid.h" #include "acl/DomainData.h" #include "acl/Checklist.h" +#include "cache_cf.h" #include "Debug.h" #include "protos.h" #include "wordlist.h" diff --git a/src/acl/IntRange.cc b/src/acl/IntRange.cc index 863711ce15..53d9e82229 100644 --- a/src/acl/IntRange.cc +++ b/src/acl/IntRange.cc @@ -36,6 +36,7 @@ #include "squid.h" #include "acl/IntRange.h" +#include "cache_cf.h" #include "Debug.h" #include "wordlist.h" #include "Parsing.h" diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index 7aa3d05155..9769a73cb3 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -36,6 +36,7 @@ #include "squid.h" #include "acl/Ip.h" #include "acl/Checklist.h" +#include "cache_cf.h" #include "Debug.h" #include "ip/tools.h" #include "MemBuf.h" diff --git a/src/acl/Random.cc b/src/acl/Random.cc index 7d6630910e..9205456e24 100644 --- a/src/acl/Random.cc +++ b/src/acl/Random.cc @@ -36,7 +36,9 @@ #include "acl/FilledChecklist.h" #include "acl/Random.h" +#include "cache_cf.h" #include "Debug.h" +#include "Parsing.h" #include "protos.h" #include "wordlist.h" diff --git a/src/acl/TimeData.cc b/src/acl/TimeData.cc index 68184f18d8..a625f06012 100644 --- a/src/acl/TimeData.cc +++ b/src/acl/TimeData.cc @@ -37,6 +37,7 @@ #include "squid.h" #include "acl/TimeData.h" #include "acl/Checklist.h" +#include "cache_cf.h" #include "Debug.h" #include "protos.h" #include "wordlist.h" diff --git a/src/auth/AclMaxUserIp.cc b/src/auth/AclMaxUserIp.cc index ef42304763..0fdbacb0fe 100644 --- a/src/auth/AclMaxUserIp.cc +++ b/src/auth/AclMaxUserIp.cc @@ -12,6 +12,7 @@ #include "protos.h" #include "wordlist.h" #include "ConfigParser.h" +#include "Parsing.h" ACL * ACLMaxUserIP::clone() const diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index dde49bfe2c..d9196b573b 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -44,6 +44,7 @@ #include "auth/basic/UserRequest.h" #include "auth/Gadgets.h" #include "auth/State.h" +#include "cache_cf.h" #include "charset.h" #include "mgr/Registration.h" #include "Store.h" diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 48715c112c..b0eb7a4cf0 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -38,6 +38,7 @@ #include "squid.h" +#include "cache_cf.h" #include "rfc2617.h" #include "auth/digest/auth_digest.h" #include "auth/digest/Scheme.h" diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/auth_negotiate.cc index 5bd3f75f2c..631e4aba69 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@ -41,6 +41,7 @@ #include "auth/negotiate/auth_negotiate.h" #include "auth/Gadgets.h" #include "auth/State.h" +#include "cache_cf.h" #include "mgr/Registration.h" #include "Store.h" #include "client_side.h" diff --git a/src/auth/ntlm/auth_ntlm.cc b/src/auth/ntlm/auth_ntlm.cc index b4c2ea00e8..dd1effe24b 100644 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/auth_ntlm.cc @@ -44,6 +44,7 @@ #include "auth/ntlm/User.h" #include "auth/ntlm/UserRequest.h" #include "auth/State.h" +#include "cache_cf.h" #include "mgr/Registration.h" #include "Store.h" #include "client_side.h" diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 96f7c887f4..a75f1e384c 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -38,6 +38,7 @@ #include "acl/MethodData.h" #include "anyp/PortCfg.h" #include "base/RunnersRegistry.h" +#include "cache_cf.h" #include "ConfigParser.h" #include "CpuAffinityMap.h" #include "DiskIO/DiskIOModule.h" @@ -92,17 +93,12 @@ #include "snmp.h" #endif - - - #if HAVE_GLOB_H #include #endif - #if HAVE_LIMITS_H #include #endif - #if HAVE_LIST #include #endif diff --git a/src/cache_cf.h b/src/cache_cf.h new file mode 100644 index 0000000000..69e8abf967 --- /dev/null +++ b/src/cache_cf.h @@ -0,0 +1,51 @@ +/* + * DEBUG: section + * AUTHOR: + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. + * + * This program 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 of the License, or + * (at your option) any later version. + * + * This program 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., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ + + +#ifndef SQUID_CACHE_CF_H_ +#define SQUID_CACHE_CF_H_ + +class wordlist; + +extern void configFreeMemory(void); +extern void self_destruct(void); +extern void add_http_port(char *portspec); + +/* extra functions from cache_cf.c useful for lib modules */ +extern void parse_int(int *var); +extern void parse_onoff(int *var); +extern void parse_eol(char *volatile *var); +extern void parse_wordlist(wordlist ** list); +extern void requirePathnameExists(const char *name, const char *path); +extern void parse_time_t(time_t * var); + +#endif /* SQUID_CACHE_CF_H_ */ diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 8f8cff7dac..aab40594b7 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -66,6 +66,7 @@ #include "ip/QosConfig.h" #include "log/access_log.h" #include "MemObject.h" +#include "Parsing.h" #include "profiler/Profiler.h" #include "protos.h" #include "SquidTime.h" diff --git a/src/errorpage.cc b/src/errorpage.cc index d140568b2f..1d60e8ad1c 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -32,6 +32,7 @@ * */ #include "squid.h" +#include "cache_cf.h" #include "comm/Connection.h" #include "comm/Write.h" #include "err_detail_type.h" diff --git a/src/external_acl.cc b/src/external_acl.cc index fa746b8564..0b4602c42c 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -43,6 +43,7 @@ #include "squid.h" #include "acl/Acl.h" #include "acl/FilledChecklist.h" +#include "cache_cf.h" #include "client_side.h" #include "comm/Connection.h" #include "ExternalACLEntry.h" diff --git a/src/format/Config.cc b/src/format/Config.cc index b81b718892..3c1add0e01 100644 --- a/src/format/Config.cc +++ b/src/format/Config.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "cache_cf.h" #include "format/Config.h" #include "protos.h" #include diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 36ad8a18fc..f9ceeb5a63 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -35,6 +35,7 @@ #include "squid.h" #include "CossSwapDir.h" +#include "cache_cf.h" #include "Store.h" #include "store_coss.h" #include "event.h" diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index 667ba1724b..da707faf33 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -5,6 +5,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "ConfigOption.h" #include "DiskIO/DiskIOModule.h" #include "DiskIO/DiskIOStrategy.h" diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc index 84d6629f73..84218a6988 100644 --- a/src/fs/ufs/UFSSwapDir.cc +++ b/src/fs/ufs/UFSSwapDir.cc @@ -29,10 +29,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ -#include "squid.h" - #define CLEAN_BUF_SZ 16384 +#include "squid.h" +#include "cache_cf.h" #include "ConfigOption.h" #include "DiskIO/DiskIOModule.h" #include "FileMap.h" diff --git a/src/ip/QosConfig.cc b/src/ip/QosConfig.cc index 97fbd9c06b..efa59dba83 100644 --- a/src/ip/QosConfig.cc +++ b/src/ip/QosConfig.cc @@ -1,6 +1,7 @@ #include "squid.h" #include "acl/Gadgets.h" +#include "cache_cf.h" #include "comm/Connection.h" #include "ConfigParser.h" #include "fde.h" diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index 31ac49208c..684742e2e2 100644 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -34,6 +34,7 @@ */ #include "squid.h" +#include "cache_cf.h" #include "comm.h" #include "fde.h" #include "ip/Address.h" diff --git a/src/log/Config.cc b/src/log/Config.cc index 37dc7e5a5f..d39bcaa0a3 100644 --- a/src/log/Config.cc +++ b/src/log/Config.cc @@ -1,4 +1,5 @@ #include "squid.h" +#include "cache_cf.h" #include "log/Config.h" #include "protos.h" diff --git a/src/main.cc b/src/main.cc index ea33381da8..5fd8749f9e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -39,6 +39,7 @@ #include "base/RunnersRegistry.h" #include "base/Subscription.h" #include "base/TextException.h" +#include "cache_cf.h" #include "carp.h" #include "client_db.h" #include "comm.h" diff --git a/src/protos.h b/src/protos.h index 287ebe0785..e604e03914 100644 --- a/src/protos.h +++ b/src/protos.h @@ -51,27 +51,6 @@ class HttpRequestMethod; class ClientInfo; #endif - -/* - * cache_cf.c - */ -SQUIDCEXTERN void configFreeMemory(void); -class MemBuf; -extern void self_destruct(void); -SQUIDCEXTERN void add_http_port(char *portspec); -extern int xatoi(const char *token); -extern long xatol(const char *token); - - -/* extra functions from cache_cf.c useful for lib modules */ -SQUIDCEXTERN void parse_int(int *var); -SQUIDCEXTERN void parse_onoff(int *var); -SQUIDCEXTERN void parse_eol(char *volatile *var); -SQUIDCEXTERN void parse_wordlist(wordlist ** list); -SQUIDCEXTERN void requirePathnameExists(const char *name, const char *path); -SQUIDCEXTERN void parse_time_t(time_t * var); - - /* client_side.c - FD related client side routines */ SQUIDCEXTERN void clientOpenListenSockets(void); diff --git a/src/wccp2.cc b/src/wccp2.cc index 45d0653b67..c7e7aa9c91 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -34,6 +34,7 @@ #if USE_WCCPv2 +#include "cache_cf.h" #include "comm.h" #include "comm/Connection.h" #include "comm/Loops.h"