]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/test_cache_digest.cc
Renamed squid.h to squid-old.h and config.h to squid.h
[thirdparty/squid.git] / src / test_cache_digest.cc
index b51301f041b5c5496e00079f5b8539ac1f4a739a..3498eedcef841ff10fbc9d2c7a307e50938f1c6e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: test_cache_digest.cc,v 1.35 2008/01/20 08:54:28 amosjeffries Exp $
+ * $Id$
  *
  * AUTHOR: Alex Rousskov
  *
  *  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.
  * Test-suite for playing with cache digests
  */
 
-#include "squid.h"
+#include "squid-old.h"
 
-typedef struct
-{
+typedef struct {
     int query_count;
     int true_hit_count;
     int true_miss_count;
@@ -49,8 +48,7 @@ typedef struct
 
 typedef struct _Cache Cache;
 
-struct _Cache
-{
+struct _Cache {
     const char *name;
     hash_table *hash;
     CacheDigest *digest;
@@ -63,8 +61,7 @@ struct _Cache
 };
 
 
-typedef struct _CacheEntry
-{
+typedef struct _CacheEntry {
     const cache_key *key;
 
     struct _CacheEntry *next;
@@ -74,8 +71,7 @@ typedef struct _CacheEntry
 
 /* parsed access log entry */
 
-typedef struct
-{
+typedef struct {
     cache_key key[SQUID_MD5_DIGEST_LENGTH];
     time_t timestamp;
     short int use_icp;         /* true/false */
@@ -88,8 +84,7 @@ typedef enum {
 typedef struct _FileIterator FileIterator;
 typedef fr_result(*FI_READER) (FileIterator * fi);
 
-struct _FileIterator
-{
+struct _FileIterator {
     const char *fname;
     FILE *file;
     time_t inner_time;         /* timestamp of the current entry */
@@ -105,17 +100,16 @@ struct _FileIterator
 static time_t cur_time = -1;   /* timestamp of the current log entry */
 
 /* copied from url.c */
-const char *RequestMethodStr[] =
-    {
-        "NONE",
-        "GET",
-        "POST",
-        "PUT",
-        "HEAD",
-        "CONNECT",
-        "TRACE",
-        "PURGE"
-    };
+const char *RequestMethodStr[] = {
+    "NONE",
+    "GET",
+    "POST",
+    "PUT",
+    "HEAD",
+    "CONNECT",
+    "TRACE",
+    "PURGE"
+};
 
 /* copied from url.c */
 static HttpRequestMethod
@@ -231,7 +225,7 @@ cacheEntryCreate(const storeSwapLogData * s)
     CacheEntry *e = (CacheEntry *)xcalloc(1, sizeof(CacheEntry));
     assert(s);
     /* e->s = *s; */
-    xmemcpy(e->key_arr, s->key, SQUID_MD5_DIGEST_LENGTH);
+    memcpy(e->key_arr, s->key, SQUID_MD5_DIGEST_LENGTH);
     e->key = &e->key_arr[0];
     return e;
 }
@@ -497,7 +491,7 @@ accessLogReader(FileIterator * fi)
      * strcmp(hier, "SSL_PARENT_MISS") &&
      * strcmp(hier, "DEFAULT_PARENT");
      */
-    xmemcpy(entry->key, storeKeyPublic(url, method_id), sizeof(entry->key));
+    memcpy(entry->key, storeKeyPublic(url, method_id), sizeof(entry->key));
 
     /*fprintf(stdout, "%s:%d: %s %s %s %s\n",
      * fname, count, method, storeKeyText(entry->key), url, hier); */