From: wessels <> Date: Sat, 23 May 1998 05:43:48 +0000 (+0000) Subject: gindent X-Git-Tag: SQUID_3_0_PRE1~3268 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5999b77616cd53b536a8d2d8b824b772f3947046;p=thirdparty%2Fsquid.git gindent --- diff --git a/src/CacheDigest.cc b/src/CacheDigest.cc index 03611c5b65..bc0a69a4d4 100644 --- a/src/CacheDigest.cc +++ b/src/CacheDigest.cc @@ -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]); } - diff --git a/src/HttpBody.cc b/src/HttpBody.cc index 13fe2ec734..d006a70e69 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -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 diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 1bf513abf1..afc93f5179 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -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++; } diff --git a/src/HttpHdrRange.cc b/src/HttpHdrRange.cc index 09b9c7c451..e6595d2c61 100644 --- a/src/HttpHdrRange.cc +++ b/src/HttpHdrRange.cc @@ -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); diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 83d21e47e7..e4ab1d3884 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -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); } diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 727f11962d..65f5e5fef5 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -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); diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 244e6cae61..2d5b3833a9 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -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"); diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index bf4d8cc499..ced595ab86 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -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; } - diff --git a/src/HttpStatusLine.cc b/src/HttpStatusLine.cc index 6abb0e77a1..ca2c38be83 100644 --- a/src/HttpStatusLine.cc +++ b/src/HttpStatusLine.cc @@ -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 diff --git a/src/MemBuf.cc b/src/MemBuf.cc index 0efcd7876d..f8f752cd15 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -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 */ diff --git a/src/client.cc b/src/client.cc index 4b3bc22353..2fb08dc042 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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 diff --git a/src/client_side.cc b/src/client_side.cc index 3a014c8421..a397bc8a90 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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; } } } diff --git a/src/disk.cc b/src/disk.cc index 9195530f94..b27c12a457 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -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, diff --git a/src/filemap.cc b/src/filemap.cc index 35e8b967ed..c4c0291d2b 100644 --- a/src/filemap.cc +++ b/src/filemap.cc @@ -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."); } diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 8b362cab0e..e7ee81e903 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -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 diff --git a/src/ftp.cc b/src/ftp.cc index e7d2920363..1d0063c4d7 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -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; diff --git a/src/http.cc b/src/http.cc index 6553ebc460..0fbf51a907 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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) { diff --git a/src/internal.cc b/src/internal.cc index 9031662cc4..ebd6ef971e 100644 --- a/src/internal.cc +++ b/src/internal.cc @@ -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)); } /* diff --git a/src/mem.cc b/src/mem.cc index 62ee03c28c..3d3f019290 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -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. diff --git a/src/neighbors.cc b/src/neighbors.cc index fa7a3902d7..10be327967 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -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) diff --git a/src/net_db.cc b/src/net_db.cc index 5bae2d63af..66db2b2b5d 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -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; diff --git a/src/pconn.cc b/src/pconn.cc index 3a2bd4911e..e49e01143f 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -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; diff --git a/src/protos.h b/src/protos.h index c253f39067..61b42ac64a 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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); diff --git a/src/ssl.cc b/src/ssl.cc index 51679b9cf3..939b32c593 100644 --- a/src/ssl.cc +++ b/src/ssl.cc @@ -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); diff --git a/src/stat.cc b/src/stat.cc index 23217cac62..b5ce6a3d66 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -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; } diff --git a/src/store.cc b/src/store.cc index 3a4215ae46..8230418da2 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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++; diff --git a/src/store_swapin.cc b/src/store_swapin.cc index 9b56cdd989..8f5203ba7b 100644 --- a/src/store_swapin.cc +++ b/src/store_swapin.cc @@ -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); diff --git a/src/structs.h b/src/structs.h index a28e90f744..de56dfff81 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,5 +1,6 @@ + struct _acl_ip_data { struct in_addr addr1; /* if addr2 non-zero then its a range */ struct in_addr addr2; diff --git a/src/tunnel.cc b/src/tunnel.cc index 750b3eb692..77278b215a 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -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); diff --git a/src/url.cc b/src/url.cc index 83c7c1f224..bacbeea7c8 100644 --- a/src/url.cc +++ b/src/url.cc @@ -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; }