From: wessels <>
Date: Tue, 5 Dec 2000 16:15:57 +0000 (+0000)
Subject: indent -br -ce -i4 -ci4 -l80 -nlp -npcs -npsl -d0 -sc -di0 -psl
X-Git-Tag: SQUID_3_0_PRE1~1744
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bffee5afc6b4fd7d2946017ae5adeb241c5834b5;p=thirdparty%2Fsquid.git
indent -br -ce -i4 -ci4 -l80 -nlp -npcs -npsl -d0 -sc -di0 -psl
---
diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc
index a9e50d18b9..aa9e166f3b 100644
--- a/src/HttpMsg.cc
+++ b/src/HttpMsg.cc
@@ -1,6 +1,6 @@
/*
- * $Id: HttpMsg.cc,v 1.8 2000/11/13 12:25:11 adrian Exp $
+ * $Id: HttpMsg.cc,v 1.9 2000/12/05 09:15:57 wessels Exp $
*
* DEBUG: section 74 HTTP Message
* AUTHOR: Alex Rousskov
@@ -91,7 +91,7 @@ httpMsgIsolateHeaders(const char **parse_start, const char **blk_start, const ch
int
httpMsgIsPersistent(http_version_t http_ver, const HttpHeader * hdr)
{
- if ((http_ver.major>=1) && (http_ver.minor >= 1)) {
+ if ((http_ver.major >= 1) && (http_ver.minor >= 1)) {
/*
* for modern versions of HTTP: persistent unless there is
* a "Connection: close" header.
diff --git a/src/HttpReply.cc b/src/HttpReply.cc
index c91f31a747..1ff2aa22aa 100644
--- a/src/HttpReply.cc
+++ b/src/HttpReply.cc
@@ -1,6 +1,6 @@
/*
- * $Id: HttpReply.cc,v 1.43 2000/11/13 12:25:11 adrian Exp $
+ * $Id: HttpReply.cc,v 1.44 2000/12/05 09:15:57 wessels Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
@@ -261,7 +261,7 @@ httpRedirectReply(HttpReply * reply, http_status status, const char *loc)
HttpHeader *hdr;
http_version_t ver;
assert(reply);
- httpBuildVersion(&ver,1,0);
+ httpBuildVersion(&ver, 1, 0);
httpStatusLineSet(&reply->sline, ver, status, httpStatusString(status));
hdr = &reply->header;
httpHeaderPutStr(hdr, HDR_SERVER, full_appname_string);
diff --git a/src/HttpStatusLine.cc b/src/HttpStatusLine.cc
index 3b9101a970..dcac362a87 100644
--- a/src/HttpStatusLine.cc
+++ b/src/HttpStatusLine.cc
@@ -1,6 +1,6 @@
/*
- * $Id: HttpStatusLine.cc,v 1.20 2000/11/13 12:25:11 adrian Exp $
+ * $Id: HttpStatusLine.cc,v 1.21 2000/12/05 09:15:58 wessels Exp $
*
* DEBUG: section 57 HTTP Status-line
* AUTHOR: Alex Rousskov
@@ -43,15 +43,15 @@ void
httpStatusLineInit(HttpStatusLine * sline)
{
http_version_t version;
- httpBuildVersion(&version,0,0);
- httpStatusLineSet(sline, version , HTTP_STATUS_NONE, NULL);
+ httpBuildVersion(&version, 0, 0);
+ httpStatusLineSet(sline, version, HTTP_STATUS_NONE, NULL);
}
void
httpStatusLineClean(HttpStatusLine * sline)
{
http_version_t version;
- httpBuildVersion(&version,0,0);
+ httpBuildVersion(&version, 0, 0);
httpStatusLineSet(sline, version, HTTP_INTERNAL_SERVER_ERROR, NULL);
}
@@ -72,11 +72,11 @@ httpStatusLinePackInto(const HttpStatusLine * sline, Packer * p)
{
assert(sline && p);
debug(57, 9) ("packing sline %p using %p:\n", sline, p);
- debug(57, 9) (HttpStatusLineFormat, sline->version.major,
- sline->version.minor, sline->status,
+ debug(57, 9) (HttpStatusLineFormat, sline->version.major,
+ sline->version.minor, sline->status,
sline->reason ? sline->reason : httpStatusString(sline->status));
- packerPrintf(p, HttpStatusLineFormat, sline->version.major,
- sline->version.minor, sline->status, httpStatusLineReason(sline));
+ packerPrintf(p, HttpStatusLineFormat, sline->version.major,
+ sline->version.minor, sline->status, httpStatusLineReason(sline));
}
/* pack fields using Packer */
@@ -90,8 +90,8 @@ httpStatusLineParse(HttpStatusLine * sline, const char *start, const char *end)
start += 5;
if (!xisdigit(*start))
return 0;
- if (sscanf(start, "%d.%d", &sline->version.major, &sline->version.minor)!=2){
- debug(57, 7) ("httpStatusLineParse: Invalid HTTP identifier.\n");
+ if (sscanf(start, "%d.%d", &sline->version.major, &sline->version.minor) != 2) {
+ debug(57, 7) ("httpStatusLineParse: Invalid HTTP identifier.\n");
}
if (!(start = strchr(start, ' ')))
return 0;
diff --git a/src/cache_manager.cc b/src/cache_manager.cc
index 43caa145de..6ef4962779 100644
--- a/src/cache_manager.cc
+++ b/src/cache_manager.cc
@@ -1,6 +1,6 @@
/*
- * $Id: cache_manager.cc,v 1.23 2000/11/13 12:25:11 adrian Exp $
+ * $Id: cache_manager.cc,v 1.24 2000/12/05 09:15:58 wessels Exp $
*
* DEBUG: section 16 Cache Manager Objects
* AUTHOR: Duane Wessels
@@ -253,11 +253,11 @@ cachemgrStart(int fd, request_t * request, StoreEntry * entry)
if (a->flags.atomic)
storeBuffer(entry);
{
- http_version_t version;
+ http_version_t version;
HttpReply *rep = entry->mem_obj->reply;
/* prove there are no previous reply headers around */
assert(0 == rep->sline.status);
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(rep,
version,
HTTP_OK,
diff --git a/src/client_side.cc b/src/client_side.cc
index fb7cffbe68..e510c741ef 100644
--- a/src/client_side.cc
+++ b/src/client_side.cc
@@ -1,6 +1,6 @@
/*
- * $Id: client_side.cc,v 1.513 2000/11/15 02:32:53 wessels Exp $
+ * $Id: client_side.cc,v 1.514 2000/12/05 09:15:58 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
@@ -603,7 +603,7 @@ clientPurgeRequest(clientHttpRequest * http)
*/
http->entry = clientCreateStoreEntry(http, http->request->method, null_request_flags);
httpReplyReset(r = http->entry->mem_obj->reply);
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(r, version, status, NULL, NULL, 0, 0, -1);
httpReplySwapOut(r, http->entry);
storeComplete(http->entry);
@@ -1279,7 +1279,7 @@ clientBuildReply(clientHttpRequest * http, const char *buf, size_t size)
size_t k = headersEnd(buf, size);
if (k && httpReplyParse(rep, buf, k)) {
/* enforce 1.0 reply version */
- httpBuildVersion(&rep->sline.version,1,0);
+ httpBuildVersion(&rep->sline.version, 1, 0);
/* do header conversions */
clientBuildReplyHeader(http, rep);
/* if we do ranges, change status to "Partial Content" */
@@ -2094,7 +2094,7 @@ clientProcessRequest(clientHttpRequest * http)
storeReleaseRequest(http->entry);
storeBuffer(http->entry);
rep = httpReplyCreate();
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(rep, version, HTTP_OK, NULL, "text/plain",
httpRequestPrefixLen(r), 0, squid_curtime);
httpReplySwapOut(rep, http->entry);
@@ -2308,16 +2308,16 @@ parseHttpRequest(ConnStateData * conn, method_t * method_p, int *status,
if (token == NULL) {
debug(33, 3) ("parseHttpRequest: Missing HTTP identifier\n");
#if RELAXED_HTTP_PARSER
- httpBuildVersion(&http_ver,0,9); /* wild guess */
+ httpBuildVersion(&http_ver, 0, 9); /* wild guess */
#else
return parseHttpRequestAbort(conn, "error:missing-http-ident");
#endif
} else {
- if (sscanf(token+5, "%d.%d", &http_ver.major, &http_ver.minor)!=2){
- debug(33, 3) ("parseHttpRequest: Invalid HTTP identifier.\n");
- return parseHttpRequestAbort(conn, "error: invalid HTTP-ident");
- }
- debug(33, 6) ("parseHttpRequest: Client HTTP version %d.%d.\n",http_ver.major, http_ver.minor);
+ if (sscanf(token + 5, "%d.%d", &http_ver.major, &http_ver.minor) != 2) {
+ debug(33, 3) ("parseHttpRequest: Invalid HTTP identifier.\n");
+ return parseHttpRequestAbort(conn, "error: invalid HTTP-ident");
+ }
+ debug(33, 6) ("parseHttpRequest: Client HTTP version %d.%d.\n", http_ver.major, http_ver.minor);
}
/*
diff --git a/src/errorpage.cc b/src/errorpage.cc
index f00564af9d..3b04c5ddfd 100644
--- a/src/errorpage.cc
+++ b/src/errorpage.cc
@@ -1,6 +1,6 @@
/*
- * $Id: errorpage.cc,v 1.156 2000/11/13 12:25:11 adrian Exp $
+ * $Id: errorpage.cc,v 1.157 2000/12/05 09:15:59 wessels Exp $
*
* DEBUG: section 4 Error Generation
* AUTHOR: Duane Wessels
@@ -576,7 +576,7 @@ errorBuildReply(ErrorState * err)
MemBuf content = errorBuildContent(err);
http_version_t version;
/* no LMT for error pages; error pages expire immediately */
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(rep, version, err->http_status, NULL, "text/html", content.size, 0, squid_curtime);
/*
* include some information for downstream caches. Implicit
diff --git a/src/gopher.cc b/src/gopher.cc
index d20b144bff..6ea450083e 100644
--- a/src/gopher.cc
+++ b/src/gopher.cc
@@ -1,6 +1,6 @@
/*
- * $Id: gopher.cc,v 1.156 2000/11/04 23:04:10 hno Exp $
+ * $Id: gopher.cc,v 1.157 2000/12/05 09:15:59 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
@@ -473,7 +473,7 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len)
if ((gtype == GOPHER_TELNET) || (gtype == GOPHER_3270)) {
if (strlen(escaped_selector) != 0)
snprintf(tmpbuf, TEMP_BUF_SIZE, "
%s\n",
- icon_url, escaped_selector, rfc1738_escape_part(host),
+ icon_url, escaped_selector, rfc1738_escape_part(host),
*port ? ":" : "", port, html_quote(name));
else
snprintf(tmpbuf, TEMP_BUF_SIZE, "
%s\n",
diff --git a/src/internal.cc b/src/internal.cc
index a6e23f5d5f..3be4850360 100644
--- a/src/internal.cc
+++ b/src/internal.cc
@@ -1,6 +1,6 @@
/*
- * $Id: internal.cc,v 1.21 2000/11/15 13:22:27 adrian Exp $
+ * $Id: internal.cc,v 1.22 2000/12/05 09:15:59 wessels Exp $
*
* DEBUG: section 76 Internal Squid Object handling
* AUTHOR: Duane, Alex, Henrik
@@ -55,7 +55,7 @@ internalStart(request_t * request, StoreEntry * entry)
#else
const char *msgbuf = "This cache does not suport Cache Digests.\n";
#endif
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(entry->mem_obj->reply,
version,
HTTP_NOT_FOUND,
@@ -105,8 +105,8 @@ internalRemoteUri(const char *host, u_short port, const char *dir, const char *n
* domains
*/
if (Config.appendDomain && !strchr(lc_host, '.'))
- strncat(lc_host, Config.appendDomain, SQUIDHOSTNAMELEN -
- strlen(lc_host) - 1);
+ strncat(lc_host, Config.appendDomain, SQUIDHOSTNAMELEN -
+ strlen(lc_host) - 1);
/* build uri in mb */
memBufReset(&mb);
memBufPrintf(&mb, "http://%s", lc_host);
diff --git a/src/main.cc b/src/main.cc
index c2807ab215..3b8519450d 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -1,6 +1,6 @@
/*
- * $Id: main.cc,v 1.322 2000/11/10 09:04:51 adrian Exp $
+ * $Id: main.cc,v 1.323 2000/12/05 09:15:59 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
@@ -102,7 +102,7 @@ usage(void)
" -N No daemon mode.\n"
" -R Do not set REUSEADDR on port.\n"
" -S force Force double-check swap during rebuild.\n"
- " -S reportonly Force double-check but do not attempt repair.\n"
+ " -S reportonly Force double-check but do not attempt repair.\n"
" -V Virtual host httpd-accelerator.\n"
" -X Force full debugging.\n"
" -Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.\n",
@@ -134,14 +134,14 @@ mainParseOptions(int argc, char *argv[])
opt_reuseaddr = 0;
break;
case 'S':
- if ((int) strlen(optarg) < 1)
- usage();
- else if (!strncmp(optarg, "force", strlen(optarg)))
- opt_store_doublecheck = DBLCHECK_FORCE; /* trigger a doublecheck on startup */
- else if (!strncmp(optarg, "reportonly", strlen(optarg)))
- opt_store_doublecheck = DBLCHECK_REPORTONLY; /* trigger a doublecheck that doesn't repair */
- else
- usage();
+ if ((int) strlen(optarg) < 1)
+ usage();
+ else if (!strncmp(optarg, "force", strlen(optarg)))
+ opt_store_doublecheck = DBLCHECK_FORCE; /* trigger a doublecheck on startup */
+ else if (!strncmp(optarg, "reportonly", strlen(optarg)))
+ opt_store_doublecheck = DBLCHECK_REPORTONLY; /* trigger a doublecheck that doesn't repair */
+ else
+ usage();
break;
case 'V':
vhost_mode = 1;
diff --git a/src/mime.cc b/src/mime.cc
index 94ef8e8994..c6dd4f315b 100644
--- a/src/mime.cc
+++ b/src/mime.cc
@@ -1,6 +1,6 @@
/*
- * $Id: mime.cc,v 1.95 2000/11/13 12:25:12 adrian Exp $
+ * $Id: mime.cc,v 1.96 2000/12/05 09:15:59 wessels Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
@@ -422,7 +422,7 @@ mimeLoadIconFile(const char *icon)
storeBuffer(e);
e->mem_obj->request = requestLink(urlParse(METHOD_GET, url));
httpReplyReset(reply = e->mem_obj->reply);
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(reply, version, HTTP_OK, NULL,
type, (int) sb.st_size, sb.st_mtime, -1);
reply->cache_control = httpHdrCcCreate();
diff --git a/src/protos.h b/src/protos.h
index 35e939a15f..5a03757900 100644
--- a/src/protos.h
+++ b/src/protos.h
@@ -1,6 +1,6 @@
/*
- * $Id: protos.h,v 1.387 2000/11/13 12:25:12 adrian Exp $
+ * $Id: protos.h,v 1.388 2000/12/05 09:15:59 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
@@ -284,7 +284,7 @@ extern void httpAnonInitModule(void);
extern int httpAnonHdrAllowed(http_hdr_type hdr_id);
extern int httpAnonHdrDenied(http_hdr_type hdr_id);
extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, http_state_flags);
-extern void httpBuildVersion(http_version_t *version,unsigned int major,unsigned int minor);
+extern void httpBuildVersion(http_version_t * version, unsigned int major, unsigned int minor);
/* ETag */
extern int etagParseInit(ETag * etag, const char *str);
diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc
index dda96d1e71..37f7f9666f 100644
--- a/src/store_rebuild.cc
+++ b/src/store_rebuild.cc
@@ -1,6 +1,6 @@
/*
- * $Id: store_rebuild.cc,v 1.72 2000/11/10 09:04:51 adrian Exp $
+ * $Id: store_rebuild.cc,v 1.73 2000/12/05 09:16:00 wessels Exp $
*
* DEBUG: section 20 Store Rebuild Routines
* AUTHOR: Duane Wessels
@@ -74,7 +74,7 @@ storeCleanup(void *datanotused)
store_dirs_rebuilding--;
assert(0 == store_dirs_rebuilding);
if (opt_store_doublecheck != DBLCHECK_NONE)
- /* we want to assert here because the storeFScode should auto-clean the entries */
+ /* we want to assert here because the storeFScode should auto-clean the entries */
assert(store_errors == 0);
if (store_digest)
storeDigestNoteStoreReady();
@@ -93,10 +93,10 @@ storeCleanup(void *datanotused)
if (e->swap_filen < 0)
continue;
if (opt_store_doublecheck != DBLCHECK_NONE)
- if (storeCleanupDoubleCheck(e)){
- /* this should never happen as the storeFScode should auto-clean */
+ if (storeCleanupDoubleCheck(e)) {
+ /* this should never happen as the storeFScode should auto-clean */
store_errors++;
- }
+ }
EBIT_SET(e->flags, ENTRY_VALIDATED);
/*
* Only set the file bit if we know its a valid entry
@@ -146,8 +146,8 @@ storeRebuildComplete(struct _store_rebuild_data *dc)
debug(20, 1) (" %7d Swapfile clashes avoided.\n", counts.clashcount);
debug(20, 1) (" %7d Missing files ignored.\n", counts.missingcount);
debug(20, 1) (" %7d Incorrect length swapfiles %s.\n",
- counts.filesizemismatchcount,
- (opt_store_doublecheck == DBLCHECK_REPORTONLY) ? "ignored" : "unlinked");
+ counts.filesizemismatchcount,
+ (opt_store_doublecheck == DBLCHECK_REPORTONLY) ? "ignored" : "unlinked");
debug(20, 1) (" Took %3.1f seconds (%6.1f objects/sec).\n", dt,
(double) counts.objcount / (dt > 0.0 ? dt : 1.0));
debug(20, 1) ("Beginning Validation Procedure\n");
diff --git a/src/structs.h b/src/structs.h
index de87fce53a..48285050d0 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1,6 +1,6 @@
/*
- * $Id: structs.h,v 1.362 2000/12/05 06:24:00 wessels Exp $
+ * $Id: structs.h,v 1.363 2000/12/05 09:16:00 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
@@ -846,7 +846,7 @@ struct _AccessLogEntry {
method_t method;
int code;
const char *content_type;
- http_version_t version;
+ http_version_t version;
} http;
struct {
icp_opcode opcode;
@@ -1850,7 +1850,7 @@ struct _store_rebuild_data {
int invalid; /* # bad lines */
int badflags; /* # bad e->flags */
int missingcount; /* # swapfiles not on disk */
- int filesizemismatchcount; /* # swapfiles with a wrong size */
+ int filesizemismatchcount; /* # swapfiles with a wrong size */
int bad_log_op;
int zero_object_sz;
};
diff --git a/src/tools.cc b/src/tools.cc
index 9675efd5f7..7a916a7724 100644
--- a/src/tools.cc
+++ b/src/tools.cc
@@ -1,6 +1,6 @@
/*
- * $Id: tools.cc,v 1.198 2000/11/15 12:53:50 adrian Exp $
+ * $Id: tools.cc,v 1.199 2000/12/05 09:16:01 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
@@ -449,11 +449,11 @@ getMyHostname(void)
inet_ntoa(Config.Sockaddr.http->s.sin_addr),
host);
present = 1;
- if( strchr( host, '.' ) )
- return host;
+ if (strchr(host, '.'))
+ return host;
}
- debug(50, 1) ("WARNING: failed to resolve %s to a fully qualified hostname\n",
+ debug(50, 1) ("WARNING: failed to resolve %s to a fully qualified hostname\n",
inet_ntoa(Config.Sockaddr.http->s.sin_addr));
}
/*
@@ -470,8 +470,8 @@ getMyHostname(void)
/* use the official name from DNS lookup */
xstrncpy(host, h->h_name, SQUIDHOSTNAMELEN);
present = 1;
- if( strchr( host, '.' ) )
- return host;
+ if (strchr(host, '.'))
+ return host;
}
fatal("Could not determine fully qualified hostname. Please set 'visible_hostname'\n");
return NULL; /* keep compiler happy */
diff --git a/src/urn.cc b/src/urn.cc
index 2be95d0cf9..5168fbc80e 100644
--- a/src/urn.cc
+++ b/src/urn.cc
@@ -1,6 +1,6 @@
/*
- * $Id: urn.cc,v 1.61 2000/11/13 12:25:13 adrian Exp $
+ * $Id: urn.cc,v 1.62 2000/12/05 09:16:02 wessels Exp $
*
* DEBUG: section 52 URN Parsing
* AUTHOR: Kostas Anagnostakis
@@ -273,7 +273,7 @@ urnHandleReply(void *data, char *buf, ssize_t size)
full_appname_string, getMyHostname());
rep = e->mem_obj->reply;
httpReplyReset(rep);
- httpBuildVersion(&version,1,0);
+ httpBuildVersion(&version, 1, 0);
httpReplySetHeaders(rep, version, HTTP_MOVED_TEMPORARILY, NULL,
"text/html", mb.size, 0, squid_curtime);
if (urnState->flags.force_menu) {