]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Tue, 21 Jul 1998 23:26:11 +0000 (23:26 +0000)
committerwessels <>
Tue, 21 Jul 1998 23:26:11 +0000 (23:26 +0000)
32 files changed:
src/ETag.cc
src/HttpBody.cc
src/HttpHdrCc.cc
src/HttpHdrContRange.cc
src/HttpHdrRange.cc
src/HttpHeader.cc
src/HttpRequest.cc
src/MemBuf.cc
src/asn.cc
src/cache_cf.cc
src/cache_manager.cc
src/carp.cc
src/client.cc
src/client_side.cc
src/enums.h
src/forward.cc
src/ftp.cc
src/globals.h
src/htcp.cc
src/http.cc
src/internal.cc
src/mime.cc
src/neighbors.cc
src/peer_select.cc
src/protos.h
src/refresh.cc
src/snmp_agent.cc
src/store_client.cc
src/structs.h
src/tools.cc
src/typedefs.h
src/whois.cc

index 8c6062988b98fec2ad4b94e0cc7f1d79cb45705b..433b306fd5023ed0b5cbaab896595b32c974c5b7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ETag.cc,v 1.2 1998/07/20 17:19:00 wessels Exp $
+ * $Id: ETag.cc,v 1.3 1998/07/21 17:26:11 wessels Exp $
  *
  * DEBUG: section 7?    HTTP ETag
  * AUTHOR: Alex Rousskov
@@ -39,7 +39,7 @@
 /* parses a string as weak or strong entity-tag; returns true on success */
 /* note: we do not duplicate "str"! */
 int
-etagParseInit(ETag *etag, const char *str)
+etagParseInit(ETag * etag, const char *str)
 {
     int len;
     assert(etag && str);
@@ -49,16 +49,16 @@ etagParseInit(ETag *etag, const char *str)
        str += 2;
     /* check format (quoted-string) */
     len = strlen(str);
-    if (len >= 2 && str[0] == '"' && str[len-1] == '"')
+    if (len >= 2 && str[0] == '"' && str[len - 1] == '"')
        etag->str = str;
     return etag->str != NULL;
 }
 
 /* returns true if etags are equal */
 int
-etagIsEqual(const ETag *tag1, const ETag *tag2)
+etagIsEqual(const ETag * tag1, const ETag * tag2)
 {
     assert(tag1 && tag2);
-    assert(!tag1->weak && !tag2->weak); /* weak comparison not implemented yet */
+    assert(!tag1->weak && !tag2->weak);                /* weak comparison not implemented yet */
     return !strcmp(tag1->str, tag2->str);
 }
index a88f16dabd50f4d53830bc30aae8abceb264b05c..6e6d971dff9fb7c3c202a5a0e1294bf36a7afb17 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
- * $Id: HttpBody.cc,v 1.13 1998/07/20 17:19:01 wessels Exp $
+ * $Id: HttpBody.cc,v 1.14 1998/07/21 17:26:12 wessels Exp $
  *
  * DEBUG: section 56    HTTP Message Body
  * AUTHOR: Alex Rousskov
@@ -50,11 +50,11 @@ httpBodyClean(HttpBody * body)
 
 /* set body by absorbing mb */
 void
-httpBodySet(HttpBody * body, MemBuf *mb)
+httpBodySet(HttpBody * body, MemBuf * mb)
 {
     assert(body);
     assert(memBufIsNull(&body->mb));
-    body->mb = *mb; /* absorb */
+    body->mb = *mb;            /* absorb */
 }
 
 void
index 19e4f69b436227721c84c081cb8929caeed1dc78..1d8ee801ef47cca4149a2cf4792c098c8859a548 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrCc.cc,v 1.13 1998/07/20 17:19:02 wessels Exp $
+ * $Id: HttpHdrCc.cc,v 1.14 1998/07/21 17:26:13 wessels Exp $
  *
  * DEBUG: section 65    HTTP Cache Control Header
  * AUTHOR: Alex Rousskov
@@ -205,7 +205,7 @@ httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist)
 void
 httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count)
 {
-    extern const HttpHeaderStat *dump_stat; /* argh! */
+    extern const HttpHeaderStat *dump_stat;    /* argh! */
     const int id = (int) val;
     const int valid_id = id >= 0 && id < CC_ENUM_END;
     const char *name = valid_id ? strBuf(CcFieldsInfo[id].name) : "INVALID";
index 98e45c52b2531e2904acc3d5cab2d79a1a8e677c..707b2b78b067685bf6226c1b44b1d3698a007d11 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrContRange.cc,v 1.6 1998/07/20 17:19:02 wessels Exp $
+ * $Id: HttpHdrContRange.cc,v 1.7 1998/07/21 17:26:14 wessels Exp $
  *
  * DEBUG: section 68    HTTP Content-Range Header
  * AUTHOR: Alex Rousskov
@@ -183,7 +183,7 @@ httpHdrContRangePackInto(const HttpHdrContRange * range, Packer * p)
 }
 
 void
-httpHdrContRangeSet(HttpHdrContRange *cr, HttpHdrRangeSpec spec, size_t ent_len)
+httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, size_t ent_len)
 {
     assert(cr && ent_len >= 0);
     cr->spec = spec;
index f61f268cc900ed4feb11e5a9aa7227cd5ba930f7..bda126f12296d795ce8acdc4915e512d1877257e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrRange.cc,v 1.11 1998/07/20 17:19:04 wessels Exp $
+ * $Id: HttpHdrRange.cc,v 1.12 1998/07/21 17:26:14 wessels Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -148,7 +148,7 @@ static int
 httpHdrRangeSpecCanonize(HttpHdrRangeSpec * spec, size_t clen)
 {
     debug(64, 5) ("httpHdrRangeSpecCanonize: have: [%d, %d) len: %d\n",
-       spec->offset, spec->offset+spec->length, spec->length);
+       spec->offset, spec->offset + spec->length, spec->length);
     if (!known_spec(spec->offset))     /* suffix */
        spec->offset = size_diff(clen, spec->length);
     else if (!known_spec(spec->length))                /* trailer */
@@ -159,7 +159,7 @@ httpHdrRangeSpecCanonize(HttpHdrRangeSpec * spec, size_t clen)
     spec->length = size_min(size_diff(clen, spec->offset), spec->length);
     /* check range validity */
     debug(64, 5) ("httpHdrRangeSpecCanonize: done: [%d, %d) len: %d\n",
-       spec->offset, spec->offset+spec->length, spec->length);
+       spec->offset, spec->offset + spec->length, spec->length);
     return spec->length > 0;
 }
 
