From: wessels <> Date: Tue, 20 Oct 1998 04:36:56 +0000 (+0000) Subject: gindent X-Git-Tag: SQUID_3_0_PRE1~2540 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d47d8e613798c3e05a13f5418ded3d5a2d2beba;p=thirdparty%2Fsquid.git gindent --- diff --git a/src/StatHist.cc b/src/StatHist.cc index d7981bda16..4cd055e46a 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -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); diff --git a/src/authenticate.cc b/src/authenticate.cc index 89b7073103..193e545430 100644 --- a/src/authenticate.cc +++ b/src/authenticate.cc @@ -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; diff --git a/src/client.cc b/src/client.cc index fdef62b0df..4ce4294ac8 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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 diff --git a/src/comm_select.cc b/src/comm_select.cc index b9865fff0d..893fdb0034 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -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)) { diff --git a/src/dns.cc b/src/dns.cc index 48766929b4..392510c32c 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -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); diff --git a/src/helper.cc b/src/helper.cc index 41fe0a5080..1629df5d1b 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -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; } diff --git a/src/http.cc b/src/http.cc index 87ecf4301d..02f423206a 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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); } } } diff --git a/src/redirect.cc b/src/redirect.cc index c76c29c068..a785b0ea4a 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -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; diff --git a/src/refresh.cc b/src/refresh.cc index 73a61672c3..6374804d74 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -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 : ""); 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 */ diff --git a/src/stat.cc b/src/stat.cc index c8ca6fc9f6..e6f240fae4 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -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 diff --git a/src/store_digest.cc b/src/store_digest.cc index 6b6d820f9c..b8581ad1df 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -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; diff --git a/src/structs.h b/src/structs.h index 9684c0b162..2a302cf924 100644 --- a/src/structs.h +++ b/src/structs.h @@ -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/