]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Tue, 20 Oct 1998 04:36:56 +0000 (04:36 +0000)
committerwessels <>
Tue, 20 Oct 1998 04:36:56 +0000 (04:36 +0000)
12 files changed:
src/StatHist.cc
src/authenticate.cc
src/client.cc
src/comm_select.cc
src/dns.cc
src/helper.cc
src/http.cc
src/redirect.cc
src/refresh.cc
src/stat.cc
src/store_digest.cc
src/structs.h

index d7981bda161223a74ffe451a5eb3da116638ff32..4cd055e46a33a6c9adaf884012361f197eb4d6fb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StatHist.cc,v 1.17 1998/10/16 19:20:17 wessels Exp $
+ * $Id: StatHist.cc,v 1.18 1998/10/19 22:36:56 wessels Exp $
  *
  * DEBUG: section 62    Generic Histogram
  * AUTHOR: Duane Wessels
@@ -48,7 +48,7 @@
 #include "squid.h"
 
 /* Local functions */
-static void statHistInit(StatHist * H, int capacity, hbase_f *val_in, hbase_f *val_out, double min, double max);
+static void statHistInit(StatHist * H, int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max);
 static int statHistBin(const StatHist * H, double v);
 static double statHistVal(const StatHist * H, int bin);
 static StatHistBinDumper statHistBinDumper;
@@ -58,7 +58,7 @@ static hbase_f Null;
 
 /* low level init, higher level functions has less params */
 static void