@@ -169,20 +169,20 @@ static int
 httpHdrRangeSpecMergeWith(HttpHdrRangeSpec * recep, const HttpHdrRangeSpec * donor)
 {
     int merged = 0;
-    size_t rhs = recep->offset + recep->length; /* no -1 ! */
-    const size_t donor_rhs = donor->offset + donor->length; /* no -1 ! */
+    size_t rhs = recep->offset + recep->length;                /* no -1 ! */
+    const size_t donor_rhs = donor->offset + donor->length;    /* no -1 ! */
     assert(known_spec(recep->offset));
     assert(known_spec(donor->offset));
     assert(recep->length > 0);
     assert(donor->length > 0);
     /* do we have a left hand side overlap? */
     if (donor->offset < recep->offset && recep->offset <= donor_rhs) {
-       recep->offset = donor->offset; /* decrease left offset */
+       recep->offset = donor->offset;  /* decrease left offset */
        merged = 1;
     }
     /* do we have a right hand side overlap? */
     if (donor->offset <= rhs && rhs < donor_rhs) {
-       rhs = donor_rhs; /* increase right offset */
+       rhs = donor_rhs;        /* increase right offset */
        merged = 1;
     }
     /* adjust length if offsets have been changed */
@@ -330,13 +330,13 @@ httpHdrRangeCanonize(HttpHdrRange * range, size_t clen)
                /* merged with current so get rid of the prev one */
                assert(prev_spec == stackPop(&range->specs));
                httpHdrRangeSpecDestroy(prev_spec);
-               continue; /* re-iterate */
+               continue;       /* re-iterate */
            }
        }
        stackPush(&range->specs, spec);
-       i++; /* progress */
+       i++;                    /* progress */
     }
-    debug(64, 3) ("httpHdrRangeCanonize: merged %d specs\n", 
+    debug(64, 3) ("httpHdrRangeCanonize: merged %d specs\n",
        goods.count - range->specs.count);
     stackClean(&goods);
     debug(64, 3) ("httpHdrRangeCanonize: finished with %d specs\n",
@@ -346,7 +346,7 @@ httpHdrRangeCanonize(HttpHdrRange * range, size_t clen)
 
 /* searches for next range, returns true if found */
 HttpHdrRangeSpec *
-httpHdrRangeGetSpec(const HttpHdrRange * range, HttpHdrRangePos *pos)
+httpHdrRangeGetSpec(const HttpHdrRange * range, HttpHdrRangePos * pos)
 {
     assert(range);
     assert(pos && *pos >= -1 && *pos < range->specs.count);
index 26087ef9ef56a11ca7125f0b5d52c7060cbc1a86..45a50d240c8771c98831d9ef373836ff23799115 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.cc,v 1.50 1998/07/20 20:20:50 wessels Exp $
+ * $Id: HttpHeader.cc,v 1.51 1998/07/21 17:26:15 wessels Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -172,7 +172,7 @@ static http_hdr_type ReplyHeadersArr[] =
     HDR_MIME_VERSION, HDR_PUBLIC, HDR_RETRY_AFTER, HDR_SERVER, HDR_SET_COOKIE,
     HDR_VARY,
     HDR_WARNING, HDR_PROXY_CONNECTION, HDR_X_CACHE,
-    HDR_X_CACHE_LOOKUP, 
+    HDR_X_CACHE_LOOKUP,
     HDR_X_REQUEST_URI,
     HDR_X_SQUID_ERROR
 };
@@ -324,7 +324,7 @@ httpHeaderAppend(HttpHeader * dest, const HttpHeader * src)
 
 /* use fresh entries to replace old ones */
 void
-httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask *denied_mask)
+httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask)
 {
     const HttpHeaderEntry *e;
     HttpHeaderPos pos = HttpHeaderInitPos;
@@ -493,7 +493,7 @@ httpHeaderDelById(HttpHeader * hdr, http_hdr_type id)
     debug(55, 8) ("%p del-by-id %d\n", hdr, id);
     assert(hdr);
     assert_eid(id);
-    assert_eid(id != HDR_OTHER); /* does not make sense */
+    assert_eid(id != HDR_OTHER);       /* does not make sense */
     if (!CBIT_TEST(hdr->mask, id))
        return 0;
     while ((e = httpHeaderGetEntry(hdr, &pos))) {
@@ -639,7 +639,7 @@ httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc)
 }
 
 void
-httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange *cr)
+httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange * cr)
 {
     MemBuf mb;
     Packer p;
@@ -658,7 +658,7 @@ httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange *cr)
 }
 
 void
-httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange *range)
+httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange * range)
 {
     MemBuf mb;
     Packer p;
@@ -808,9 +808,10 @@ httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, const char *authSche
 ETag
 httpHeaderGetETag(const HttpHeader * hdr, http_hdr_type id)
 {
-    ETag etag = { NULL, -1 };
+    ETag etag =
+    {NULL, -1};
     HttpHeaderEntry *e;
-    assert(Headers[id].type == ftETag);  /* must be of an appropriate type */
+    assert(Headers[id].type == ftETag);                /* must be of an appropriate type */
     if ((e = httpHeaderFindEntry(hdr, id)))
        etagParseInit(&etag, strBuf(e->value));
     return etag;
@@ -821,7 +822,7 @@ httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id)
 {
     TimeOrTag tot;
     HttpHeaderEntry *e;
-    assert(Headers[id].type == ftDate_1123_or_ETag);  /* must be of an appropriate type */
+    assert(Headers[id].type == ftDate_1123_or_ETag);   /* must be of an appropriate type */
     memset(&tot, 0, sizeof(tot));
     if ((e = httpHeaderFindEntry(hdr, id))) {
        const char *str = strBuf(e->value);
@@ -836,7 +837,7 @@ httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id)
            tot.tag.str = NULL;
        }
     }
-    assert(tot.time < 0 || !tot.tag.str); /* paranoid */
+    assert(tot.time < 0 || !tot.tag.str);      /* paranoid */
     return tot;
 }
 
