From: Francesco Chemolli Date: Fri, 31 Aug 2012 08:48:38 +0000 (+0200) Subject: Moved type definition and methods for squid linked-list to SquidList.h and SquidList.cc X-Git-Tag: sourceformat-review-1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41c977556bd6dabf4e4675925b80e426aa6cc2b6;p=thirdparty%2Fsquid.git Moved type definition and methods for squid linked-list to SquidList.h and SquidList.cc --- diff --git a/src/Makefile.am b/src/Makefile.am index 97d0690926..2b136b7237 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -400,7 +400,8 @@ squid_SOURCES = \ ipcache.cc \ ipcache.h \ $(LEAKFINDERSOURCE) \ - list.cc \ + SquidList.h \ + SquidList.cc \ lookup_t.h \ main.cc \ Mem.h \ @@ -1211,7 +1212,8 @@ tests_testACLMaxUserIP_SOURCES= \ HttpMsg.cc \ HttpRequestMethod.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ mem_node.cc \ Packer.cc \ Parsing.cc \ @@ -1428,7 +1430,8 @@ tests_testCacheManager_SOURCES = \ int.cc \ internal.h \ internal.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ multicast.h \ multicast.cc \ mem_node.cc \ @@ -1595,7 +1598,8 @@ tests_testDiskIO_SOURCES = \ HttpRequestMethod.cc \ HttpStatusLine.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ MemBuf.cc \ MemObject.cc \ mem_node.cc \ @@ -1812,7 +1816,8 @@ tests_testEvent_SOURCES = \ int.cc \ internal.h \ internal.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ Mem.h \ mem.cc \ mem_node.cc \ @@ -2040,7 +2045,8 @@ tests_testEventLoop_SOURCES = \ int.cc \ internal.h \ internal.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ MemBuf.cc \ MemObject.cc \ Mem.h \ @@ -2265,7 +2271,8 @@ tests_test_http_range_SOURCES = \ internal.cc \ $(IPC_SOURCE) \ ipcache.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ MemBuf.cc \ MemObject.cc \ Mem.h \ @@ -2534,7 +2541,8 @@ tests_testHttpRequest_SOURCES = \ int.cc \ internal.h \ internal.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ multicast.h \ multicast.cc \ mem_node.cc \ @@ -2694,7 +2702,8 @@ tests_testStore_SOURCES= \ HttpMsg.cc \ HttpRequestMethod.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ Mem.h \ mem.cc \ mem_node.cc \ @@ -2908,7 +2917,8 @@ tests_testUfs_SOURCES = \ HttpReply.cc \ HttpStatusLine.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ MemObject.cc \ StoreSwapLogData.cc \ StoreIOState.cc \ @@ -3070,7 +3080,8 @@ tests_testRock_SOURCES = \ HttpRequestMethod.cc \ HttpStatusLine.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ Mem.h \ mem.cc \ MemBuf.cc \ @@ -3212,7 +3223,8 @@ tests_testCoss_SOURCES = \ HttpReply.cc \ HttpStatusLine.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ MemObject.cc \ StoreSwapLogData.cc \ StoreIOState.cc \ @@ -3361,7 +3373,8 @@ tests_testNull_SOURCES = \ HttpReply.cc \ HttpStatusLine.cc \ int.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ MemObject.cc \ StoreSwapLogData.cc \ StoreIOState.cc \ @@ -3567,7 +3580,8 @@ tests_testURL_SOURCES = \ int.cc \ internal.h \ internal.cc \ - list.cc \ + SquidList.h \ + SquidList.cc \ multicast.h \ multicast.cc \ Mem.h \ diff --git a/src/list.cc b/src/SquidList.cc similarity index 98% rename from src/list.cc rename to src/SquidList.cc index 9ba1889bcc..37f98f9c8e 100644 --- a/src/list.cc +++ b/src/SquidList.cc @@ -1,7 +1,5 @@ /* - * $Id$ - * * DEBUG: none Linked list functions (deprecated) * AUTHOR: Harvest Derived * @@ -35,7 +33,7 @@ #include "squid.h" #include "Mem.h" -#include "protos.h" +#include "SquidList.h" #include "typedefs.h" /* This should go away, in favour of the List template class */ diff --git a/src/SquidList.h b/src/SquidList.h new file mode 100644 index 0000000000..58595b8b24 --- /dev/null +++ b/src/SquidList.h @@ -0,0 +1,44 @@ +#ifndef SQUID_SQUIDLIST_H_ +#define SQUID_SQUIDLIST_H_ +/* + * DEBUG: none Linked list functions (deprecated) + * 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. + * + */ + +class link_list { + public: + void *ptr; + link_list *next; +}; + +extern void linklistPush(link_list **, void *); +extern void *linklistShift(link_list **); + +#endif /* SQUID_SQUIDLIST_H_ */ diff --git a/src/fs/ufs/UFSStoreState.cc b/src/fs/ufs/UFSStoreState.cc index 8f15b363de..fe4c5fdbb1 100644 --- a/src/fs/ufs/UFSStoreState.cc +++ b/src/fs/ufs/UFSStoreState.cc @@ -41,6 +41,7 @@ #include "DiskIO/ReadRequest.h" #include "DiskIO/WriteRequest.h" #include "protos.h" +#include "SquidList.h" #include "SwapDir.h" #include "UFSStrategy.h" #include "UFSStoreState.h" diff --git a/src/fs/ufs/UFSStoreState.h b/src/fs/ufs/UFSStoreState.h index bf078b8d89..4be8139702 100644 --- a/src/fs/ufs/UFSStoreState.h +++ b/src/fs/ufs/UFSStoreState.h @@ -31,6 +31,7 @@ #define SQUID_FS_UFS_UFSSTORESTATE_H #include "DiskIO/IORequestor.h" +#include "SquidList.h" #include "StoreIOState.h" namespace Fs diff --git a/src/mem.cc b/src/mem.cc index 7a87f71365..04252244dc 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -41,6 +41,7 @@ #include "memMeter.h" #include "mgr/Registration.h" #include "protos.h" +#include "SquidList.h" #include "SquidTime.h" #include "Store.h" #include "StoreEntryStream.h" diff --git a/src/protos.h b/src/protos.h index 41df8909e5..5b2b72140d 100644 --- a/src/protos.h +++ b/src/protos.h @@ -88,8 +88,6 @@ extern void reconfigure(int); #include "fatal.h" -SQUIDCEXTERN void linklistPush(link_list **, void *); //list.cc -SQUIDCEXTERN void *linklistShift(link_list **); //list.cc SQUIDCEXTERN int xrename(const char *from, const char *to); //disk.cc extern int isPowTen(int); //int.cc diff --git a/src/repl/heap/store_repl_heap.cc b/src/repl/heap/store_repl_heap.cc index 575ae1514c..ad6ababe59 100644 --- a/src/repl/heap/store_repl_heap.cc +++ b/src/repl/heap/store_repl_heap.cc @@ -45,6 +45,7 @@ #include "heap.h" #include "protos.h" #include "store_heap_replacement.h" +#include "SquidList.h" #include "Store.h" #include "MemObject.h" #include "wordlist.h" diff --git a/src/structs.h b/src/structs.h index c97e028d25..8352e2a524 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1030,11 +1030,6 @@ private: unsigned int destinationIPLookedUp_:1; }; -struct _link_list { - void *ptr; - - struct _link_list *next; -}; struct _cachemgr_passwd { char *passwd; diff --git a/src/typedefs.h b/src/typedefs.h index 0dd6099aea..b789d2d9c9 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -85,7 +85,6 @@ typedef struct _CacheDigest CacheDigest; typedef struct _Version Version; -typedef struct _link_list link_list; typedef struct _customlog customlog;