]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Sat, 23 May 1998 05:43:48 +0000 (05:43 +0000)
committerwessels <>
Sat, 23 May 1998 05:43:48 +0000 (05:43 +0000)
30 files changed:
src/CacheDigest.cc
src/HttpBody.cc
src/HttpHdrCc.cc
src/HttpHdrRange.cc
src/HttpHeader.cc
src/HttpHeaderTools.cc
src/HttpReply.cc
src/HttpRequest.cc
src/HttpStatusLine.cc
src/MemBuf.cc
src/client.cc
src/client_side.cc
src/disk.cc
src/filemap.cc
src/fqdncache.cc
src/ftp.cc
src/http.cc
src/internal.cc
src/mem.cc
src/neighbors.cc
src/net_db.cc
src/pconn.cc
src/protos.h
src/ssl.cc
src/stat.cc
src/store.cc
src/store_swapin.cc
src/structs.h
src/tunnel.cc
src/url.cc

index 03611c5b657a4836cc023c814a9d614e957c2b7b..bc0a69a4d4179c26e6981734beb4bc3b048d1070 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CacheDigest.cc,v 1.21 1998/05/14 16:33:47 wessels Exp $
+ * $Id: CacheDigest.cc,v 1.22 1998/05/22 23:43:48 wessels Exp $
  *
  * DEBUG: section 70    Cache Digest
  * AUTHOR: Alex Rousskov
@@ -318,7 +318,7 @@ cacheDigestHashKey(const CacheDigest * cd, const cache_key * key)
 #endif
 
 static void
-cacheDigestHashKey(const CacheDigest * cd, const cache_key *key)
+cacheDigestHashKey(const CacheDigest * cd, const cache_key * key)
 {
     const unsigned int bit_count = cd->mask_size * 8;
     unsigned int tmp_keys[4];
@@ -332,4 +332,3 @@ cacheDigestHashKey(const CacheDigest * cd, const cache_key *key)
        storeKeyText(key), bit_count,
        hashed_keys[0], hashed_keys[1], hashed_keys[2], hashed_keys[3]);
 }
-
index 13fe2ec73402764b4acbf783693c35f4ed408f62..d006a70e69353c724f737cb99ed7362c7326d378 100644 (file)
@@ -1,7 +1,8 @@
 
 
+
 /*
- * $Id: HttpBody.cc,v 1.9 1998/04/24 07:09:27 wessels Exp $
+ * $Id: HttpBody.cc,v 1.10 1998/05/22 23:43:49 wessels Exp $
  *
  * DEBUG: section 56    HTTP Message Body
  * AUTHOR: Alex Rousskov
index 1bf513abf1cb7668ca687e2c06a3f31cc29c9330..afc93f517994056572cdcd23e2bd6dbd86931372 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrCc.cc,v 1.10 1998/05/11 18:44:25 rousskov Exp $
+ * $Id: HttpHdrCc.cc,v 1.11 1998/05/22 23:43:50 wessels Exp $
  *
  * DEBUG: section 65    HTTP Cache Control Header
  * AUTHOR: Alex Rousskov
@@ -51,7 +51,7 @@ HttpHeaderFieldInfo *CcFieldsInfo = NULL;
 static int CcParsedCount = 0;
 
 /* local prototypes */
-static int httpHdrCcParseInit(HttpHdrCc * cc, const String *str);
+static int httpHdrCcParseInit(HttpHdrCc * cc, const String * str);
 
 
 /* module initialization */
@@ -81,7 +81,7 @@ httpHdrCcCreate()
 
 /* creates an cc object from a 0-terminating string */
 HttpHdrCc *
-httpHdrCcParseCreate(const String *str)
+httpHdrCcParseCreate(const String * str)
 {
     HttpHdrCc *cc = httpHdrCcCreate();
     if (!httpHdrCcParseInit(cc, str)) {
@@ -93,7 +93,7 @@ httpHdrCcParseCreate(const String *str)
 
 /* parses a 0-terminating string and inits cc */
 static int
-httpHdrCcParseInit(HttpHdrCc * cc, const String *str)
+httpHdrCcParseInit(HttpHdrCc * cc, const String * str)
 {
     const char *item;
     const char *p;             /* '=' parameter */
@@ -168,8 +168,7 @@ httpHdrCcPackInto(const HttpHdrCc * cc, Packer * p)
        if (flag == CC_MAX_AGE && cc->max_age >= 0) {
            packerPrintf(p, "max-age=%d", (int) cc->max_age);
            pcount++;
-       } else
-       if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) {
+       } else if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) {
            packerPrintf(p, (pcount ? ", %s" : "%s"), strBuf(CcFieldsInfo[flag].name));
            pcount++;
        }
index 09b9c7c4515b726da682e216b8e06d04008d216e..e6595d2c61d5e056f3d546e8a20ed17a40ff66fd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrRange.cc,v 1.7 1998/05/11 18:44:25 rousskov Exp $
+ * $Id: HttpHdrRange.cc,v 1.8 1998/05/22 23:43:51 wessels Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -172,7 +172,7 @@ httpHdrRangeCreate()
 }
 
 HttpHdrRange *