@@ -951,7 +952,7 @@ httpHeaderNoteParsedEntry(http_hdr_type id, String context, int error)
  */
 
 /* tmp variable used to pass stat info to dumpers */
-extern const HttpHeaderStat *dump_stat; /* argh! */
+extern const HttpHeaderStat *dump_stat;                /* argh! */
 const HttpHeaderStat *dump_stat = NULL;
 
 static void
index 56484b95677309ccc0ec57c41c245d140ade6a26..c131ddce39cfd9280799b3a058d393d394d92b48 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.cc,v 1.12 1998/07/20 19:26:49 wessels Exp $
+ * $Id: HttpRequest.cc,v 1.13 1998/07/21 17:26:16 wessels Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -105,7 +105,7 @@ httpRequestSwapOut(const request_t * req, StoreEntry * e)
 
 /* packs request-line and headers, appends <crlf> terminator */
 void
-httpRequestPack(const request_t * req, Packer *p)
+httpRequestPack(const request_t * req, Packer * p)
 {
     assert(req && p);
     /* pack request-line */
index e77db481e1d51f22c86cb1c4f939640aa6291553..6f5a91e82116996d976ebba17325fcbba44fb45d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: MemBuf.cc,v 1.16 1998/07/20 17:19:10 wessels Exp $
+ * $Id: MemBuf.cc,v 1.17 1998/07/21 17:26:17 wessels Exp $
  *
  * DEBUG: section 59    auto-growing Memory Buffer with printf
  * AUTHOR: Alex Rousskov
@@ -171,8 +171,8 @@ memBufIsNull(MemBuf * mb)
 {
     assert(mb);
     if (!mb->buf && !mb->max_capacity && !mb->capacity && !mb->size)
-       return 1; /* null, not initialized */
-    assert(mb->buf && mb->max_capacity && mb->capacity); /* paranoid */
+       return 1;               /* null, not initialized */
+    assert(mb->buf && mb->max_capacity && mb->capacity);       /* paranoid */
     return 0;
 }
 
index 90ee2ad1a9388ca9d925605803ce5f91ad0eea5b..e9fdef87f2f1a39ccdb6f8d2e0ff792d8979cf59 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.cc,v 1.43 1998/07/20 22:40:46 wessels Exp $
+ * $Id: asn.cc,v 1.44 1998/07/21 17:26:20 wessels Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -35,7 +35,7 @@
 /* BEGIN of definitions for radix tree entries */
 
 /* int in memory with length */
-typedef u_char m_int[1 + sizeof(unsigned int)];        
+typedef u_char m_int[1 + sizeof(unsigned int)];
 #define store_m_int(i, m) \
     (i = htonl(i), m[0] = sizeof(m_int), xmemcpy(m+1, &i, sizeof(unsigned int)))
 #define get_m_int(i, m) \
index fe538e35dc6f2f7c829fd408b3d25700caab04a6..d4a9effa24b4bd94ba8e9e7c77703632fa7fd5cb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.290 1998/07/20 20:20:52 wessels Exp $
+ * $Id: cache_cf.cc,v 1.291 1998/07/21 17:26:21 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -465,7 +465,7 @@ dump_acl_access(StoreEntry * entry, const char *name, acl_access * head)
     acl_list *l;
     while (head != NULL) {
        storeAppendPrintf(entry, "%s %s",
-               name,
+           name,
            head->allow ? "Allow" : "Deny");
        for (l = head->acl_list; l != NULL; l = l->next) {
            storeAppendPrintf(entry, " %s%s",
@@ -671,7 +671,7 @@ free_cachedir(cacheSwap * swap)
 const char *
 peer_type_str(const peer_t type)
 {
-    switch(type) {
+    switch (type) {
     case PEER_PARENT:
        return "parent";
        break;
@@ -786,9 +786,9 @@ parse_peer(peer ** head)
 #if USE_CARP
        } else if (!strncasecmp(token, "carp-load-factor=", 17)) {
            if (p->type != PEER_PARENT)
-               debug(3,0)("parse_peer: Ignoring carp-load-factor for non-parent %s/%d\n", p->host, p->http_port);
-           else 
-               p->carp.load_factor = atof(token + 17);
+               debug(3, 0) ("parse_peer: Ignoring carp-load-factor for non-parent %s/%d\n", p->host, p->http_port);
+           else
+               p->carp.load_factor = atof(token + 17);
 #endif
        } else {
            debug(3, 0) ("parse_peer: token='%s'\n", token);
@@ -801,12 +801,12 @@ parse_peer(peer ** head)
     p->tcp_up = PEER_TCP_MAGIC_COUNT;
 #if USE_CARP
     if (p->carp.load_factor) {
-        /*
-         * calculate this peers hash for use in CARP
-         */
-        p->carp.hash = 0;
-        for (token = p->host; *token != 0;token++)
-            p->carp.hash += (p->carp.hash << 19) + *token;
+       /*
+        * calculate this peers hash for use in CARP
+        */
+       p->carp.hash = 0;
+       for (token = p->host; *token != 0; token++)
+           p->carp.hash += (p->carp.hash << 19) + *token;
     }
 #endif
     cbdataAdd(p, MEM_NONE);
@@ -913,11 +913,11 @@ parse_peer_access(void)
     peer *p;
     if (!(host = strtok(NULL, w_space)))
        self_destruct();
-       if ((p = peerFindByName(host)) == NULL) {
-           debug(15, 0) ("%s, line %d: No cache_peer '%s'\n",
-               cfg_filename, config_lineno, host);
-           return;
-       }
+    if ((p = peerFindByName(host)) == NULL) {
+       debug(15, 0) ("%s, line %d: No cache_peer '%s'\n",
+           cfg_filename, config_lineno, host);
+       return;
+    }
     aclParseAccessLine(&p->access);
 }
 
index 53741f19a0456bd135b6ae308d7b65322d1d042a..63b008133a84ea85b7c6ee5b365125a74b201fe3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_manager.cc,v 1.15 1998/07/20 20:20:53 wessels Exp $
+ * $Id: cache_manager.cc,v 1.16 1998/07/21 17:26:23 wessels Exp $
  *
  * DEBUG: section 16    Cache Manager Objects
  * AUTHOR: Duane Wessels
@@ -45,8 +45,8 @@ typedef struct _action_table {
     char *desc;
     OBJH *handler;
     struct {
-        int pw_req:1;
-        int atomic:1;
+       int pw_req:1;
+       int atomic:1;
     } flags;
     struct _action_table *next;
 } action_table;
@@ -238,7 +238,7 @@ cachemgrStart(int fd, request_t * request, StoreEntry * entry)
     a = cachemgrFindAction(mgr->action);
     assert(a != NULL);
     if (a->flags.atomic)
-        storeBuffer(entry);
+       storeBuffer(entry);
     {
        HttpReply *rep = entry->mem_obj->reply;
        /* prove there are no previous reply headers around */
@@ -255,8 +255,8 @@ cachemgrStart(int fd, request_t * request, StoreEntry * entry)
     }
     a->handler(entry);
     if (a->flags.atomic) {
-        storeBufferFlush(entry);
-        storeComplete(entry);
+       storeBufferFlush(entry);
+       storeComplete(entry);
     }
     cachemgrStateFree(mgr);
 }
index b9a55deffca60e5727992db30e2b4fdd4e8c182d..4157636dff828dfe386c1888bc720fcd5e6046b9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: carp.cc,v 1.2 1998/07/20 17:19:24 wessels Exp $
+ * $Id: carp.cc,v 1.3 1998/07/21 17:26:23 wessels Exp $
  *
  * DEBUG: section 44    Cache Array Routing Protocol
  * AUTHOR: Eric Stern
@@ -26,7 +26,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *      
- */     
+ */
 
 #include "squid.h"
 
@@ -47,7 +47,7 @@ carpInit(void)
        a += p->carp.load_factor;
        K++;
     }
-    if (a == 0.0) 
+    if (a == 0.0)
        /* CARP load factors not configured */
        return;
     /*
@@ -88,21 +88,21 @@ carpSelectParent(request_t * request)
     /* select peer */
     for (tp = Config.peers; tp; tp = tp->next) {
        if (p->carp.load_factor == 0.0)
-               continue;
+           continue;
        assert(p->type == PEER_PARENT);
        combined_hash = (url_hash ^ tp->carp.hash);
        combined_hash += combined_hash * 0x62531965;
        combined_hash = combined_hash << 21;
        combined_hash = combined_hash * tp->carp.load_multiplier;
        debug(44, 3) ("carpSelectParent: %s combined_hash %d\n",
-               tp->host, combined_hash);
+           tp->host, combined_hash);
        if ((combined_hash > high_score) && neighborUp(tp)) {
            p = tp;
            high_score = combined_hash;
        }
     }
     if (p)
-        debug(44, 3) ("carpSelectParent: selected CARP %s\n", p->host);
+       debug(44, 3) ("carpSelectParent: selected CARP %s\n", p->host);
     return p;
 }
 #endif
index 61eecf634360bb9dee2a61f5ddf91cfc1b1104f4..ae09c6b66bee65148d925021e596f74d2b8b5e0b 100644 (file)
@@ -1,8 +1,6 @@
 
-
-
 /*
- * $Id: client.cc,v 1.72 1998/07/20 17:19:26 wessels Exp $
+ * $Id: client.cc,v 1.73 1998/07/21 17:26:24 wessels Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
index 7d70c281928fe7ea6f8e4ce69fb912bf68126278..77bfe924f734f0bd3217c7ac1924ea1be5e8bfc1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.361 1998/07/21 17:22:02 wessels Exp $
+ * $Id: client_side.cc,v 1.362 1998/07/21 17:26:26 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -409,7 +409,7 @@ modifiedSince(StoreEntry * entry, request_t * request)
     debug(33, 3) ("modifiedSince: '%s'\n", storeUrl(entry));
     if (mod_time < 0)
        mod_time = entry->timestamp;
-    debug(33,3)("modifiedSince: mod_time = %d\n", (int) mod_time);
+    debug(33, 3) ("modifiedSince: mod_time = %d\n", (int) mod_time);
     if (mod_time < 0)
        return 1;
     /* Find size of the object */
@@ -786,7 +786,7 @@ clientCheckContentLength(request_t * r)
 {
     /* We only require a content-length for "upload" methods */
     if (!pumpMethod(r->method))
-        return 1;
+       return 1;
     if (httpHeaderGetInt(&r->header, HDR_CONTENT_LENGTH) < 0)
        return 0;
     return 1;
@@ -1165,8 +1165,8 @@ clientCacheHit(void *data, char *buf, ssize_t size)
        /*
         * We hold a stale copy; it needs to be validated
         */
-        if (e->lastmod < 0) {
-           /*
+       if (e->lastmod < 0) {
+           /*
             * Previous reply didn't have a Last-Modified header,
             * we cannot revalidate it.
             */
index 4c20a446528966163a70674b58a701c0ce76a8ad..894ae8c8af761605099e74a92b8eb27dd3312d69 100644 (file)
@@ -480,7 +480,7 @@ enum {
     REQ_REFRESH,
     REQ_USED_PROXY_AUTH,
     REQ_REDIRECTED,
-    REQ_NOCACHE_HACK   /* for changing no-cache requests into IMS */
+    REQ_NOCACHE_HACK           /* for changing no-cache requests into IMS */
 };
 
 enum {
index 4929a9209e8d8d64c050f09400e94c1daf5451dd..d9236bc49839cfdfd54b7e3ebfce7c17f678bdf5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.18 1998/07/20 17:19:39 wessels Exp $
+ * $Id: forward.cc,v 1.19 1998/07/21 17:26:28 wessels Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -319,24 +319,24 @@ fwdStart(int fd, StoreEntry * e, request_t * r, struct in_addr peer_addr)
     /*      
      * Check if this host is allowed to fetch MISSES from us (miss_access)
      */
-    memset(&ch, '\0', sizeof(aclCheck_t));  
+    memset(&ch, '\0', sizeof(aclCheck_t));
     ch.src_addr = peer_addr;
     ch.request = r;
     answer = aclCheckFast(Config.accessList.miss, &ch);
     if (answer == 0) {
-        err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN);
-        err->request = requestLink(r);
-        err->src_addr = peer_addr;
-        errorAppendEntry(e, err);
-        return;
+       err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN);
+       err->request = requestLink(r);
+       err->src_addr = peer_addr;
+       errorAppendEntry(e, err);
+       return;
     }
     debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e));
     e->mem_obj->request = requestLink(r);
     e->mem_obj->fd = fd;
     switch (r->protocol) {
-    /*
-     * Note, don't create fwdState for these requests
-     */
+       /*
+        * Note, don't create fwdState for these requests
+        */
     case PROTO_INTERNAL:
        internalStart(r, e);
        return;
index a48b4c3c9dfee9fbc02a52c3d1b66c84e07a4af5..93289da0d35f6c29dbcf009fc33ea58fbf728a6d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.239 1998/07/20 22:50:37 wessels Exp $
+ * $Id: ftp.cc,v 1.240 1998/07/21 17:26:29 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -575,7 +575,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState)
     LOCAL_ARRAY(char, html, 8192);
     size_t width = Config.Ftp.list_width;
     ftpListParts *parts;
-    *icon=*href=*text=*size=*chdir=*view=*download=*link=*html='\0';
+    *icon = *href = *text = *size = *chdir = *view = *download = *link = *html = '\0';
     if ((int) strlen(line) > 1024) {
        snprintf(html, 8192, "%s\n", line);
        return html;
@@ -610,7 +610,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState)
            strcpy(text, "Home Directory");
        }
        snprintf(html, 8192, "<A HREF=\"%s\">%s</A> <A HREF=\"%s\">%s</A> %s\n",
-               href, icon, href, text, link);
+           href, icon, href, text, link);
        return html;
     }
     if ((parts = ftpListParseParts(line, ftpState->flags)) == NULL) {
@@ -636,7 +636,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState)
        }
     }
     /* {icon} {text} . . . {date}{size}{chdir}{view}{download}{link}\n  */
