From: Francesco Chemolli Date: Fri, 31 Aug 2012 11:19:34 +0000 (+0200) Subject: Moved some prototypes to newly-created int.h, SquidString.h, disk.h X-Git-Tag: sourceformat-review-1~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9b6ff6e25a5bc4825a0e999b601583ddba7db21;p=thirdparty%2Fsquid.git Moved some prototypes to newly-created int.h, SquidString.h, disk.h --- f9b6ff6e25a5bc4825a0e999b601583ddba7db21 diff --cc src/Makefile.am index 2b136b7237,2b136b7237..c8ca66bbe3 --- a/src/Makefile.am +++ b/src/Makefile.am @@@ -393,6 -393,6 +393,7 @@@ squid_SOURCES = icp_opcode.h \ icp_v2.cc \ icp_v3.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ @@@ -704,6 -704,6 +705,7 @@@ ufsdump_SOURCES = cbdata.h \ cbdata.cc \ debug.cc \ ++ int.h \ int.cc \ Mem.h \ mem.cc \ @@@ -1211,6 -1211,6 +1213,7 @@@ tests_testACLMaxUserIP_SOURCES= HttpHdrScTarget.cc \ HttpMsg.cc \ HttpRequestMethod.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -1427,6 -1427,6 +1430,7 @@@ tests_testCacheManager_SOURCES = icp_v3.cc \ $(IPC_SOURCE) \ ipcache.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ @@@ -1597,6 -1597,6 +1601,7 @@@ tests_testDiskIO_SOURCES = HttpReply.cc \ HttpRequestMethod.cc \ HttpStatusLine.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -1813,6 -1813,6 +1818,7 @@@ tests_testEvent_SOURCES = icp_v3.cc \ $(IPC_SOURCE) \ ipcache.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ @@@ -2042,6 -2042,6 +2048,7 @@@ tests_testEventLoop_SOURCES = icp_v3.cc \ $(IPC_SOURCE) \ ipcache.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ @@@ -2266,6 -2266,6 +2273,7 @@@ tests_test_http_range_SOURCES = HttpStatusLine.cc \ icp_v2.cc \ icp_v3.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ @@@ -2538,6 -2538,6 +2546,7 @@@ tests_testHttpRequest_SOURCES = icp_v3.cc \ $(IPC_SOURCE) \ ipcache.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ @@@ -2701,6 -2701,6 +2710,7 @@@ tests_testStore_SOURCES= HttpHeader.cc \ HttpMsg.cc \ HttpRequestMethod.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -2916,6 -2916,6 +2926,7 @@@ tests_testUfs_SOURCES = HttpBody.cc \ HttpReply.cc \ HttpStatusLine.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -3079,6 -3079,6 +3090,7 @@@ tests_testRock_SOURCES = HttpReply.cc \ HttpRequestMethod.cc \ HttpStatusLine.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -3222,6 -3222,6 +3234,7 @@@ tests_testCoss_SOURCES = HttpBody.cc \ HttpReply.cc \ HttpStatusLine.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -3372,6 -3372,6 +3385,7 @@@ tests_testNull_SOURCES = HttpBody.cc \ HttpReply.cc \ HttpStatusLine.cc \ ++ int.h \ int.cc \ SquidList.h \ SquidList.cc \ @@@ -3577,6 -3577,6 +3591,7 @@@ tests_testURL_SOURCES = icp_v3.cc \ $(IPC_SOURCE) \ ipcache.cc \ ++ int.h \ int.cc \ internal.h \ internal.cc \ diff --cc src/SquidString.h index b0afd6e04c,b0afd6e04c..4b2214f049 --- a/src/SquidString.h +++ b/src/SquidString.h @@@ -186,7 -186,7 +186,8 @@@ _SQUID_INLINE_ bool operator<(const Str #endif extern const char *checkNullString(const char *p); --extern int stringHasWhitespace(const char *); //String.cc --extern int stringHasCntl(const char *); //String.cc ++extern int stringHasWhitespace(const char *); ++extern int stringHasCntl(const char *); ++extern char *strwordtok(char *buf, char **t); #endif /* SQUID_STRING_H */ diff --cc src/StoreMetaMD5.cc index b08f26f736,b08f26f736..02d40c0f46 --- a/src/StoreMetaMD5.cc +++ b/src/StoreMetaMD5.cc @@@ -34,6 -34,6 +34,7 @@@ */ #include "squid.h" ++#include "int.h" #include "md5.h" #include "MemObject.h" #include "protos.h" diff --cc src/cache_cf.cc index b529ccf763,b529ccf763..96c650fbb1 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@@ -61,6 -61,6 +61,7 @@@ #include "PeerDigest.h" #include "protos.h" #include "rfc1738.h" ++#include "SquidString.h" #include "Store.h" #include "StoreFileSystem.h" #include "structs.h" diff --cc src/disk.h index dca9db41dc,dca9db41dc..985af5ae3a --- a/src/disk.h +++ b/src/disk.h @@@ -54,5 -54,5 +54,6 @@@ extern void file_write_mbuf(int fd, off extern void file_read(int, char *, int, off_t, DRCB *, void *); extern void disk_init(void); extern void safeunlink(const char *path, int quiet); ++extern int xrename(const char *from, const char *to); //disk.cc #endif /* SQUID_DISK_H_ */ diff --cc src/external_acl.cc index afa7068edd,afa7068edd..f00e375845 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@@ -46,8 -46,8 +46,8 @@@ #include "cache_cf.h" #include "client_side.h" #include "comm/Connection.h" --#include "ExternalACLEntry.h" #include "ExternalACL.h" ++#include "ExternalACLEntry.h" #include "fde.h" #include "helper.h" #include "HttpHeaderTools.h" @@@ -58,11 -58,11 +58,12 @@@ #include "mgr/Registration.h" #include "protos.h" #include "rfc1738.h" ++#include "SquidString.h" #include "SquidTime.h" #include "Store.h" --#include "URLScheme.h" #include "tools.h" #include "URL.h" ++#include "URLScheme.h" #include "wordlist.h" #if USE_SSL #include "ssl/support.h" diff --cc src/int.cc index 69ba03cd88,69ba03cd88..89df0ecd72 --- a/src/int.cc +++ b/src/int.cc @@@ -1,7 -1,7 +1,4 @@@ -- /* -- * $Id$ -- * * DEBUG: section 21 Integer functions * AUTHOR: Harvest Derived * diff --cc src/int.h index 0000000000,0000000000..e3baaa3e6a new file mode 100644 --- /dev/null +++ b/src/int.h @@@ -1,0 -1,0 +1,37 @@@ ++#ifndef SQUID_INT_H_ ++#define SQUID_INT_H_ ++/* ++ * DEBUG: section 21 Integer functions ++ * AUTHOR: Harvest Derived ++ * ++ * 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. ++ * ++ */ ++ ++extern int isPowTen(int); //int.cc ++ ++#endif /* SQUID_INT_H_ */ diff --cc src/neighbors.cc index 5b722b8d43,5b722b8d43..351910d7af --- a/src/neighbors.cc +++ b/src/neighbors.cc @@@ -43,6 -43,6 +43,7 @@@ #include "HttpRequest.h" #include "icmp/net_db.h" #include "ICP.h" ++#include "int.h" #include "ip/Address.h" #include "ip/tools.h" #include "ipcache.h" diff --cc src/protos.h index 5b2b72140d,a4f4a59480..2b1f22d921 --- a/src/protos.h +++ b/src/protos.h @@@ -88,10 -80,10 +80,6 @@@ extern void reconfigure(int) #include "fatal.h" --SQUIDCEXTERN int xrename(const char *from, const char *to); //disk.cc --extern int isPowTen(int); //int.cc -- --SQUIDCEXTERN char *strwordtok(char *buf, char **t); //String.cc /* * ipc.c diff --cc src/ssl/helper.cc index ee81402e08,ee81402e08..13073125ef --- a/src/ssl/helper.cc +++ b/src/ssl/helper.cc @@@ -7,6 -7,6 +7,7 @@@ #include "protos.h" #include "ssl/Config.h" #include "ssl/helper.h" ++#include "SquidString.h" #include "SquidTime.h" #include "SwapDir.h" #include "wordlist.h"