-httpHdrRangeParseCreate(const String *str)
+httpHdrRangeParseCreate(const String * str)
 {
     HttpHdrRange *r = httpHdrRangeCreate();
     if (!httpHdrRangeParseInit(r, str)) {
@@ -184,7 +184,7 @@ httpHdrRangeParseCreate(const String *str)
 
 /* returns true if ranges are valid; inits HttpHdrRange */
 int
-httpHdrRangeParseInit(HttpHdrRange * range, const String *str)
+httpHdrRangeParseInit(HttpHdrRange * range, const String * str)
 {
     const char *item;
     const char *pos = NULL;
@@ -197,7 +197,7 @@ httpHdrRangeParseInit(HttpHdrRange * range, const String *str)
     if (strNCaseCmp(*str, "bytes=", 6))
        return 0;
     /* skip "bytes="; hack! */
-    pos = strBuf(*str)+5;
+    pos = strBuf(*str) + 5;
     /* iterate through comma separated list */
     while (strListGetItem(str, ',', &item, &ilen, &pos)) {
        HttpHdrRangeSpec *spec = httpHdrRangeSpecParseCreate(item, ilen);
index 83d21e47e7436738621e87b2fca4f2c5944eb0a3..e4ab1d3884887a4f3f23c1271d34d77fda7c19e1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.cc,v 1.35 1998/05/21 00:01:28 wessels Exp $
+ * $Id: HttpHeader.cc,v 1.36 1998/05/22 23:43:52 wessels Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -85,7 +85,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] =
     {"Accept-Ranges", HDR_ACCEPT_RANGES, ftStr},
     {"Age", HDR_AGE, ftInt},
     {"Age", HDR_ALLOW, ftStr},
-    {"Authorization", HDR_AUTHORIZATION, ftStr}, /* for now */
+    {"Authorization", HDR_AUTHORIZATION, ftStr},       /* for now */
     {"Cache-Control", HDR_CACHE_CONTROL, ftPCc},
     {"Connection", HDR_CONNECTION, ftStr},     /* for now */
     {"Content-Encoding", HDR_CONTENT_ENCODING, ftStr},
@@ -149,7 +149,7 @@ static http_hdr_type ListHeadersArr[] =
     /* HDR_TRANSFER_ENCODING, */
     HDR_UPGRADE,
     HDR_VARY,
-    HDR_VIA, 
+    HDR_VIA,
     /* HDR_WARNING, */
     HDR_WWW_AUTHENTICATE,
     /* HDR_EXPECT, HDR_TE, HDR_TRAILER */
@@ -538,7 +538,7 @@ httpHeaderGetList(const HttpHeader * hdr, http_hdr_type id)
     /* only fields from ListHeaders array can be "listed" */
     assert(CBIT_TEST(ListHeadersMask, id));
     if (!CBIT_TEST(hdr->mask, id))
-        return s;
+       return s;
     while ((e = httpHeaderGetEntry(hdr, &pos))) {
        if (e->id == id)
            strListAdd(&s, strBuf(e->value), ',');
@@ -606,7 +606,7 @@ httpHeaderPutAuth(HttpHeader * hdr, const char *authScheme, const char *realm)
 }
 
 void
-httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc *cc)
+httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc)
 {
     MemBuf mb;
     Packer p;
@@ -740,17 +740,17 @@ httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, const char *authSche
     int l;
     assert(hdr && authScheme);
     field = httpHeaderGetStr(hdr, id);
-    if (!field) /* no authorization field */
+    if (!field)                        /* no authorization field */
        return NULL;
     l = strlen(authScheme);
-    if (!l || strncasecmp(field, authScheme, l)) /* wrong scheme */
+    if (!l || strncasecmp(field, authScheme, l))       /* wrong scheme */
        return NULL;
     field += l;
-    if (!isspace(*field)) /* wrong scheme */
+    if (!isspace(*field))      /* wrong scheme */
        return NULL;
     /* skip white space */
     field += xcountws(field);
-    if (!*field) /* no authorization cookie */
+    if (!*field)               /* no authorization cookie */
        return NULL;
     return base64_decode(field);
 }
index 727f11962d74429524997d15e826351a87c91f38..65f5e5fef5b98a9afa4ff6c2c6b3777b5fd3a973 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: HttpHeaderTools.cc,v 1.12 1998/05/21 00:57:35 rousskov Exp $
+ * $Id: HttpHeaderTools.cc,v 1.13 1998/05/22 23:43:53 wessels Exp $
  *
  * DEBUG: section 66    HTTP Header Tools
  * AUTHOR: Alex Rousskov
@@ -110,7 +110,7 @@ httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * i
  * note: if HDR_PROXY_CONNECTION is present we ignore HDR_CONNECTION
  */
 int
-httpHeaderHasConnDir(const HttpHeader *hdr, const char *directive)
+httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive)
 {
     if (httpHeaderHas(hdr, HDR_PROXY_CONNECTION)) {
        const char *str = httpHeaderGetStr(hdr, HDR_PROXY_CONNECTION);
@@ -127,7 +127,7 @@ httpHeaderHasConnDir(const HttpHeader *hdr, const char *directive)
 
 /* returns true iff "m" is a member of the list */
 int
-strListIsMember(const String *list, const char *m, char del)
+strListIsMember(const String * list, const char *m, char del)
 {
     const char *pos = NULL;
     const char *item;
@@ -141,7 +141,7 @@ strListIsMember(const String *list, const char *m, char del)
 
 /* returns true iff "s" is a substring of a member of the list */
 int
-strListIsSubstr(const String *list, const char *s, char del)
+strListIsSubstr(const String * list, const char *s, char del)
 {
     const char *pos = NULL;
     const char *item;
@@ -155,7 +155,7 @@ strListIsSubstr(const String *list, const char *s, char del)
 
 /* appends an item to the list */
 void
-strListAdd(String *str, const char *item, char del)
+strListAdd(String * str, const char *item, char del)
 {
     assert(str && item);
     if (strLen(*str))
@@ -172,7 +172,7 @@ strListAdd(String *str, const char *item, char del)
  * init pos with NULL to start iteration.
  */
 int
-strListGetItem(const String *str, char del, const char **item, int *ilen, const char **pos)
+strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos)
 {
     size_t len;
     assert(str && item && pos);
index 244e6cae61e1ec875e5a001aede67105306da976..2d5b3833a9951a0546e013660972af025ffd54ac 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.23 1998/05/22 23:13:44 wessels Exp $
+ * $Id: HttpReply.cc,v 1.24 1998/05/22 23:43:54 wessels Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -328,7 +328,7 @@ httpReplyParseStep(HttpReply * rep, const char *buf, int atEnd)
                blk_start = parse_start, blk_end = blk_start + strlen(blk_start);
            else
                return 0;
-        }
+       }
        if (!httpHeaderParse(&rep->header, blk_start, blk_end))
            return httpReplyParseError(rep);
 
@@ -430,12 +430,12 @@ httpMsgIsPersistent(float http_ver, const HttpHeader * hdr)
         * return false if it is a browser connection.  If there is a
         * VIA header, then we assume this is NOT a browser connection.
         */
-        const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
+       const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
        if (agent && !httpHeaderHas(hdr, HDR_VIA)) {
            if (!strncasecmp(agent, "Mozilla/3.", 10))
                return 0;
            if (!strncasecmp(agent, "Netscape/3.", 11))
-               return 0;
+               return 0;
        }
        /* for old versions of HTTP: persistent if has "keep-alive" */
        return httpHeaderHasConnDir(hdr, "keep-alive");
index bf4d8cc499485fd7ea513179b3d54e3afaa7073c..ced595ab86a1199746170cf9e2a5aee7ed5d235e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.cc,v 1.3 1998/05/11 20:56:06 rousskov Exp $
+ * $Id: HttpRequest.cc,v 1.4 1998/05/22 23:43:56 wessels Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -34,7 +34,7 @@
 request_t *
 requestCreate(method_t method, protocol_t protocol, const char *urlpath)
 {
-    request_t * req = memAllocate(MEM_REQUEST_T);
+    request_t *req = memAllocate(MEM_REQUEST_T);
     req->method = method;
     req->protocol = protocol;
     if (urlpath)
@@ -81,7 +81,7 @@ requestUnlink(request_t * request)
 }
 
 int
-httpRequestParseHeader(request_t *req, const char *parse_start)
+httpRequestParseHeader(request_t * req, const char *parse_start)
 {
     const char *blk_start, *blk_end;
     if (!httpMsgIsolateHeaders(&parse_start, &blk_start, &blk_end))
@@ -90,7 +90,7 @@ httpRequestParseHeader(request_t *req, const char *parse_start)
 }
 
 void
-httpRequestSetHeaders(request_t *req, method_t method, const char *uri, const char *header_str)
+httpRequestSetHeaders(request_t * req, method_t method, const char *uri, const char *header_str)
 {
     MemBuf mb;
     assert(req && uri && header_str);
@@ -102,12 +102,12 @@ httpRequestSetHeaders(request_t *req, method_t method, const char *uri, const ch
     req->prefix = xstrdup(mb.buf);
     req->prefix_sz = mb.size;
     memBufClean(&mb);
-    httpHeaderParse(&req->header, header_str, header_str+strlen(header_str));
+    httpHeaderParse(&req->header, header_str, header_str + strlen(header_str));
 }
 
 /* returns true if header is allowed to be passed on */
 int
-httpRequestHdrAllowed(const HttpHeaderEntry *e, String *strConn)
+httpRequestHdrAllowed(const HttpHeaderEntry * e, String * strConn)
 {
     assert(e);
     /* check connection header first */
@@ -116,10 +116,8 @@ httpRequestHdrAllowed(const HttpHeaderEntry *e, String *strConn)
     /* check with anonymizer tables */
     if (Config.onoff.anonymizer == ANONYMIZER_PARANOID) {
        return httpAnonHdrAllowed(e->id);
-    } else
-    if (Config.onoff.anonymizer == ANONYMIZER_STANDARD) {
+    } else if (Config.onoff.anonymizer == ANONYMIZER_STANDARD) {
        return !httpAnonHdrDenied(e->id);
     }
     return 1;
 }
-
index 6abb0e77a1a0a544e9050bf42ce113b01aaa0ed1..ca2c38be83d03a83b2c834307fbc5828c7d709ce 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: HttpStatusLine.cc,v 1.10 1998/05/02 06:40:23 wessels Exp $
+ * $Id: HttpStatusLine.cc,v 1.11 1998/05/22 23:43:56 wessels Exp $
  *
  * DEBUG: section 57    HTTP Status-line
  * AUTHOR: Alex Rousskov
index 0efcd7876df87d2d9f063944f25d8bbfb4b8c3de..f8f752cd15e83a8942975243c8e10d7eaac89a06 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: MemBuf.cc,v 1.8 1998/05/11 18:44:30 rousskov Exp $
+ * $Id: MemBuf.cc,v 1.9 1998/05/22 23:43:57 wessels Exp $
  *
  * DEBUG: section 59    auto-growing Memory Buffer with printf
  * AUTHOR: Alex Rousskov
@@ -259,7 +259,7 @@ memBufGrow(MemBuf * mb, mb_size_t min_cap)
        mb->buf = xmalloc(new_cap);
        mb->freefunc = &xfree;
     } else {
-       assert(mb->freefunc == &xfree); /* for now */
+       assert(mb->freefunc == &xfree);         /* for now */
        mb->buf = xrealloc(mb->buf, new_cap);
     }
     memset(mb->buf + mb->size, 0, new_cap - mb->size); /* just in case */
index 4b3bc22353784211fa26961e96d11c60ac190152..2fb08dc042e8eb3fd6b3fc96390ae4cf13574722 100644 (file)
@@ -1,6 +1,7 @@
 
+
 /*
- * $Id: client.cc,v 1.67 1998/05/15 20:02:10 wessels Exp $
+ * $Id: client.cc,v 1.68 1998/05/22 23:43:59 wessels Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
index 3a014c8421c16d50f7dda9cbd59978341d874a97..a397bc8a90c26f77b02ee2d90cec1001f5d952d5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.312 1998/05/21 23:14:05 wessels Exp $
+ * $Id: client_side.cc,v 1.313 1998/05/22 23:44:00 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1992,9 +1992,9 @@ clientReadRequest(int fd, void *data)
                        if (request->port == Config.Port.http->i)
                            http->flags.internal = 1;
                    } else if (internalStaticCheck(strBuf(request->urlpath))) {
-                           xstrncpy(request->host, getMyHostname(), SQUIDHOSTNAMELEN);
-                           request->port = Config.Port.http->i;
-                           http->flags.internal = 1;
+                       xstrncpy(request->host, getMyHostname(), SQUIDHOSTNAMELEN);
+                       request->port = Config.Port.http->i;
+                       http->flags.internal = 1;
                    }
                }
            }
index 9195530f941f8b7864db6a50d977d5271a99429d..b27c12a45776ab879dd8cb402bb6d208feb63e70 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: disk.cc,v 1.115 1998/05/22 21:11:47 wessels Exp $
+ * $Id: disk.cc,v 1.116 1998/05/22 23:44:03 wessels Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -274,7 +274,7 @@ diskHandleWrite(int fd, void *notused)
     assert(fdd->write_q->len > fdd->write_q->buf_offset);
 #if USE_ASYNC_IO
     aioWrite(fd,
-       -1, /* seek offset, -1 == append */
+       -1,                     /* seek offset, -1 == append */
        fdd->write_q->buf + fdd->write_q->buf_offset,
        fdd->write_q->len - fdd->write_q->buf_offset,
        diskHandleWriteComplete,
index 35e8b967ed851fa3d660cc9989c2f1deb5e27512..c4c0291d2be7c449d96dff5d59d3a760ef7dd4ea 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: filemap.cc,v 1.27 1998/05/22 23:42:12 wessels Exp $
+ * $Id: filemap.cc,v 1.28 1998/05/22 23:44:04 wessels Exp $
  *
  * DEBUG: section 8     Swap File Bitmap
  * AUTHOR: Harvest Derived
@@ -148,7 +148,7 @@ file_map_bit_set(fileMap * fm, int file_number)
        fm->toggle++;
        debug(8, 0) ("WARNING: filemap utilization at %d%%\n"
            "\tConsider decreasing store_avg_object_size in squid.conf\n",
-            percent(fm->n_files_in_map, fm->max_n_files));
+           percent(fm->n_files_in_map, fm->max_n_files));
     } else if (fm->n_files_in_map > (fm->max_n_files - 100)) {
        fatal_dump("You've run out of swap file numbers.");
     }
index 8b362cab0e765f75389c4dc0b162dfa7151213e2..e7ee81e903791839d555aafa8e04866684edadaf 100644 (file)
@@ -1,6 +1,7 @@
 
+
 /*
- * $Id: fqdncache.cc,v 1.102 1998/05/15 15:16:21 wessels Exp $
+ * $Id: fqdncache.cc,v 1.103 1998/05/22 23:44:05 wessels Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
index e7d2920363f46cfb0a6c81ebce2fe7cd66ecac81..1d0063c4d7d130eca3758f7ca7d252591c78f391 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.225 1998/05/21 07:05:38 wessels Exp $
+ * $Id: ftp.cc,v 1.226 1998/05/22 23:44:07 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -56,24 +56,24 @@ typedef enum {
 } ftp_state_t;
 
 struct _ftp_flags {
-       int isdir:1;
-       int pasv_supported:1;
-       int skip_whitespace:1;
-       int rest_supported:1;
-       int pasv_only:1;
-       int authenticated:1;
-       int http_header_sent:1;
-       int tried_nlst:1;
-       int use_base:1;
-       int root_dir:1;
-       int no_dotdot:1;
-       int html_header_sent:1;
-       int binary:1;
-       int try_slash_hack:1;
-       int put:1;
-       int put_mkdir:1;
-       int listformat_unknown:1;
-       int datachannel_hack:1;
+    int isdir:1;
+    int pasv_supported:1;
+    int skip_whitespace:1;
+    int rest_supported:1;
+    int pasv_only:1;
+    int authenticated:1;
+    int http_header_sent:1;
+    int tried_nlst:1;
+    int use_base:1;
+    int root_dir:1;
+    int no_dotdot:1;
+    int html_header_sent:1;
+    int binary:1;
+    int try_slash_hack:1;
+    int put:1;
+    int put_mkdir:1;
+    int listformat_unknown:1;
+    int datachannel_hack:1;
 };
 
 typedef struct _Ftpdata {
@@ -717,7 +717,7 @@ ftpParseListing(FtpStateData * ftpState, int len)
     while (*end != '\r' && *end != '\n' && end > sbuf)
        end--;
     usable = end - sbuf;
-    debug(9,3)("ftpParseListing: usable = %d\n", usable);
+    debug(9, 3) ("ftpParseListing: usable = %d\n", usable);
     if (usable == 0) {
        debug(9, 3) ("ftpParseListing: didn't find end for %s\n", storeUrl(e));
        xfree(sbuf);
@@ -853,7 +853,7 @@ ftpDataRead(int fd, void *data)
  * Return 0 if something is missing.
  */
 static int
-ftpCheckAuth(FtpStateData * ftpState, const HttpHeader *req_hdr)
+ftpCheckAuth(FtpStateData * ftpState, const HttpHeader * req_hdr)
 {
     char *orig_user;
     const char *auth;
index 6553ebc4606377ae5e47f40d2aeaac95faada07b..0fbf51a9077adbf30932b6b6d24cdb3fcc205f82 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.273 1998/05/21 22:01:08 wessels Exp $
+ * $Id: http.cc,v 1.274 1998/05/22 23:44:12 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -606,12 +606,12 @@ void
 httpBuildRequestHeader(request_t * request,
     request_t * orig_request,
     StoreEntry * entry,
-    HttpHeader *hdr_out,
+    HttpHeader * hdr_out,
     int cfd,
     int flags)
 {
     /* building buffer for complex strings */
-    #define BBUF_SZ (MAX_URL+32)
+#define BBUF_SZ (MAX_URL+32)
     LOCAL_ARRAY(char, bbuf, BBUF_SZ);
     String strConnection = StringNull;
     const HttpHeader *hdr_in = &orig_request->header;
@@ -621,7 +621,7 @@ httpBuildRequestHeader(request_t * request,
     assert(orig_request->prefix != NULL);
     debug(11, 3) ("httpBuildRequestHeader:\n%s", orig_request->prefix);
     httpHeaderInit(hdr_out);
-    
+
     /* append our IMS header */
     if (entry && entry->lastmod && request->method == METHOD_GET)
        httpHeaderPutTime(hdr_out, HDR_IF_MODIFIED_SINCE, entry->lastmod);
@@ -654,7 +654,7 @@ httpBuildRequestHeader(request_t * request,
                /* sacrificing efficiency over clarity, etc. */
                const int hops = httpHeaderGetInt(hdr_in, HDR_MAX_FORWARDS);
                if (hops > 0)
-                   httpHeaderPutInt(hdr_out, HDR_MAX_FORWARDS, hops-1);
+                   httpHeaderPutInt(hdr_out, HDR_MAX_FORWARDS, hops - 1);
            }
            break;
        case HDR_PROXY_CONNECTION:
@@ -732,7 +732,7 @@ size_t
 httpBuildRequestPrefix(request_t * request,
     request_t * orig_request,
     StoreEntry * entry,
-    MemBuf *mb,
+    MemBuf * mb,
     int cfd,
     int flags)
 {
index 9031662cc40c91e9821030223d241b49de1af941..ebd6ef971e64c6d2b87a3b40344460e598b36582 100644 (file)
@@ -6,23 +6,23 @@ internalStart(request_t * request, StoreEntry * entry)
 {
     const char *upath = strBuf(request->urlpath);
     debug(0, 1) ("internalStart: %s requesting '%s'\n",
-        inet_ntoa(request->client_addr), upath);
+       inet_ntoa(request->client_addr), upath);
     if (0 == strcmp(upath, "/squid-internal-dynamic/netdb"))
        netdbBinaryExchange(entry);
     else
-       debug(0,0)("internalStart: unknown request '%s'\n", upath);
+       debug(0, 0) ("internalStart: unknown request '%s'\n", upath);
 }
 
 int
 internalCheck(const char *urlpath)
 {
-       return (0 == strncmp(urlpath, "/squid-internal-", 16));
+    return (0 == strncmp(urlpath, "/squid-internal-", 16));
 }
 
 int
 internalStaticCheck(const char *urlpath)
 {
-       return (0 == strncmp(urlpath, "/squid-internal-static", 22));
+    return (0 == strncmp(urlpath, "/squid-internal-static", 22));
 }
 
 /*
index 62ee03c28cf72d90e89f37280e03e66e543c3f8e..3d3f01929065b4ee370acb22ad0d34c3ba6004f8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem.cc,v 1.23 1998/05/12 20:16:34 wessels Exp $
+ * $Id: mem.cc,v 1.24 1998/05/22 23:44:15 wessels Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -273,7 +273,7 @@ memInit(void)
     /* test that all entries are initialized */
     for (t = MEM_NONE + 1; t < MEM_MAX; t++) {
        if (MEM_DONTFREE == t)
-               continue;
+           continue;
        /*
         * If you hit this assertion, then you forgot to add a
         * memDataInit() line for type 't' above.
index fa7a3902d70bf06f2a75dcb81e77234320982e9d..10be327967d11363923ac99c3dc1b067343cc2cd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.214 1998/05/21 06:41:55 wessels Exp $
+ * $Id: neighbors.cc,v 1.215 1998/05/22 23:44:17 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -386,7 +386,7 @@ neighbors_open(int fd)
     memset(&name, '\0', sizeof(struct sockaddr_in));
     if (getsockname(fd, (struct sockaddr *) &name, &len) < 0)
        debug(15, 1) ("getsockname(%d,%p,%p) failed.\n", fd, &name, &len);
-    peerRefreshDNS((void *)1);
+    peerRefreshDNS((void *) 1);
     if (0 == echo_hdr.opcode) {
        echo_hdr.opcode = ICP_SECHO;
        echo_hdr.version = ICP_VERSION_CURRENT;
@@ -943,7 +943,7 @@ peerDNSConfigure(const ipcache_addrs * ia, void *data)
     if (p->type == PEER_MULTICAST)
        peerCountMcastPeersSchedule(p, 10);
     if (p->type != PEER_MULTICAST)
-        eventAddIsh("netdbExchangeStart", netdbExchangeStart, p, 30.0, 1);
+       eventAddIsh("netdbExchangeStart", netdbExchangeStart, p, 30.0, 1);
 }
 
 static void
@@ -952,7 +952,7 @@ peerRefreshDNS(void *data)
     peer *p = NULL;
     if (!data && 0 == stat5minClientRequests()) {
        /* no recent client traffic, wait a bit */
-        eventAddIsh("peerRefreshDNS", peerRefreshDNS, NULL, 180.0, 1);
+       eventAddIsh("peerRefreshDNS", peerRefreshDNS, NULL, 180.0, 1);
        return;
     }
     for (p = Config.peers; p; p = p->next)
index 5bae2d63af37f28b4bb4fb90ac57ab0d682c767f..66db2b2b5da52f515415c04fdc8836844f05edd2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.105 1998/05/21 03:48:19 wessels Exp $
+ * $Id: net_db.cc,v 1.106 1998/05/22 23:44:19 wessels Exp $
  *
  * DEBUG: section 37    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -1071,7 +1071,7 @@ netdbExchangeStart(void *data)
 }
 
 peer *
-netdbClosestParent(request_t *request)
+netdbClosestParent(request_t * request)
 {
 #if USE_ICMP
     peer *p = NULL;
@@ -1101,7 +1101,7 @@ netdbClosestParent(request_t *request)
            if (n->rtt < h->rtt)
                break;
        p = peerFindByName(h->peername);
-       if (NULL == p)  /* not found */
+       if (NULL == p)          /* not found */
            continue;
        if (!peerHTTPOkay(p, request))  /* not allowed */
            continue;
index 3a2bd4911e2f74b6791b1039c2c5141878bae7b9..e49e01143fd6332c7a1d3609341210d345fd1859 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pconn.cc,v 1.15 1998/05/22 23:07:39 wessels Exp $
+ * $Id: pconn.cc,v 1.16 1998/05/22 23:44:20 wessels Exp $
  *
  * DEBUG: section 48    Persistent Connections
  * AUTHOR: Duane Wessels
@@ -173,7 +173,7 @@ pconnPush(int fd, const char *host, u_short port)
     struct _pconn *p;
     LOCAL_ARRAY(char, key, SQUIDHOSTNAMELEN + 10);
     LOCAL_ARRAY(char, desc, FD_DESC_SZ);
-    if (fdNFree() < (RESERVED_FD<<2)) {
+    if (fdNFree() < (RESERVED_FD << 2)) {
        debug(48, 3) ("pconnPush: Not many unused FDs\n");
        comm_close(fd);
        return;
index c253f39067032b0999b740587d00c1f567edfcdd..61b42ac64af70d07366eb14e6d5969221ade5882 100644 (file)
@@ -308,7 +308,7 @@ extern void httpHeaderCalcMask(HttpHeaderMask * mask, const int *enums, int coun
 extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
 extern void strListAdd(String * str, const char *item, char del);
 extern int strListIsMember(const String * str, const char *item, char del);
-extern int strListIsSubstr(const String *list, const char *s, char del);
+extern int strListIsSubstr(const String * list, const char *s, char del);
 extern int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
 extern const char *getStringPrefix(const char *str, const char *end);
 extern int httpHeaderParseInt(const char *start, int *val);
index 51679b9cf30d91d0358a7f1ead1c7322c931cf85..939b32c59329dec32cb766ea4555d656b47e80be 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl.cc,v 1.78 1998/05/21 22:01:08 wessels Exp $
+ * $Id: ssl.cc,v 1.79 1998/05/22 23:44:24 wessels Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -419,10 +419,10 @@ sslProxyConnected(int fd, void *data)
     memBufPrintf(&mb, "CONNECT %s HTTP/1.0\r\n", sslState->url);
     httpBuildRequestHeader(sslState->request,
        sslState->request,
-       NULL,   /* StoreEntry */
+       NULL,                   /* StoreEntry */
        &hdr_out,
        sslState->client.fd,
-       0);     /* flags */
+       0);                     /* flags */
     packerToMemInit(&p, &mb);
     httpHeaderPackInto(&hdr_out, &p);
     httpHeaderClean(&hdr_out);
index 23217cac620162f58c3f184f26dd3479571ec48d..b5ce6a3d66d8477688de3e01181ddb97758b0e19 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.252 1998/05/22 23:42:58 wessels Exp $
+ * $Id: stat.cc,v 1.253 1998/05/22 23:44:26 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -1197,8 +1197,8 @@ snmpStatGet(int minutes)
 int
 stat5minClientRequests(void)
 {
-       assert(N_COUNT_HIST > 5);
-       return Counter.client_http.requests - CountHist[5].client_http.requests;
+    assert(N_COUNT_HIST > 5);
+    return Counter.client_http.requests - CountHist[5].client_http.requests;
 }
 
 
index 3a4215ae4604d712ebdf4ef75e329f70e907c86b..8230418da2826233389d59c4f3029f974cf835c9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.416 1998/05/21 22:23:59 wessels Exp $
+ * $Id: store.cc,v 1.417 1998/05/22 23:44:29 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -627,8 +627,8 @@ storeGetMemSpace(int size)
        prev = m->prev;
        e = m->data;
        if (storeEntryLocked(e)) {
-            dlinkDelete(m, &inmem_list);
-            dlinkAdd(e, m, &inmem_list);
+           dlinkDelete(m, &inmem_list);
+           dlinkAdd(e, m, &inmem_list);
            continue;
        }
        released++;
index 9b56cdd9895cd731bfb942b8bfc6b8d8f318cfa0..8f5203ba7b708e0e4f3f6599c370fcb6be5ba77f 100644 (file)
@@ -95,7 +95,7 @@ storeSwapInFileOpened(void *data, int fd, int errcode)
     if (fd < 0) {
        storeReleaseRequest(e);
     } else {
-        debug(20, 5) ("storeSwapInFileOpened: initialized '%s' for '%s'\n",
+       debug(20, 5) ("storeSwapInFileOpened: initialized '%s' for '%s'\n",
            ctrlp->path, storeUrl(e));
     }
     (ctrlp->callback) (fd, ctrlp->callback_data);
index a28e90f744d3b3eba2aeffc8ed249e7ac9d3f855..de56dfff81f5073d28deafccaa62f3ae7c06656f 100644 (file)
@@ -1,5 +1,6 @@
 
 
+
 struct _acl_ip_data {
     struct in_addr addr1;      /* if addr2 non-zero then its a range */
     struct in_addr addr2;
index 750b3eb692a4f65c1972061d5fb5dacbfe4a18fc..77278b215a2989e5805a432d16e2726feed4d37a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tunnel.cc,v 1.78 1998/05/21 22:01:08 wessels Exp $
+ * $Id: tunnel.cc,v 1.79 1998/05/22 23:44:24 wessels Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -419,10 +419,10 @@ sslProxyConnected(int fd, void *data)
     memBufPrintf(&mb, "CONNECT %s HTTP/1.0\r\n", sslState->url);
     httpBuildRequestHeader(sslState->request,
        sslState->request,
-       NULL,   /* StoreEntry */
+       NULL,                   /* StoreEntry */
        &hdr_out,
        sslState->client.fd,
-       0);     /* flags */
+       0);                     /* flags */
     packerToMemInit(&p, &mb);
     httpHeaderPackInto(&hdr_out, &p);
     httpHeaderClean(&hdr_out);
index 83c7c1f224faa8bdef4551fb556339097ebb111f..bacbeea7c8a8b4fc04f2019de588b113e87441c7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.93 1998/05/20 20:46:50 wessels Exp $
+ * $Id: url.cc,v 1.94 1998/05/22 23:44:34 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -353,7 +353,7 @@ urlCanonicalClean(const request_t * request)
     return buf;
 }
 
-#if OLD_CODE /* moved to HttpRequest.c */
+#if OLD_CODE                   /* moved to HttpRequest.c */
 request_t *
 requestLink(request_t * request)
 {
@@ -435,11 +435,11 @@ urlCheckRequest(const request_t * r)
 
 /*
  * Quick-n-dirty host extraction from a URL.  Steps:
- *     Look for a colon
- *     Skip any '/' after the colon
- *     Copy the next SQUID_MAXHOSTNAMELEN bytes to host[]
- *     Look for an ending '/' or ':' and terminate
- *     Look for login info preceeded by '@'
+ *      Look for a colon
+ *      Skip any '/' after the colon
+ *      Copy the next SQUID_MAXHOSTNAMELEN bytes to host[]
+ *      Look for an ending '/' or ':' and terminate
+ *      Look for login info preceeded by '@'
  */
 char *
 urlHostname(const char *url)
@@ -459,7 +459,7 @@ urlHostname(const char *url)
        *t = '\0';
     if ((t = strrchr(host, '@'))) {
        t++;
-        xmemmove(host, t, strlen(t)+1);
+       xmemmove(host, t, strlen(t) + 1);
     }
     return host;
 }