-    xstrncpy(href,rfc1738_escape(parts->name),2048);
+    xstrncpy(href, rfc1738_escape(parts->name), 2048);
     xstrncpy(text, parts->showname, 2048);
     switch (parts->type) {
     case 'd':
@@ -660,7 +660,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState)
            mimeGetIconURL(parts->name),
            "[UNKNOWN]");
        snprintf(chdir, 2048, " <A HREF=\"%s/;type=d\"><IMG BORDER=0 SRC=\"%s\" "
-                               "ALT=\"[DIR]\"></A>",
+           "ALT=\"[DIR]\"></A>",
            rfc1738_escape(parts->name),
            mimeGetIconURL("internal-dir"));
        break;
@@ -675,25 +675,25 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState)
     if (parts->type != 'd') {
        if (mimeGetViewOption(parts->name)) {
            snprintf(view, 2048, " <A HREF=\"%s;type=a\"><IMG BORDER=0 SRC=\"%s\" "
-                                   "ALT=\"[VIEW]\"></A>",
+               "ALT=\"[VIEW]\"></A>",
                href, mimeGetIconURL("internal-view"));
        }
        if (mimeGetDownloadOption(parts->name)) {
            snprintf(download, 2048, " <A HREF=\"%s;type=i\"><IMG BORDER=0 SRC=\"%s\" "
-                                   "ALT=\"[DOWNLOAD]\"></A>",
+               "ALT=\"[DOWNLOAD]\"></A>",
                href, mimeGetIconURL("internal-download"));
        }
     }
     /* <A HREF="{href}">{icon}</A> <A HREF="{href}">{text}</A> . . . {date}{size}{chdir}{view}{download}{link}\n  */
     if (parts->type != '\0') {
        snprintf(html, 8192, "<A HREF=\"%s\">%s</A> <A HREF=\"%s\">%s</A>%s "
-                               "%s%8s%s%s%s%s\n",
+           "%s%8s%s%s%s%s\n",
            href, icon, href, text, dots_fill(strlen(text)),
            parts->date, size, chdir, view, download, link);
     } else {
        /* Plain listing. {icon} {text} ... {chdir}{view}{download} */
        snprintf(html, 8192, "<A HREF=\"%s\">%s</A> <A HREF=\"%s\">%s</A>%s "
-                               "%s%s%s%s\n",
+           "%s%s%s%s\n",
            href, icon, href, text, dots_fill(strlen(text)),
            chdir, view, download, link);
     }