-statHistInit(StatHist * H, int capacity, hbase_f *val_in, hbase_f *val_out, double min, double max)
+statHistInit(StatHist * H, int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max)
 {
     assert(H);
     assert(capacity > 0);
@@ -94,22 +94,22 @@ statHistCopy(StatHist * Dest, const StatHist * Orig)
 {
     assert(Dest);
     assert(Orig);
-    debug(62,3)("statHistCopy: Dest=%p, Orig=%p\n", Dest, Orig);
+    debug(62, 3) ("statHistCopy: Dest=%p, Orig=%p\n", Dest, Orig);
     assert(Dest->bins);
     /* better be safe than sorry */
-    debug(62,3)("statHistCopy: capacity %d %d\n",
+    debug(62, 3) ("statHistCopy: capacity %d %d\n",
        Dest->capacity, Orig->capacity);
     assert(Dest->capacity == Orig->capacity);
-    debug(62,3)("statHistCopy: min %f %f\n", Dest->min, Orig->min);
+    debug(62, 3) ("statHistCopy: min %f %f\n", Dest->min, Orig->min);
     assert(Dest->min == Orig->min);
-    debug(62,3)("statHistCopy: max %f %f\n", Dest->max, Orig->max);
+    debug(62, 3) ("statHistCopy: max %f %f\n", Dest->max, Orig->max);
     assert(Dest->max == Orig->max);
-    debug(62,3)("statHistCopy: scale %f %f\n", Dest->scale, Orig->scale);
+    debug(62, 3) ("statHistCopy: scale %f %f\n", Dest->scale, Orig->scale);
     assert(Dest->scale == Orig->scale);
     assert(Dest->val_in == Orig->val_in);
     assert(Dest->val_out == Orig->val_out);
     /* actual copy */
-    debug(62,3)("statHistCopy: copying %d bytes to %p from %p\n",
+    debug(62, 3) ("statHistCopy: copying %d bytes to %p from %p\n",
        Dest->capacity * sizeof(*Dest->bins),
        Dest->bins,
        Orig->bins);
index 89b707310347cd5a93023e546e000e33a80b6f2c..193e545430514e3ab02a46e292705928d39dcc6f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.cc,v 1.7 1998/10/19 17:48:26 wessels Exp $
+ * $Id: authenticate.cc,v 1.8 1998/10/19 22:36:57 wessels Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Duane Wessels
@@ -108,7 +108,7 @@ authenticateInit(void)
     if (!Config.Program.authenticate)
        return;
     if (authenticators == NULL)
-        authenticators = helperCreate("authenticator");
+       authenticators = helperCreate("authenticator");
     authenticators->cmdline = Config.Program.authenticate;
     authenticators->n_to_start = Config.authenticateChildren;
     authenticators->ipc_type = IPC_TCP_SOCKET;
index fdef62b0df714c694d5beffd1065ea1be4ad5ff8..4ce4294ac8a446306497ddaad17f32892411924b 100644 (file)
@@ -1,8 +1,9 @@
 
 
 
+
 /*
- * $Id: client.cc,v 1.76 1998/09/29 16:33:41 wessels Exp $
+ * $Id: client.cc,v 1.77 1998/10/19 22:36:58 wessels Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
index b9865fff0d0fc80100f1c4fad433e7c0aa7f20fa..893fdb0034dba9890d8dac74f81d128a1936e048 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select.cc,v 1.20 1998/10/18 23:06:47 wessels Exp $
+ * $Id: comm_select.cc,v 1.21 1998/10/19 22:36:58 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -637,7 +637,7 @@ comm_select(int msec)
                /* Found a set bit */
                fd = (j * (sizeof(*fdsp) * NBBY)) + k;
 #if DEBUG_FDBITS
-               debug(5,9)("FD %d bit set for reading\n", fd);
+               debug(5, 9) ("FD %d bit set for reading\n", fd);
                assert(FD_ISSET(fd, &readfds));
 #endif
                if (fdIsIcp(fd)) {
@@ -675,7 +675,7 @@ comm_select(int msec)
                /* Found a set bit */
                fd = (j * (sizeof(*fdsp) * NBBY)) + k;
 #if DEBUG_FDBITS
-               debug(5,9)("FD %d bit set for writing\n", fd);
+               debug(5, 9) ("FD %d bit set for writing\n", fd);
                assert(FD_ISSET(fd, &writefds));
 #endif
                if (fdIsIcp(fd)) {
index 48766929b4c9d537cfcf7196fe565580fa30ca83..392510c32c7cfeded63fc6aa5296ce8197128eaa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns.cc,v 1.70 1998/10/19 17:48:26 wessels Exp $
+ * $Id: dns.cc,v 1.71 1998/10/19 22:36:59 wessels Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -52,7 +52,7 @@ dnsInit(void)
     if (!Config.Program.dnsserver)
        return;
     if (dnsservers == NULL)
-       dnsservers = helperCreate("dnsserver");
+       dnsservers = helperCreate("dnsserver");
     dnsservers->n_to_start = Config.dnsChildren;
     dnsservers->ipc_type = IPC_TCP_SOCKET;
     assert(dnsservers->cmdline == NULL);
index 41fe0a50805e599c94a8fa8300b84d1156e210fe..1629df5d1b598dcc97a3d353b5e39c035b1fed58 100644 (file)
@@ -94,7 +94,7 @@ helperSubmit(helper * hlp, const char *buf, HLPCB * callback, void *data)
     helper_request *r = xcalloc(1, sizeof(*r));
     helper_server *srv;
     if (hlp == NULL) {
-       debug(29,3)("helperSubmit: hlp == NULL\n");
+       debug(29, 3) ("helperSubmit: hlp == NULL\n");
        callback(data, NULL);
        return;
     }
index 87ecf4301d856270b7f1aa0073717e79eb697d5b..02f423206ab89ed93b6901c178e4f2c6a922edc9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.330 1998/10/18 09:05:43 wessels Exp $
+ * $Id: http.cc,v 1.331 1998/10/19 22:37:01 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -336,7 +336,7 @@ httpProcessReplyHeader(HttpStateData * httpState, const char *buf, int size)
            int skew = abs(reply->date - squid_curtime);
            if (skew > 86400)
                debug(11, 3) ("%s's clock is skewed by %d seconds!\n",
-                       httpState->request->host, skew);
+                   httpState->request->host, skew);
        }
     }
 }
index c76c29c068edb4448860c841aa40281b70c167e4..a785b0ea4a73de0b486ac0a511cee6f158bdb65f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: redirect.cc,v 1.74 1998/10/19 17:48:28 wessels Exp $
+ * $Id: redirect.cc,v 1.75 1998/10/19 22:37:02 wessels Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -129,7 +129,7 @@ redirectInit(void)
     if (!Config.Program.redirect)
        return;
     if (redirectors == NULL)
-        redirectors = helperCreate("redirector");
+       redirectors = helperCreate("redirector");
     wordlistAdd(&redirectors->cmdline, Config.Program.redirect);
     redirectors->n_to_start = Config.redirectChildren;
     redirectors->ipc_type = IPC_TCP_SOCKET;
index 73a61672c319e64d40ebd706e4c52f46211cc012..6374804d748c680bcf2d9a916e07ac03bf9c9b8b 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: refresh.cc,v 1.42 1998/10/18 21:19:03 rousskov Exp $
+ * $Id: refresh.cc,v 1.43 1998/10/19 22:37:02 wessels Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -40,7 +40,9 @@
 
 #include "squid.h"
 
-typedef enum { rcHTTP, rcICP, rcCDigest, rcCount } refreshCountsEnum;
+typedef enum {
+    rcHTTP, rcICP, rcCDigest, rcCount
+} refreshCountsEnum;
 
 static struct RefreshCounts {
     const char *proto;
@@ -125,10 +127,9 @@ refreshCheck(const StoreEntry * entry, request_t * request, time_t delta, struct
     time_t check_time = squid_curtime + delta;
     if (entry->mem_obj)
        uri = entry->mem_obj->url;
-    else
-    if (request)
+    else if (request)
        uri = urlCanonical(request);
-    
+
     debug(22, 3) ("refreshCheck(%s): '%s'\n", rc->proto, uri ? uri : "<none>");
     rc->total++;
     if (EBIT_TEST(entry->flags, ENTRY_REVALIDATE)) {
@@ -238,7 +239,6 @@ refreshCheck(const StoreEntry * entry, request_t * request, time_t delta, struct
        debug(22, 3) ("refreshCheck: MAYBE: last-modified in the future\n");
        rc->response_lmt_future_maybe++;
     }
-    
     if (age <= min) {
        debug(22, 3) ("refreshCheck: NO: age <= min\n");
        rc->conf_min_age_fresh++;
@@ -253,17 +253,20 @@ refreshCheck(const StoreEntry * entry, request_t * request, time_t delta, struct
  * refreshCheck() function above */
 
 int
-refreshCheckHTTP(const StoreEntry * entry, request_t * request) {
+refreshCheckHTTP(const StoreEntry * entry, request_t * request)
+{
     return refreshCheck(entry, request, 0, &refreshCounts[rcHTTP]);
 }
 
 int
-refreshCheckICP(const StoreEntry * entry, request_t * request) {
+refreshCheckICP(const StoreEntry * entry, request_t * request)
+{
     return refreshCheck(entry, request, 30, &refreshCounts[rcICP]);
 }
 
 int
-refreshCheckDigest(const StoreEntry * entry, time_t delta) {
+refreshCheckDigest(const StoreEntry * entry, time_t delta)
+{
     return refreshCheck(entry, NULL, delta, &refreshCounts[rcCDigest]);
 }
 
@@ -307,7 +310,7 @@ refreshCountsStats(StoreEntry * sentry, struct RefreshCounts *rc)
     refreshCountsStatsEntry(response_lmt_now_stale);
     refreshCountsStatsEntry(conf_min_age_fresh);
     refreshCountsStatsEntry(default_stale);
-    tot = sum; /* paranoid: "total" line shows 100% if we forgot nothing */
+    tot = sum;                 /* paranoid: "total" line shows 100% if we forgot nothing */
     refreshCountsStatsEntry(total);
     /* maybe counters */
     refreshCountsStatsEntry(request_reload_ignore_maybe);
@@ -330,7 +333,7 @@ refreshStats(StoreEntry * sentry)
     for (i = 0; i < rcCount; ++i)
        storeAppendPrintf(sentry, "%10s\t%6d\t%6.2f\n",
            refreshCounts[i].proto,
-           refreshCounts[i].total, 
+           refreshCounts[i].total,
            xpercent(refreshCounts[i].total, total));
 
     /* per protocol histograms */
index c8ca6fc9f6d4dd35128fe2d1d7df707099944d52..e6f240fae445f383a9fe8d7c93f68b1616035e32 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.296 1998/10/08 03:17:30 wessels Exp $
+ * $Id: stat.cc,v 1.297 1998/10/19 22:37:03 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -1288,9 +1288,9 @@ statByteHitRatio(int minutes)
     s = CountHist[0].server.all.kbytes_in.kb - CountHist[minutes].server.all.kbytes_in.kb;
     /* size_t might be unsigned */
     if (c > s)
-       return dpercent(c - s, c);
+       return dpercent(c - s, c);
     else
-       return (-1.0 * dpercent(s - c, c));
+       return (-1.0 * dpercent(s - c, c));
 }
 
 #if STAT_GRAPHS
index 6b6d820f9c80f1de110bedfda2d89bae580d2e12..b8581ad1dfeca9b1e5ddf6c18339bb70632154dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store_digest.cc,v 1.29 1998/10/17 04:34:12 rousskov Exp $
+ * $Id: store_digest.cc,v 1.30 1998/10/19 22:37:04 wessels Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -192,7 +192,7 @@ storeDigestAdd(const StoreEntry * entry)
        /* if expires too soon, ignore */
        /* Note: We should use the time of the next rebuild, not (cur_time+period) */
        if (refreshCheckDigest(entry, StoreDigestRebuildPeriod)) {
-           debug(71, 6) ("storeDigestAdd: entry expires within %d secs, ignoring\n", 
+           debug(71, 6) ("storeDigestAdd: entry expires within %d secs, ignoring\n",
                StoreDigestRebuildPeriod);
        } else {
            good_entry = 1;
index 9684c0b162c01bd51c215b07bff4d2d2c1e1ff72..2a302cf92487606a5261a8ce2f9a801a7d131dfb 100644 (file)
@@ -1,6 +1,7 @@
 
+
 /*
- * $Id: structs.h,v 1.244 1998/10/19 17:48:29 wessels Exp $
+ * $Id: structs.h,v 1.245 1998/10/19 22:37:05 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/