@@ -2079,10 +2079,10 @@ ftpFail(FtpStateData * ftpState)
     ErrorState *err;
     debug(9, 3) ("ftpFail\n");
     /* Try the / hack to support "Netscape" FTP URL's for retreiving files */
-    if (!ftpState->flags.isdir &&                      /* Not a directory */
-       !ftpState->flags.try_slash_hack &&              /* Not in slash hack */
+    if (!ftpState->flags.isdir &&      /* Not a directory */
+       !ftpState->flags.try_slash_hack &&      /* Not in slash hack */
        ftpState->mdtm <= 0 && ftpState->size < 0 &&    /* Not known as a file */
-       !strNCaseCmp(ftpState->request->urlpath, "/%2f", 4)) { /* No slash encoded */
+       !strNCaseCmp(ftpState->request->urlpath, "/%2f", 4)) {  /* No slash encoded */
        switch (ftpState->state) {
        case SENT_CWD:
        case SENT_RETR:
index 896571633e83b01d5c32b82e6dfd3633e090f98f..f9150708f67ed3568270307b69986723851af0ee 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.60 1998/07/14 22:56:00 wessels Exp $
+ * $Id: globals.h,v 1.61 1998/07/21 17:26:30 wessels Exp $
  */
 
 extern FILE *debug_log;                /* NULL */
@@ -105,5 +105,5 @@ extern CacheDigest *store_digest;   /* NULL */
 extern const char *StoreDigestUrlPath; /* "store_digest" */
 extern const char *StoreDigestMimeStr; /* "application/cache-digest" */
 extern const Version CacheDigestVer;   /* { 3, 3 } */
-extern const char *MultipartMsgBoundaryStr; /* "Unique-Squid-Separator" */
-extern icpUdpData *IcpQueueHead; /* NULL */
+extern const char *MultipartMsgBoundaryStr;    /* "Unique-Squid-Separator" */
+extern icpUdpData *IcpQueueHead;       /* NULL */
index 7f3ea3797708b5f2f8bae8acb82c235c66196d33..014099f22bf01d7bbdc1a39741fc41adf523114c 100644 (file)
@@ -184,15 +184,15 @@ htcpBuildSpecifier(char *buf, size_t buflen, htcpStuff * stuff)
 ssize_t
 htcpBuildTstOpData(char *buf, size_t buflen, htcpStuff * stuff)
 {
-    switch(stuff->rr) {
+    switch (stuff->rr) {
     case RR_REQUEST:
-        return htcpBuildSpecifier(buf, buflen, stuff);
+       return htcpBuildSpecifier(buf, buflen, stuff);
     case RR_RESPONSE:
-        return htcpBuildDetail(buf, buflen, stuff);
+       return htcpBuildDetail(buf, buflen, stuff);
     default:
        fatal_dump("htcpBuildTstOpData: bad RR value");
-   }
-   return 0;
+    }
+    return 0;
 }
 
 ssize_t
@@ -286,8 +286,8 @@ htcpQuery(StoreEntry * e, request_t * req, peer * p)
     ssize_t pktlen;
     char vbuf[32];
     htcpStuff stuff;
-        HttpHeader hdr; 
-        Packer pa;
+    HttpHeader hdr;
+    Packer pa;
     MemBuf mb;
     snprintf(vbuf, sizeof(vbuf), "%3.1f", req->http_ver);
     stuff.op = HTCP_TST;
@@ -297,12 +297,12 @@ htcpQuery(StoreEntry * e, request_t * req, peer * p)
     stuff.method = RequestMethodStr[req->method];
     stuff.uri = storeUrl(e);
     stuff.version = vbuf;
-        httpBuildRequestHeader(req, req, e, &hdr, -1, 0);
-        memBufDefInit(&mb);
-        packerToMemInit(&pa, &mb);
-        httpHeaderPackInto(&hdr, &pa);
-        httpHeaderClean(&hdr);
-        packerClean(&pa);
+    httpBuildRequestHeader(req, req, e, &hdr, -1, 0);
+    memBufDefInit(&mb);
+    packerToMemInit(&pa, &mb);
+    httpHeaderPackInto(&hdr, &pa);
+    httpHeaderClean(&hdr);
+    packerClean(&pa);
     stuff.req_hdrs = mb.buf;
     pkt = htcpBuildPacket(&stuff, &pktlen);
     if (pkt == NULL) {
@@ -400,13 +400,13 @@ htcpUnpackSpecifier(char *buf, int sz)
 }
 
 static void
-htcpHandleNop(char *buf, int sz, peer *p)
+htcpHandleNop(char *buf, int sz, peer * p)
 {
     debug(31, 1) ("htcpHandleNop: Unimplemented\n");
 }
 
 static void
-htcpHandleTst(char *buf, int sz, peer *p)
+htcpHandleTst(char *buf, int sz, peer * p)
 {
     /* buf should be a SPECIFIER */
     htcpSpecifier *s = htcpUnpackSpecifier(buf, sz);
@@ -440,7 +440,7 @@ htcpHandleTst(char *buf, int sz, peer *p)
 }
 
 static void
-htcpTstReply(StoreEntry *e, htcpSpecifier *spec, peer *p)
+htcpTstReply(StoreEntry * e, htcpSpecifier * spec, peer * p)
 {
     htcpStuff stuff;
     char *pkt;
@@ -462,19 +462,19 @@ htcpTstReply(StoreEntry *e, htcpSpecifier *spec, peer *p)
 }
 
 static void
-htcpHandleMon(char *buf, int sz, peer *p)
+htcpHandleMon(char *buf, int sz, peer * p)
 {
     debug(31, 1) ("htcpHandleMon: Unimplemented\n");
 }
 
 static void
-htcpHandleSet(char *buf, int sz, peer *p)
+htcpHandleSet(char *buf, int sz, peer * p)
 {
     debug(31, 1) ("htcpHandleSet: Unimplemented\n");
 }
 
 static void
-htcpHandleData(char *buf, int sz, peer *p)
+htcpHandleData(char *buf, int sz, peer * p)
 {
     htcpDataHeader hdr;
     if (sz < sizeof(htcpDataHeader)) {
@@ -528,8 +528,8 @@ htcpHandle(char *buf, int sz, struct sockaddr_in *from)
     peer *p;
     p = whichPeer(from);
     if (NULL == p) {
-        debug(31,1)("htcpHandle: HTCP message from non-peer: %s:%d\n",
-               inet_ntoa(from->sin_addr), (int) ntohs(from->sin_port));
+       debug(31, 1) ("htcpHandle: HTCP message from non-peer: %s:%d\n",
+           inet_ntoa(from->sin_addr), (int) ntohs(from->sin_port));
        return;
     }
     if (sz < sizeof(htcpHeader)) {
index cdbb123c2e9f887aec541c4289e7b9c8da2924c5..b78982dbafba60d49fe8a43dc794711bfbc3313f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.297 1998/07/20 19:25:34 wessels Exp $
+ * $Id: http.cc,v 1.298 1998/07/21 17:26:33 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -272,12 +272,12 @@ httpCachableReply(HttpStateData * httpState)
        /* NOTREACHED */
        break;
        /* Some responses can never be cached */
-    case HTTP_PARTIAL_CONTENT:                 /* Not yet supported */
+    case HTTP_PARTIAL_CONTENT: /* Not yet supported */
     case HTTP_SEE_OTHER:
     case HTTP_NOT_MODIFIED:
     case HTTP_UNAUTHORIZED:
     case HTTP_PROXY_AUTHENTICATION_REQUIRED:
-    case HTTP_INVALID_HEADER:          /* Squid header parsing error */
+    case HTTP_INVALID_HEADER:  /* Squid header parsing error */
     default:                   /* Unknown status code */
        return 0;
        /* NOTREACHED */
@@ -348,9 +348,9 @@ httpProcessReplyHeader(HttpStateData * httpState, const char *buf, int size)
        }
        if (reply->cache_control) {
            if (EBIT_TEST(reply->cache_control->mask, CC_PROXY_REVALIDATE))
-               EBIT_SET(entry->flag, ENTRY_REVALIDATE);
+               EBIT_SET(entry->flag, ENTRY_REVALIDATE);
            else if (EBIT_TEST(reply->cache_control->mask, CC_MUST_REVALIDATE))
-               EBIT_SET(entry->flag, ENTRY_REVALIDATE);
+               EBIT_SET(entry->flag, ENTRY_REVALIDATE);
        }
        if (EBIT_TEST(httpState->flags, HTTP_KEEPALIVE))
            if (httpState->peer)
index 53da11af447252db4eb4c5ef792fc503950cbe2c..c72dd35ca395aad78227280ab588dbac97b5ea15 100644 (file)
@@ -16,7 +16,7 @@ internalStart(request_t * request, StoreEntry * entry)
        netdbBinaryExchange(entry);
     else {
        debug(0, 0) ("internalStart: unknown request '%s'\n", upath);
-       debugObj(0,0, "internalStart: unknown request:\n", request, (ObjPackMethod)&httpRequestPack);
+       debugObj(0, 0, "internalStart: unknown request:\n", request, (ObjPackMethod) & httpRequestPack);
        err = errorCon(ERR_INVALID_REQ, HTTP_NOT_FOUND);
        err->request = requestLink(request);
        errorAppendEntry(entry, err);
index 014b9e502b876da59338f0b09b32564f98b362c3..0912dffa3a39742185892229348d2b35f2d5ff3f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.cc,v 1.71 1998/07/20 22:50:38 wessels Exp $
+ * $Id: mime.cc,v 1.72 1998/07/21 17:26:35 wessels Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -115,7 +115,7 @@ typedef struct _mime_entry {
     char *content_type;
     char *content_encoding;
     char transfer_mode;
-    unsigned int view_option:1,download_option:1;
+    unsigned int view_option:1, download_option:1;
     struct _mime_entry *next;
 } mimeEntry;
 
@@ -295,7 +295,7 @@ mimeGetEntry(const char *fn, int skip_encodings)
     mimeEntry *m;
     char *t;
     char *name = xstrdup(fn);
-try_again:
+  try_again:
     for (m = MimeTable; m; m = m->next) {
        if (regexec(&m->compiled_pattern, name, 0, 0, 0) == 0)
            break;
@@ -307,7 +307,7 @@ try_again:
            goto try_again;
        }
        /* What? A encoding without a extension? */
-       m=NULL;
+       m = NULL;
     }
     xfree(name);
     return m;
@@ -432,14 +432,14 @@ mimeInit(char *filename)
            debug(25, 1) ("mimeInit: parse error: '%s'\n", buf);
            continue;
        }
-       download_option=0;
-       view_option=0;
+       download_option = 0;
+       view_option = 0;
        while ((option = strtok(NULL, w_space)) != NULL) {
-           if (!strcmp(option,"+download"))
+           if (!strcmp(option, "+download"))
                download_option = 1;
-           else if (!strcmp(option,"+view"))
+           else if (!strcmp(option, "+view"))
                view_option = 1;
-           else 
+           else
                debug(25, 1) ("mimeInit: unknown option: '%s' (%s)\n", buf, option);
        }
        if (regcomp(&re, pattern, re_flags) != 0) {
index 8423a23f6211c4098ab6dfd9091084ca0c67c1e2..ee77490bca5f895ada2e3692848c509544a987a0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.227 1998/07/20 20:21:04 wessels Exp $
+ * $Id: neighbors.cc,v 1.228 1998/07/21 17:26:36 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -148,7 +148,7 @@ neighborTypeStr(const peer * p)
 
 
 peer *
-whichPeer(const struct sockaddr_in *from)
+whichPeer(const struct sockaddr_in * from)
 {
     int j;
     u_short port = ntohs(from->sin_port);
index d503b8b529204959e06f1cd3ad40d37b50881d48..c4ada5570a8fcd1bf0c436e0eaea457b9678fc7b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.71 1998/07/20 17:19:59 wessels Exp $
+ * $Id: peer_select.cc,v 1.72 1998/07/21 17:26:38 wessels Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -87,8 +87,8 @@ peerSelectStateFree(ps_state * psstate)
     requestUnlink(psstate->request);
     psstate->request = NULL;
     if (psstate->entry) {
-        storeUnlockObject(psstate->entry);
-        psstate->entry = NULL;
+       storeUnlockObject(psstate->entry);
+       psstate->entry = NULL;
     }
     cbdataFree(psstate);
 }
@@ -158,7 +158,7 @@ peerSelect(request_t * request,
     request->hier.peer_select_start = current_time;
 #endif
     if (psstate->entry)
-        storeLockObject(psstate->entry);
+       storeLockObject(psstate->entry);
     cbdataLock(callback_data);
     peerSelectFoo(psstate);
 }
@@ -305,9 +305,9 @@ peerSelectFoo(ps_state * psstate)
 #endif
 #if USE_CARP
     } else if ((p = carpSelectParent(request))) {
-        hierarchyNote(&request->hier, CARP, &psstate->icp, p->host);
-        peerSelectCallback(psstate, p);
-        return;
+       hierarchyNote(&request->hier, CARP, &psstate->icp, p->host);
+       peerSelectCallback(psstate, p);
+       return;
 #endif
     } else if ((p = netdbClosestParent(request))) {
        request->hier.alg = PEER_SA_NETDB;
@@ -386,7 +386,7 @@ peerPingTimeout(void *data)
     if (!cbdataValid(psstate->callback_data)) {
        /* request aborted */
        cbdataUnlock(psstate->callback_data);
-        peerSelectStateFree(psstate);
+       peerSelectStateFree(psstate);
        return;
     }
     if (entry)
index edd1fb8dc531fd5bd428f81906dce0ed248cacd9..d995e206466c7342f0b80f078e6ba77df9def9f8 100644 (file)
@@ -247,8 +247,8 @@ extern int httpAnonHdrDenied(http_hdr_type hdr_id);
 extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, int);
 
 /* ETag */
-extern int etagParseInit(ETag *etag, const char *str);
-extern int etagIsEqual(const ETag *tag1, const ETag *tag2);
+extern int etagParseInit(ETag * etag, const char *str);
+extern int etagIsEqual(const ETag * tag1, const ETag * tag2);
 
 /* Http Status Line */
 /* init/clean */
@@ -273,7 +273,7 @@ extern void httpBodyClean(HttpBody * body);
 /* get body ptr (always use this) */
 extern const char *httpBodyPtr(const HttpBody * body);
 /* set body, does not clone mb so you should not reuse it */
-extern void httpBodySet(HttpBody * body, MemBuf *mb);
+extern void httpBodySet(HttpBody * body, MemBuf * mb);
 
 /* pack */
 extern void httpBodyPackInto(const HttpBody * body, Packer * p);
@@ -360,8 +360,8 @@ extern void httpHeaderPutTime(HttpHeader * hdr, http_hdr_type type, time_t time)
 extern void httpHeaderPutStr(HttpHeader * hdr, http_hdr_type type, const char *str);
 extern void httpHeaderPutAuth(HttpHeader * hdr, const char *authScheme, const char *realm);
 extern void httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc);
-extern void httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange *cr);
-extern void httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange *range);
+extern void httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange * cr);
+extern void httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange * range);
 extern void httpHeaderPutExt(HttpHeader * hdr, const char *name, const char *value);
 extern int httpHeaderGetInt(const HttpHeader * hdr, http_hdr_type id);
 extern time_t httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id);
@@ -430,7 +430,7 @@ extern request_t *requestLink(request_t *);
 extern void requestUnlink(request_t *);
 extern int httpRequestParseHeader(request_t * req, const char *parse_start);
 extern void httpRequestSwapOut(const request_t * req, StoreEntry * e);
-extern void httpRequestPack(const request_t * req, Packer *p);
+extern void httpRequestPack(const request_t * req, Packer * p);
 extern int httpRequestPrefixLen(const request_t * req);
 extern int httpRequestHdrAllowed(const HttpHeaderEntry * e, String * strConnection);
 
@@ -1019,7 +1019,7 @@ extern char *internalRemoteUri(const char *, u_short, const char *, const char *
 
 #if USE_CARP
 extern void carpInit(void);
-extern peer * carpSelectParent(request_t *);
+extern peer *carpSelectParent(request_t *);
 #endif
 
 /* packs, then prints an object using debug() */
index 329421b92b9eff992ef1c0056e86452e50b5a4ec..d9950c67caecfb485e10fbd46e710263d05b17d7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: refresh.cc,v 1.26 1998/07/21 03:16:07 wessels Exp $
+ * $Id: refresh.cc,v 1.27 1998/07/21 17:26:40 wessels Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -58,7 +58,7 @@ struct {
 #define REFRESH_DEFAULT_PCT    0.20
 #define REFRESH_DEFAULT_MAX    (time_t)259200
 
-static const refresh_t * refreshLimits(const char *);
+static const refresh_t *refreshLimits(const char *);
 static const refresh_t *refreshUncompiledPattern(const char *);
 static OBJH refreshStats;
 
index 896adb4069af790ccc18c2af852df59a900b310b..4b83d81b6ad952e3c8a3dd88cb9b86ef8b0b56d8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.cc,v 1.47 1998/07/20 22:40:47 wessels Exp $
+ * $Id: snmp_agent.cc,v 1.48 1998/07/21 17:26:41 wessels Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -63,10 +63,10 @@ snmp_basicFn(variable_list * Var, snint * ErrP)
     switch (Var->name[7]) {
     case SYS_DESCR:
        pp = SQUID_SYS_DESCR;
-        Answer->type = ASN_OCTET_STR;
-        Answer->val_len = strlen(pp);
-        Answer->val.string = (u_char *) xstrdup(pp);
-        break;
+       Answer->type = ASN_OCTET_STR;
+       Answer->val_len = strlen(pp);
+       Answer->val.string = (u_char *) xstrdup(pp);
+       break;
     case SYS_OBJECT_ID:
        pp = SQUID_VERSION;
        Answer->type = ASN_OCTET_STR;
index 12d98ef4cae1dd972be777cc01703b6f061c82a5..94f22d5e3e2d724c352f30db80ff0d619bf22ae1 100644 (file)
@@ -245,7 +245,7 @@ storeClientFileRead(store_client * sc)
            sc);
     else {
        if (sc->entry->swap_status == SWAPOUT_WRITING)
-            assert(mem->swapout.done_offset > sc->copy_offset + mem->swap_hdr_sz);
+           assert(mem->swapout.done_offset > sc->copy_offset + mem->swap_hdr_sz);
        file_read(sc->swapin_fd,
            sc->copy_buf,
            sc->copy_size,
index 88aff8adc546ed5d99863852f6debb177be6e357..35e090ea3a1ce79bd13c91944d72caf797e17422 100644 (file)
@@ -1,7 +1,4 @@
 
-
-
-
 struct _acl_ip_data {
     struct in_addr addr1;      /* if addr2 non-zero then its a range */
     struct in_addr addr2;
@@ -1386,8 +1383,8 @@ struct _FwdState {
     FwdServer *servers;
     int server_fd;
     struct {
-        int err_code;
-        http_status http_code;
+       int err_code;
+       http_status http_code;
        int xerrno;
     } fail;
     time_t start;
index 6e7bc9258fde3a271cac2727ca44d520fcd12ad9..8a192a6539abe3863b6e6cc1fbafe865af68a1cf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.162 1998/07/20 17:20:18 wessels Exp $
+ * $Id: tools.cc,v 1.163 1998/07/21 17:26:46 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -904,7 +904,7 @@ debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm)
     assert(label && obj && pm);
     memBufDefInit(&mb);
     packerToMemInit(&p, &mb);
-    (*pm)(obj, &p);
+    (*pm) (obj, &p);
     debug(section, level) ("%s%s", label, mb.buf);
     packerClean(&p);
     memBufClean(&mb);
index 80ca44d48c048f3ee267d966ef6bd7ffce59a4af..2a33b2ead5c60e247699273b61b6d79f390d69bc 100644 (file)
@@ -192,4 +192,4 @@ typedef ssize_t HttpHeaderPos;
 typedef char HttpHeaderMask[8];
 
 /* a common objPackInto interface; used by debugObj */
-typedef void (*ObjPackMethod)(void *obj, Packer *p);
+typedef void (*ObjPackMethod) (void *obj, Packer * p);
index f86597f7733d1368db31d610d7cefba61b6cabaa..33a72920328e24dbebf07a1886fd624449b405cc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: whois.cc,v 1.3 1998/07/20 17:20:24 wessels Exp $
+ * $Id: whois.cc,v 1.4 1998/07/21 17:26:48 wessels Exp $
  *
  * DEBUG: section 75    WHOIS protocol
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -56,7 +56,7 @@ whoisStart(FwdState * fwdState, int fd)
     cbdataAdd(p, MEM_NONE);
     storeLockObject(p->entry);
     comm_add_close_handler(fd, whoisClose, p);
-    l = strLen(p->request->urlpath)+3;
+    l = strLen(p->request->urlpath) + 3;
     buf = xmalloc(l);
     snprintf(buf, l, "%s\r\n", strBuf(p->request->urlpath) + 1);
     comm_write(fd, buf, strlen(buf), NULL, p, xfree);