From 56878878db2fd0769d2a413799156fdb8dcb3238 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Fri, 17 Oct 1997 06:00:27 +0000 Subject: [PATCH] gindent --- src/acl.cc | 4 +- src/cache_cf.cc | 4 +- src/cachemgr.cc | 8 +-- src/client.cc | 3 +- src/client_side.cc | 4 +- src/disk.cc | 20 +++--- src/dns.cc | 4 +- src/dnsserver.cc | 4 +- src/errorpage.cc | 16 ++--- src/ftp.cc | 34 +++++----- src/gopher.cc | 151 +++++++++++++++++++++---------------------- src/http.cc | 22 +++---- src/icmp.cc | 6 +- src/ident.cc | 4 +- src/ipcache.cc | 4 +- src/mime.cc | 12 ++-- src/redirect.cc | 4 +- src/send-announce.cc | 8 +-- src/stat.cc | 6 +- src/store.cc | 6 +- src/store_dir.cc | 22 +++---- src/tools.cc | 40 ++++++------ src/url.cc | 10 +-- src/useragent.cc | 6 +- src/wais.cc | 120 +++++++++++++++++----------------- 25 files changed, 261 insertions(+), 261 deletions(-) diff --git a/src/acl.cc b/src/acl.cc index 74612d7959..0e6bc43a0f 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,5 +1,5 @@ /* - * $Id: acl.cc,v 1.108 1997/08/26 17:30:34 wessels Exp $ + * $Id: acl.cc,v 1.109 1997/10/17 00:00:27 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1652,7 +1652,7 @@ aclReadProxyAuth(struct _acl_proxy_auth *p) p->hash = hash_create(urlcmp, 7921, hash_string); if (p->hash == NULL) { debug(28, 0) ("aclReadProxyAuth: can't create " - "hash table, turning auth off.\n"); + "hash table, turning auth off.\n"); return 0; } } diff --git a/src/cache_cf.cc b/src/cache_cf.cc index d3690fa505..5729ff1004 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.224 1997/10/13 22:09:03 kostas Exp $ + * $Id: cache_cf.cc,v 1.225 1997/10/17 00:00:29 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -70,7 +70,7 @@ static void free_all _PARAMS((void)); static void self_destruct(void) { - snprintf(fatal_str,BUFSIZ, "Bungled %s line %d: %s", + snprintf(fatal_str, BUFSIZ, "Bungled %s line %d: %s", cfg_filename, config_lineno, config_input_line); fatal(fatal_str); } diff --git a/src/cachemgr.cc b/src/cachemgr.cc index f112b6b5a8..0a286d0dfa 100644 --- a/src/cachemgr.cc +++ b/src/cachemgr.cc @@ -1,6 +1,6 @@ /* - * $Id: cachemgr.cc,v 1.61 1997/10/13 22:09:04 kostas Exp $ + * $Id: cachemgr.cc,v 1.62 1997/10/17 00:00:30 wessels Exp $ * * DEBUG: section 0 CGI Cache Manager * AUTHOR: Harvest Derived @@ -520,7 +520,7 @@ describeTimeSince(time_t then) snprintf(buf, 128, "%dM", (int) (delta / ONE_MONTH)); else snprintf(buf, 128, "%dY", (int) (delta / ONE_YEAR)); - snprintf(buf2,128, fmt, buf); + snprintf(buf2, 128, fmt, buf); return buf2; } @@ -657,12 +657,12 @@ main(int argc, char *argv[]) /* convert hostname:portnum to host=hostname&port=portnum */ if (*s && !strchr(s, '=') && !strchr(s, '&')) { char *p; - int len_buff=strlen(s) + sizeof "host=&port="; + int len_buff = strlen(s) + sizeof "host=&port="; buffer = xmalloc(len_buff); if ((p = strchr(s, ':'))) if (p != s) { *p = '\0'; - snprintf(buffer, len_buff,"host=%s&port=%s", s, p + 1); + snprintf(buffer, len_buff, "host=%s&port=%s", s, p + 1); } else { snprintf(buffer, len_buff, "port=%s", p + 1); } else diff --git a/src/client.cc b/src/client.cc index 9dd0573002..ecab1ba050 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,7 +1,8 @@ + /* - * $Id: client.cc,v 1.30 1997/10/13 22:09:05 kostas Exp $ + * $Id: client.cc,v 1.31 1997/10/17 00:00:31 wessels Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived diff --git a/src/client_side.cc b/src/client_side.cc index c1b4a5cfb1..0653a03538 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.126 1997/10/13 22:09:05 kostas Exp $ + * $Id: client_side.cc,v 1.127 1997/10/17 00:00:32 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -333,7 +333,7 @@ clientConstructTraceEcho(clientHttpRequest * http) size_t len; memset(buf, '\0', 8192); snprintf(buf, 8192, "HTTP/1.0 200 OK\r\n"); - snprintf(line, 256, "Date: %s\r\n", mkrfc1123(squid_curtime)); + snprintf(line, 256, "Date: %s\r\n", mkrfc1123(squid_curtime)); strcat(buf, line); snprintf(line, 256, "Server: Squid/%s\r\n", SQUID_VERSION); strcat(buf, line); diff --git a/src/disk.cc b/src/disk.cc index 23e955f079..f8f3264e7d 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -1,5 +1,5 @@ /* - * $Id: disk.cc,v 1.78 1997/10/16 23:59:53 wessels Exp $ + * $Id: disk.cc,v 1.79 1997/10/17 00:00:33 wessels Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -316,15 +316,15 @@ diskHandleWriteComplete(void *data, int len, int errcode) } if (q != NULL) { /* q might become NULL from write failure above */ - q->cur_offset += len; - assert(q->cur_offset <= q->len); - if (q->cur_offset == q->len) { - /* complete write */ - fdd->write_q = q->next; - if (q->free) - (q->free) (q->buf); - safe_free(q); - } + q->cur_offset += len; + assert(q->cur_offset <= q->len); + if (q->cur_offset == q->len) { + /* complete write */ + fdd->write_q = q->next; + if (q->free) + (q->free) (q->buf); + safe_free(q); + } } if (fdd->write_q == NULL) { /* no more data */ diff --git a/src/dns.cc b/src/dns.cc index f40452f96d..1909c47a73 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,6 +1,6 @@ /* - * $Id: dns.cc,v 1.41 1997/10/13 22:09:06 kostas Exp $ + * $Id: dns.cc,v 1.42 1997/10/17 00:00:33 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -276,7 +276,7 @@ dnsOpenServers(void) s++; else s = prg; - snprintf(fd_note_buf,FD_DESC_SZ, "%s #%d", s, dns_child_table[k]->id); + snprintf(fd_note_buf, FD_DESC_SZ, "%s #%d", s, dns_child_table[k]->id); fd_note(dns_child_table[k]->inpipe, fd_note_buf); commSetNonBlocking(dns_child_table[k]->inpipe); debug(34, 3) ("dnsOpenServers: 'dns_server' %d started\n", k); diff --git a/src/dnsserver.cc b/src/dnsserver.cc index 06e4dbfd15..fafc7466aa 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -1,6 +1,6 @@ /* - * $Id: dnsserver.cc,v 1.36 1997/10/16 23:59:53 wessels Exp $ + * $Id: dnsserver.cc,v 1.37 1997/10/17 00:00:34 wessels Exp $ * * DEBUG: section 0 DNS Resolver * AUTHOR: Harvest Derived @@ -365,7 +365,7 @@ main(int argc, char *argv[]) msg[0] = '\0'; if (!result) { if (h_errno == TRY_AGAIN) { - snprintf(msg, 1024, "Name Server for domain '%s' is unavailable.\n", + snprintf(msg, 1024, "Name Server for domain '%s' is unavailable.\n", request); } else { snprintf(msg, 1024, "DNS Domain '%s' is invalid: %s.\n", diff --git a/src/errorpage.cc b/src/errorpage.cc index 9d2f85e75c..2fa0660ce7 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.74 1997/10/16 23:59:54 wessels Exp $ + * $Id: errorpage.cc,v 1.75 1997/10/17 00:00:35 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -129,30 +129,30 @@ errorConvert(char token, ErrorState * err) break; case 'e': snprintf(buf, CVT_BUF_SZ, "%d", err->errno); - p=buf; + p = buf; break; case 'E': snprintf(buf, CVT_BUF_SZ, "(%d) %s", err->errno, strerror(err->errno)); break; case 'w': - snprintf(buf, CVT_BUF_SZ, "%s",Config.adminEmail); + snprintf(buf, CVT_BUF_SZ, "%s", Config.adminEmail); break; case 'h': snprintf(buf, CVT_BUF_SZ, "%s", getMyHostname()); break; /* - * e - errno x - * E - strerror() x + * e - errno x + * E - strerror() x * t - local time * T - UTC * c - Squid error code * I - server IP address * i - client IP address * L - HREF link for more info/contact - * w - cachemgr email address x - * h - cache hostname x + * w - cachemgr email address x + * h - cache hostname x * d - seconds elapsed since request received - * p - URL port # x + * p - URL port # x */ default: p = "%UNKNOWN%"; diff --git a/src/ftp.cc b/src/ftp.cc index 69457b2dfb..888fdebc29 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.138 1997/10/16 23:59:55 wessels Exp $ + * $Id: ftp.cc,v 1.139 1997/10/17 00:00:36 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -476,7 +476,7 @@ ftpHtmlifyListEntry(char *line, int flags) "http://internal.squid/icons/", ICON_DIRUP, "[DIR]"); - snprintf(link, 2048, "%s", "../", "Parent Directory"); + snprintf(link, 2048, "%s", "../", "Parent Directory"); snprintf(html, 8192, "%s %s\n", icon, link); return html; } @@ -509,7 +509,7 @@ ftpHtmlifyListEntry(char *line, int flags) "http://internal.squid/icons/", ICON_MENU, "[DIR]"); - snprintf(link, 2048, "%s%s", + snprintf(link, 2048, "%s%s", ename, parts->showname, dots_fill(strlen(parts->showname))); @@ -519,7 +519,7 @@ ftpHtmlifyListEntry(char *line, int flags) parts->date); break; case 'l': - snprintf(icon, 2048, "\"%-6s\"", + snprintf(icon, 2048, "\"%-6s\"", "http://internal.squid/icons/", ICON_LINK, "[LINK]"); @@ -534,7 +534,7 @@ ftpHtmlifyListEntry(char *line, int flags) break; case '-': default: - snprintf(icon, 2048, "\"%-6s\"", + snprintf(icon, 2048, "\"%-6s\"", "http://internal.squid/icons/", mimeGetIcon(parts->name), "[FILE]"); @@ -828,7 +828,7 @@ ftpBuildTitleUrl(FtpStateData * ftpState) } strcat(t, request->host); if (request->port != urlDefaultPort(PROTO_FTP)) - snprintf(&t[strlen(t)], len-strlen(t), ":%d", request->port); + snprintf(&t[strlen(t)], len - strlen(t), ":%d", request->port); strcat(t, "/"); if (!EBIT_TEST(ftpState->flags, FTP_ROOT_DIR)) strcat(t, request->urlpath); @@ -856,9 +856,9 @@ ftpStart(request_t * request, StoreEntry * entry) if (!ftpCheckAuth(ftpState, request->headers)) { /* This request is not fully authenticated */ if (request->port == 21) { - snprintf(realm,8192, "ftp %s", ftpState->user); + snprintf(realm, 8192, "ftp %s", ftpState->user); } else { - snprintf(realm,8192, "ftp %s port %d", + snprintf(realm, 8192, "ftp %s port %d", ftpState->user, request->port); } response = ftpAuthRequired(request, realm); @@ -1118,11 +1118,11 @@ ftpReadWelcome(FtpStateData * ftpState) if (strstr(ftpState->ctrl.message->key, "NetWare")) EBIT_SET(ftpState->flags, FTP_SKIP_WHITESPACE); if (ftpState->proxy_host != NULL) - snprintf(cbuf,1024, "USER %s@%s\r\n", + snprintf(cbuf, 1024, "USER %s@%s\r\n", ftpState->user, ftpState->request->host); else - snprintf(cbuf,1024, "USER %s\r\n", ftpState->user); + snprintf(cbuf, 1024, "USER %s\r\n", ftpState->user); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_USER; } else { @@ -1138,7 +1138,7 @@ ftpReadUser(FtpStateData * ftpState) if (code == 230) { ftpReadPass(ftpState); } else if (code == 331) { - snprintf(cbuf,1024, "PASS %s\r\n", ftpState->password); + snprintf(cbuf, 1024, "PASS %s\r\n", ftpState->password); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_PASS; } else { @@ -1158,7 +1158,7 @@ ftpReadPass(FtpStateData * ftpState) t = strrchr(ftpState->request->urlpath, '/'); filename = t ? t + 1 : ftpState->request->urlpath; mode = mimeGetTransferMode(filename); - snprintf(cbuf,1024, "TYPE %c\r\n", mode); + snprintf(cbuf, 1024, "TYPE %c\r\n", mode); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_TYPE; } else { @@ -1342,7 +1342,7 @@ ftpReadPasv(FtpStateData * ftpState) ftpSendPort(ftpState); return; } - snprintf(junk,1024, "%d.%d.%d.%d", h1, h2, h3, h4); + snprintf(junk, 1024, "%d.%d.%d.%d", h1, h2, h3, h4); if (!safe_inet_addr(junk, NULL)) { debug(9, 1) ("unsafe address (%s)\n", junk); ftpSendPort(ftpState); @@ -1400,12 +1400,12 @@ ftpRestOrList(FtpStateData * ftpState) ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_LIST; } else if (ftpState->restart_offset > 0) { - snprintf(cbuf,1024, "REST\r\n"); + snprintf(cbuf, 1024, "REST\r\n"); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_REST; } else { assert(ftpState->filepath != NULL); - snprintf(cbuf,1024, "RETR %s\r\n", ftpState->filepath); + snprintf(cbuf, 1024, "RETR %s\r\n", ftpState->filepath); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_RETR; } @@ -1419,7 +1419,7 @@ ftpReadRest(FtpStateData * ftpState) assert(ftpState->restart_offset > 0); if (code == 350) { assert(ftpState->filepath != NULL); - snprintf(cbuf,1024, "RETR %s\r\n", ftpState->filepath); + snprintf(cbuf, 1024, "RETR %s\r\n", ftpState->filepath); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_RETR; } else if (code > 0) { @@ -1495,7 +1495,7 @@ ftpDataTransferDone(FtpStateData * ftpState) ftpState->data.fd = -1; } assert(ftpState->ctrl.fd > -1); - snprintf(cbuf,1024, "QUIT\r\n"); + snprintf(cbuf, 1024, "QUIT\r\n"); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_QUIT; } diff --git a/src/gopher.cc b/src/gopher.cc index 2f1f53ab60..886e912388 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,6 +1,6 @@ /* - * $Id: gopher.cc,v 1.96 1997/10/16 23:59:56 wessels Exp $ + * $Id: gopher.cc,v 1.97 1997/10/17 00:00:37 wessels Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -207,8 +207,8 @@ gopher_mime_content(char *buf, const char *name, const char *def_ctype) char *ctype = mimeGetContentType(name); char *cenc = mimeGetContentEncoding(name); if (cenc) - snprintf(buf + strlen(buf), MAX_MIME-strlen(buf), "Content-Encoding: %s\r\n", cenc); - snprintf(buf + strlen(buf), MAX_MIME-strlen(buf), "Content-Type: %s\r\n", + snprintf(buf + strlen(buf), MAX_MIME - strlen(buf), "Content-Encoding: %s\r\n", cenc); + snprintf(buf + strlen(buf), MAX_MIME - strlen(buf), "Content-Type: %s\r\n", ctype ? ctype : def_ctype); } @@ -332,7 +332,7 @@ gopherEndHTML(GopherStateData * gopherState) if (!gopherState->data_in) { snprintf(tmpbuf, TEMP_BUF_SIZE, - "Server Return Nothing.\n" + "Server Return Nothing.\n" "

Server Return Nothing.

\n"); storeAppend(gopherState->entry, tmpbuf, strlen(tmpbuf)); return; @@ -367,8 +367,8 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) entry = gopherState->entry; if (gopherState->conversion == HTML_INDEX_PAGE) { - snprintf(outbuf, TEMP_BUF_SIZE << 4, - "Gopher Index %s\n" + snprintf(outbuf, TEMP_BUF_SIZE << 4, + "Gopher Index %s\n" "

%s
Gopher Search

\n" "

This is a searchable Gopher index. Use the search\n" "function of your browser to enter search terms.\n" @@ -381,8 +381,8 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) return; } if (gopherState->conversion == HTML_CSO_PAGE) { - snprintf(outbuf, TEMP_BUF_SIZE << 4, - "CSO Search of %s\n" + snprintf(outbuf, TEMP_BUF_SIZE << 4, + "CSO Search of %s\n" "

%s
CSO Search

\n" "

A CSO database usually contains a phonebook or\n" "directory. Use the search function of your browser to enter\n" @@ -555,7 +555,7 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) icon_type, host, name); } else { - snprintf(tmpbuf, TEMP_BUF_SIZE, " %s\n", + snprintf(tmpbuf, TEMP_BUF_SIZE, " %s\n", icon_type, host, gtype, escaped_selector, name); } safe_free(escaped_selector); @@ -590,10 +590,10 @@ gopherToHTML(GopherStateData * gopherState, char *inbuf, int len) break; if (gopherState->cso_recno != recno) { - snprintf(tmpbuf,TEMP_BUF_SIZE, "


Record# %d
%s

\n
", recno, result);
+			snprintf(tmpbuf, TEMP_BUF_SIZE, "

Record# %d
%s

\n
", recno, result);
 			gopherState->cso_recno = recno;
 		    } else {
-			snprintf(tmpbuf,TEMP_BUF_SIZE, "%s\n", result);
+			snprintf(tmpbuf, TEMP_BUF_SIZE, "%s\n", result);
 		    }
 		    strcat(outbuf, tmpbuf);
 		    gopherState->data_in = 1;
@@ -652,12 +652,12 @@ gopherTimeout(int fd, void *data)
     ErrorState *err;
 
     debug(10, 4) ("gopherTimeout: FD %d: '%s'\n", fd, entry->url);
-	/* was assert */
-    if (entry->object_len == 0)  {
-	err=xcalloc(1,sizeof(ErrorState));
-	err->type=ERR_READ_TIMEOUT;
-	err->http_status=HTTP_GATEWAY_TIMEOUT;
-	err->url=gopherState->request;
+    /* was assert */
+    if (entry->object_len == 0) {
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_READ_TIMEOUT;
+	err->http_status = HTTP_GATEWAY_TIMEOUT;
+	err->url = gopherState->request;
 	errorAppendEntry(entry, err);
     }
     storeAbort(entry, 0);
@@ -729,26 +729,26 @@ gopherReadReply(int fd, void *data)
 		gopherReadReply,
 		data, 0);
 	} else {
-			/* was  assert */
-		ErrorState *err;
-		err=xcalloc(1,sizeof(ErrorState));
-		err->type=ERR_READ_ERROR;
-		err->errno=errno;
-		err->http_status=HTTP_INTERNAL_SERVER_ERROR;
-		err->url = entry->url;
-		errorAppendEntry(entry, err);
-	    	storeAbort(entry, 0);
-	    	comm_close(fd);
+	    /* was  assert */
+	    ErrorState *err;
+	    err = xcalloc(1, sizeof(ErrorState));
+	    err->type = ERR_READ_ERROR;
+	    err->errno = errno;
+	    err->http_status = HTTP_INTERNAL_SERVER_ERROR;
+	    err->url = entry->url;
+	    errorAppendEntry(entry, err);
+	    storeAbort(entry, 0);
+	    comm_close(fd);
 	}
     } else if (len == 0 && entry->mem_obj->inmem_hi == 0) {
-		/* was assert */	
-        ErrorState *err;
-        err=xcalloc(1,sizeof(ErrorState));
-        err->type=ERR_ZERO_SIZE_OBJECT;
+	/* was assert */
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_ZERO_SIZE_OBJECT;
 	err->errno = errno;
-        err->http_status=HTTP_SERVICE_UNAVAILABLE;
-	err->url=gopherState->request;
-        errorAppendEntry(entry, err);
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->url = gopherState->request;
+	errorAppendEntry(entry, err);
 	storeAbort(entry, 0);
 	comm_close(fd);
     } else if (len == 0) {
@@ -786,16 +786,16 @@ gopherSendComplete(int fd, char *buf, int size, int errflag, void *data)
     debug(10, 5) ("gopherSendComplete: FD %d size: %d errflag: %d\n",
 	fd, size, errflag);
     if (errflag) {
-		/* was assert */
-        ErrorState *err;
-        err=xcalloc(1,sizeof(ErrorState));
-        err->type=ERR_CONNECT_FAIL;
-	err->errno=errno;
+	/* was assert */
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_CONNECT_FAIL;
+	err->errno = errno;
 	err->host = xstrdup(gopherState->host);
 	err->port = gopherState->port;
-        err->http_status=HTTP_SERVICE_UNAVAILABLE;
-        err->url=entry->url;
-        errorAppendEntry(entry, err);
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->url = entry->url;
+	errorAppendEntry(entry, err);
 
 	storeAbort(entry, 0);
 	comm_close(fd);
@@ -879,13 +879,13 @@ gopherStart(StoreEntry * entry)
     /* Parse url. */
     if (gopher_url_parser(url, gopherState->host, &gopherState->port,
 	    &gopherState->type_id, gopherState->request)) {
-		/* was assert */
-                ErrorState *err;
-                err=xcalloc(1,sizeof(ErrorState));
-                err->type=ERR_INVALID_URL;
-                err->http_status=HTTP_BAD_REQUEST;
-                err->url=url;
-                errorAppendEntry(entry, err);
+	/* was assert */
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_INVALID_URL;
+	err->http_status = HTTP_BAD_REQUEST;
+	err->url = url;
+	errorAppendEntry(entry, err);
 
 	storeAbort(entry, 0);
 	gopherStateFree(-1, gopherState);
@@ -900,14 +900,14 @@ gopherStart(StoreEntry * entry)
 	url);
     if (fd == COMM_ERROR) {
 	debug(10, 4) ("gopherStart: Failed because we're out of sockets.\n");
-		/* was assert */
-                err=xcalloc(1,sizeof(ErrorState));
-                err->type=ERR_SOCKET_FAILURE;
-		err->errno=errno;
-                err->http_status=HTTP_INTERNAL_SERVER_ERROR;
-		if (entry && entry->url)
-                	err->url=entry->url;
-                errorAppendEntry(entry, err);
+	/* was assert */
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_SOCKET_FAILURE;
+	err->errno = errno;
+	err->http_status = HTTP_INTERNAL_SERVER_ERROR;
+	if (entry && entry->url)
+	    err->url = entry->url;
+	errorAppendEntry(entry, err);
 
 	storeAbort(entry, 0);
 	gopherStateFree(-1, gopherState);
@@ -922,17 +922,16 @@ gopherStart(StoreEntry * entry)
     if (!ipcache_gethostbyname(gopherState->host, 0)) {
 	debug(10, 4) ("gopherStart: Called without IP entry in ipcache. OR lookup failed.\n");
 	/* was assert */
-        err=xcalloc(1,sizeof(ErrorState));
-        err->type=ERR_DNS_FAIL;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_DNS_FAIL;
 	err->http_status = HTTP_SERVICE_UNAVAILABLE;
-        err->dnsserver_msg = xstrdup(dns_error_message);
-        err->url=entry->url;
-        errorAppendEntry(entry, err);
+	err->dnsserver_msg = xstrdup(dns_error_message);
+	err->url = entry->url;
+	errorAppendEntry(entry, err);
 	storeAbort(entry, 0);
 	comm_close(fd);
 	return;
     }
-
     if (((gopherState->type_id == GOPHER_INDEX) || (gopherState->type_id == GOPHER_CSO))
 	&& (strchr(gopherState->request, '?') == NULL)) {
 	/* Index URL without query word */
@@ -967,29 +966,29 @@ gopherConnectDone(int fd, int status, void *data)
     GopherStateData *gopherState = data;
     StoreEntry *entry = gopherState->entry;
 
-	ErrorState *err;
+    ErrorState *err;
     if (status == COMM_ERR_DNS) {
 	debug(10, 4) ("gopherConnectDone: Unknown host: %s\n", gopherState->host);
 	/* was assert */
-        err=xcalloc(1,sizeof(ErrorState));
-        err->type=ERR_DNS_FAIL;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_DNS_FAIL;
 	err->dnsserver_msg = xstrdup(dns_error_message);
-        err->http_status=HTTP_SERVICE_UNAVAILABLE;
-        err->url=entry->url;
-        errorAppendEntry(entry, err);
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->url = entry->url;
+	errorAppendEntry(entry, err);
 	storeAbort(gopherState->entry, 0);
 	comm_close(fd);
     } else if (status != COMM_OK) {
 	/* was assert */
-        ErrorState *err;
-        err=xcalloc(1,sizeof(ErrorState));
-        err->type=ERR_CONNECT_FAIL;
-        err->http_status=HTTP_SERVICE_UNAVAILABLE;
-	err->errno= errno;
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_CONNECT_FAIL;
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->errno = errno;
 	err->host = xstrdup(gopherState->host);
 	err->port = gopherState->port;
-        err->url=entry->url;
-        errorAppendEntry(entry, err);
+	err->url = entry->url;
+	errorAppendEntry(entry, err);
 	storeAbort(gopherState->entry, 0);
 	comm_close(fd);
     } else {
diff --git a/src/http.cc b/src/http.cc
index 2083063ee2..56459f45d9 100644
--- a/src/http.cc
+++ b/src/http.cc
@@ -1,5 +1,5 @@
 /*
- * $Id: http.cc,v 1.190 1997/10/16 23:59:57 wessels Exp $
+ * $Id: http.cc,v 1.191 1997/10/17 00:00:37 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -836,31 +836,31 @@ httpBuildRequestHeader(request_t * request,
 	    if (orig_request->method == METHOD_TRACE) {
 		for (s = xbuf + 13; *s && isspace(*s); s++);
 		n = atoi(s);
-		snprintf(xbuf, 4096,  "Max-Forwards: %d", n - 1);
+		snprintf(xbuf, 4096, "Max-Forwards: %d", n - 1);
 	    }
 	}
 	httpAppendRequestHeader(hdr_out, xbuf, &len, out_sz - 512, 1);
     }
     hdr_len = t - hdr_in;
     if (Config.fake_ua && strstr(hdr_out, "User-Agent") == NULL) {
-	snprintf(ybuf,MAX_URL+32,  "User-Agent: %s", Config.fake_ua);
+	snprintf(ybuf, MAX_URL + 32, "User-Agent: %s", Config.fake_ua);
 	httpAppendRequestHeader(hdr_out, ybuf, &len, out_sz, 0);
     }
-    /* Append Via: */ 
-	/* snprintf would fail here too */
-    snprintf(ybuf, MAX_URL+32,  "%3.1f %s", orig_request->http_ver, ThisCache);
+    /* Append Via: */
+    /* snprintf would fail here too */
+    snprintf(ybuf, MAX_URL + 32, "%3.1f %s", orig_request->http_ver, ThisCache);
     strcat(viabuf, ybuf);
     httpAppendRequestHeader(hdr_out, viabuf, &len, out_sz, 1);
     /* Append to X-Forwarded-For: */
     strcat(fwdbuf, cfd < 0 ? "unknown" : fd_table[cfd].ipaddr);
     httpAppendRequestHeader(hdr_out, fwdbuf, &len, out_sz, 1);
     if (!EBIT_TEST(hdr_flags, HDR_HOST)) {
-	snprintf(ybuf,MAX_URL+32, "Host: %s", orig_request->host);
+	snprintf(ybuf, MAX_URL + 32, "Host: %s", orig_request->host);
 	httpAppendRequestHeader(hdr_out, ybuf, &len, out_sz, 1);
     }
     if (!EBIT_TEST(cc_flags, CCC_MAXAGE)) {
 	url = entry ? entry->url : urlCanonical(orig_request, NULL);
-	snprintf(ybuf, MAX_URL+32, "Cache-control: Max-age=%d", (int) getMaxAge(url));
+	snprintf(ybuf, MAX_URL + 32, "Cache-control: Max-age=%d", (int) getMaxAge(url));
 	httpAppendRequestHeader(hdr_out, ybuf, &len, out_sz, 1);
 	if (request->urlpath) {
 	    assert(strstr(url, request->urlpath));
@@ -869,9 +869,9 @@ httpBuildRequestHeader(request_t * request,
     /* maybe append Connection: Keep-Alive */
     if (BIT_TEST(flags, HTTP_KEEPALIVE)) {
 	if (BIT_TEST(flags, HTTP_PROXYING)) {
-	    snprintf(ybuf,MAX_URL+32, "Proxy-Connection: Keep-Alive");
+	    snprintf(ybuf, MAX_URL + 32, "Proxy-Connection: Keep-Alive");
 	} else {
-	    snprintf(ybuf,MAX_URL+32, "Connection: Keep-Alive");
+	    snprintf(ybuf, MAX_URL + 32, "Connection: Keep-Alive");
 	}
 	httpAppendRequestHeader(hdr_out, ybuf, &len, out_sz, 1);
     }
@@ -1277,7 +1277,7 @@ httpReplyHeader(double ver,
     int l = 0;
     int s = HTTP_REPLY_BUF_SZ;
     /* argh, ../lib/snprintf.c doesn't support '%f' */
-    snprintf(float_buf,64, "%3.1f", ver);
+    snprintf(float_buf, 64, "%3.1f", ver);
     assert(strlen(float_buf) == 3);
     l += snprintf(buf + l, s - l, "HTTP/%s %d %s\r\n",
 	float_buf,
diff --git a/src/icmp.cc b/src/icmp.cc
index a87cf196ff..3e81c21504 100644
--- a/src/icmp.cc
+++ b/src/icmp.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.cc,v 1.42 1997/10/13 22:09:12 kostas Exp $
+ * $Id: icmp.cc,v 1.43 1997/10/17 00:00:38 wessels Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -276,8 +276,8 @@ icmpOpen(void)
     }
     if (pid == 0) {		/* child */
 	int tmp_s;
-	char *x = xcalloc((tmp_s=strlen(Config.debugOptions) + 32), 1);
-	snprintf(x,tmp_s, "SQUID_DEBUG=%s", Config.debugOptions);
+	char *x = xcalloc((tmp_s = strlen(Config.debugOptions) + 32), 1);
+	snprintf(x, tmp_s, "SQUID_DEBUG=%s", Config.debugOptions);
 	putenv(x);
 	comm_close(icmp_sock);
 	dup2(child_sock, 0);
diff --git a/src/ident.cc b/src/ident.cc
index 62ddfb7f28..f77d6ed481 100644
--- a/src/ident.cc
+++ b/src/ident.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ident.cc,v 1.33 1997/10/13 22:09:14 kostas Exp $
+ * $Id: ident.cc,v 1.34 1997/10/17 00:00:40 wessels Exp $
  *
  * DEBUG: section 30    Ident (RFC 931)
  * AUTHOR: Duane Wessels
@@ -85,7 +85,7 @@ identConnectDone(int fd, int status, void *data)
 	identCallback(connState);
 	return;
     }
-    snprintf(reqbuf,BUFSIZ, "%d, %d\r\n",
+    snprintf(reqbuf, BUFSIZ, "%d, %d\r\n",
 	ntohs(connState->peer.sin_port),
 	ntohs(connState->me.sin_port));
     comm_write(fd,
diff --git a/src/ipcache.cc b/src/ipcache.cc
index 697605ed82..ce6560cbfa 100644
--- a/src/ipcache.cc
+++ b/src/ipcache.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.130 1997/10/13 22:09:15 kostas Exp $
+ * $Id: ipcache.cc,v 1.131 1997/10/17 00:00:41 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -1105,7 +1105,7 @@ ipcacheChangeKey(ipcache_entry * i)
 	debug_trap("ipcacheChangeKey: hash_remove_link() failed\n");
 	return;
     }
-    snprintf(new_key,256, "%d/", ++index);
+    snprintf(new_key, 256, "%d/", ++index);
     strncat(new_key, i->name, 128);
     debug(14, 1) ("ipcacheChangeKey: from '%s' to '%s'\n", i->name, new_key);
     safe_free(i->name);
diff --git a/src/mime.cc b/src/mime.cc
index 4e8907fb2d..ed4084762d 100644
--- a/src/mime.cc
+++ b/src/mime.cc
@@ -1,5 +1,5 @@
 /*
- * $Id: mime.cc,v 1.39 1997/10/16 19:22:39 kostas Exp $
+ * $Id: mime.cc,v 1.40 1997/10/17 00:00:42 wessels Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -212,16 +212,16 @@ mk_mime_hdr(char *result, const char *type, int size, time_t ttl, time_t lmt)
     expiretime = ttl ? t + ttl : 0;
     date[0] = expires[0] = last_modified[0] = '\0';
     content_length[0] = result[0] = '\0';
-    snprintf(date,100, "Date: %s\r\n", mkrfc1123(t));
+    snprintf(date, 100, "Date: %s\r\n", mkrfc1123(t));
     if (ttl >= 0)
 	snprintf(expires, 100, "Expires: %s\r\n", mkrfc1123(expiretime));
     if (lmt)
-	snprintf(last_modified,100, "Last-Modified: %s\r\n", mkrfc1123(lmt));
+	snprintf(last_modified, 100, "Last-Modified: %s\r\n", mkrfc1123(lmt));
     if (size > 0)
-	snprintf(content_length,100, "Content-Length: %d\r\n", size);
+	snprintf(content_length, 100, "Content-Length: %d\r\n", size);
 
-	/* NOTE: don't know size of result thus didn't change
-	   to snprintf(). Should be done sometime! */
+    /* NOTE: don't know size of result thus didn't change
+     * to snprintf(). Should be done sometime! */
 
     snprintf(result, MAX_MIME, "Server: %s/%s\r\n%s%s%sContent-Type: %s\r\n%s",
 	appname,
diff --git a/src/redirect.cc b/src/redirect.cc
index 6f6218bb0a..d18df9d00e 100644
--- a/src/redirect.cc
+++ b/src/redirect.cc
@@ -1,5 +1,5 @@
 /*
- * $Id: redirect.cc,v 1.46 1997/10/13 22:09:18 kostas Exp $
+ * $Id: redirect.cc,v 1.47 1997/10/17 00:00:44 wessels Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -305,7 +305,7 @@ redirectDispatch(redirector_t * redirect, redirectStateData * r)
     if ((fqdn = fqdncache_gethostbyaddr(r->client_addr, 0)) == NULL)
 	fqdn = dash_str;
     buf = get_free_8k_page();
-    snprintf(buf,8192, "%s %s/%s %s %s\n",
+    snprintf(buf, 8192, "%s %s/%s %s %s\n",
 	r->orig_url,
 	inet_ntoa(r->client_addr),
 	fqdn,
diff --git a/src/send-announce.cc b/src/send-announce.cc
index 558bb8600a..f1ddba7bc1 100644
--- a/src/send-announce.cc
+++ b/src/send-announce.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: send-announce.cc,v 1.43 1997/10/13 22:09:19 kostas Exp $
+ * $Id: send-announce.cc,v 1.44 1997/10/17 00:00:45 wessels Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -60,16 +60,16 @@ send_announce(const ipcache_addrs * ia, void *data)
     }
     debug(27, 0) ("Sending Announcement to %s\n", host);
     sndbuf[0] = '\0';
-    snprintf(tbuf,256, "cache_version SQUID/%s\n", version_string);
+    snprintf(tbuf, 256, "cache_version SQUID/%s\n", version_string);
     strcat(sndbuf, tbuf);
     assert(Config.Port.http);
-    snprintf(tbuf,256, "Running on %s %d %d\n",
+    snprintf(tbuf, 256, "Running on %s %d %d\n",
 	getMyHostname(),
 	(int) Config.Port.http->i,
 	(int) Config.Port.icp);
     strcat(sndbuf, tbuf);
     if (Config.adminEmail) {
-	snprintf(tbuf,256, "cache_admin: %s\n", Config.adminEmail);
+	snprintf(tbuf, 256, "cache_admin: %s\n", Config.adminEmail);
 	strcat(sndbuf, tbuf);
     }
     snprintf(tbuf, 256, "generated %d [%s]\n",
diff --git a/src/stat.cc b/src/stat.cc
index c98f130e86..2418c62c49 100644
--- a/src/stat.cc
+++ b/src/stat.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.158 1997/10/17 00:00:01 wessels Exp $
+ * $Id: stat.cc,v 1.159 1997/10/17 00:00:46 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -276,7 +276,7 @@ static const char *
 describeStatuses(const StoreEntry * entry)
 {
     LOCAL_ARRAY(char, buf, 256);
-    snprintf(buf,256, "%-13s %-13s %-12s %-12s",
+    snprintf(buf, 256, "%-13s %-13s %-12s %-12s",
 	storeStatusStr[entry->store_status],
 	memStatusStr[entry->mem_status],
 	swapStatusStr[entry->swap_status],
@@ -322,7 +322,7 @@ static const char *
 describeTimestamps(const StoreEntry * entry)
 {
     LOCAL_ARRAY(char, buf, 256);
-    snprintf(buf,256, "LV:%-9d LU:%-9d LM:%-9d EX:%-9d",
+    snprintf(buf, 256, "LV:%-9d LU:%-9d LM:%-9d EX:%-9d",
 	(int) entry->timestamp,
 	(int) entry->lastref,
 	(int) entry->lastmod,
diff --git a/src/store.cc b/src/store.cc
index de4ad505a2..79349d2676 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.286 1997/10/17 00:00:03 wessels Exp $
+ * $Id: store.cc,v 1.287 1997/10/17 00:00:47 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -2697,7 +2697,7 @@ static void
 storeInMemAdd(StoreEntry * e)
 {
     struct _mem_entry *m = xmalloc(sizeof(struct _mem_entry));
-    debug(0,0)("storeInMemAdd: %s\n", e->url);
+    debug(0, 0) ("storeInMemAdd: %s\n", e->url);
     m->e = e;
     m->prev = NULL;
     m->next = inmem_head;
@@ -2718,7 +2718,7 @@ storeInMemDelete(StoreEntry * e)
 	    break;
     }
     assert(m != NULL);
-    debug(0,0)("storeInMemDelete: %s\n", e->url);
+    debug(0, 0) ("storeInMemDelete: %s\n", e->url);
     if (m->next)
 	m->next->prev = m->prev;
     if (m->prev)
diff --git a/src/store_dir.cc b/src/store_dir.cc
index aebf9b7451..39dcb711a6 100644
--- a/src/store_dir.cc
+++ b/src/store_dir.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.29 1997/10/16 19:22:41 kostas Exp $
+ * $Id: store_dir.cc,v 1.30 1997/10/17 00:00:48 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -46,7 +46,7 @@ storeSwapFullPath(int fn, char *fullpath)
     if (!fullpath)
 	fullpath = fullfilename;
     fullpath[0] = '\0';
-    snprintf(fullpath,SQUID_MAXPATHLEN, "%s/%02X/%02X/%08X",
+    snprintf(fullpath, SQUID_MAXPATHLEN, "%s/%02X/%02X/%08X",
 	Config.cacheSwap.swapDirs[dirn].path,
 	filn % Config.cacheSwap.swapDirs[dirn].l1,
 	filn / Config.cacheSwap.swapDirs[dirn].l1 % Config.cacheSwap.swapDirs[dirn].l2,
@@ -64,7 +64,7 @@ storeSwapSubSubDir(int fn, char *fullpath)
     if (!fullpath)
 	fullpath = fullfilename;
     fullpath[0] = '\0';
-    snprintf(fullpath,SQUID_MAXPATHLEN, "%s/%02X/%02X",
+    snprintf(fullpath, SQUID_MAXPATHLEN, "%s/%02X/%02X",
 	Config.cacheSwap.swapDirs[dirn].path,
 	filn % Config.cacheSwap.swapDirs[dirn].l1,
 	filn / Config.cacheSwap.swapDirs[dirn].l1 % Config.cacheSwap.swapDirs[dirn].l2);
@@ -81,9 +81,9 @@ storeVerifyOrCreateDir(const char *path)
     }
     safeunlink(path, 1);
     if (mkdir(path, 0777) < 0) {
-	if (errno != EEXIST) {    
-	  /* NOTE: couldn't figure size of tmp_error_buf, assumed
-		ERROR_BUF_SZ */
+	if (errno != EEXIST) {
+	    /* NOTE: couldn't figure size of tmp_error_buf, assumed
+	     * ERROR_BUF_SZ */
 	    snprintf(tmp_error_buf, ERROR_BUF_SZ,
 		"Failed to create swap directory %s: %s",
 		path,
@@ -93,9 +93,9 @@ storeVerifyOrCreateDir(const char *path)
     }
     debug(47, 1) ("Created directory %s\n", path);
     if (stat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) {
-          /* NOTE: couldn't figure size of tmp_error_buf, assumed
-                ERROR_BUF_SZ */
-	snprintf(tmp_error_buf, ERROR_BUF_SZ, 
+	/* NOTE: couldn't figure size of tmp_error_buf, assumed
+	 * ERROR_BUF_SZ */
+	snprintf(tmp_error_buf, ERROR_BUF_SZ,
 	    "Failed to create directory %s: %s", path, xstrerror());
 	fatal(tmp_error_buf);
     }
@@ -124,7 +124,7 @@ storeCreateSwapSubDirs(int j)
     SwapDir *SD = &Config.cacheSwap.swapDirs[j];
     LOCAL_ARRAY(char, name, MAXPATHLEN);
     for (i = 0; i < SD->l1; i++) {
-	snprintf(name,MAXPATHLEN, "%s/%02X", SD->path, i);
+	snprintf(name, MAXPATHLEN, "%s/%02X", SD->path, i);
 	if (storeVerifyOrCreateDir(name) == 0)
 	    continue;
 	debug(47, 1) ("Making directories in %s\n", name);
@@ -224,7 +224,7 @@ storeDirSwapLog(const StoreEntry * e)
     if (BIT_TEST(e->flag, KEY_PRIVATE))
 	debug(0, 0) ("storeDirSwapLog: PRIVATE: %s\n", e->url);
     /* Note this printf format appears in storeWriteCleanLog() too */
-    snprintf(logmsg, MAX_URL << 1 , "%08x %08x %08x %08x %08x %9d %6d %08x %s\n",
+    snprintf(logmsg, MAX_URL << 1, "%08x %08x %08x %08x %08x %9d %6d %08x %s\n",
 	(int) e->swap_file_number,
 	(int) e->timestamp,
 	(int) e->lastref,
diff --git a/src/tools.cc b/src/tools.cc
index 243262c3ea..c524042f1b 100644
--- a/src/tools.cc
+++ b/src/tools.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.122 1997/10/16 19:22:41 kostas Exp $
+ * $Id: tools.cc,v 1.123 1997/10/17 00:00:49 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -149,7 +149,7 @@ static char *
 dead_msg(void)
 {
     LOCAL_ARRAY(char, msg, 1024);
-    snprintf(msg,1024, DEAD_MSG, version_string, version_string);
+    snprintf(msg, 1024, DEAD_MSG, version_string, version_string);
     return msg;
 }
 
@@ -167,7 +167,7 @@ mail_warranty(void)
     fprintf(fp, "To: %s\n", Config.adminEmail);
     fprintf(fp, "Subject: %s\n", dead_msg());
     fclose(fp);
-    snprintf(command,256, "mail %s < %s", Config.adminEmail, filename);
+    snprintf(command, 256, "mail %s < %s", Config.adminEmail, filename);
     system(command);		/* XXX should avoid system(3) */
     unlink(filename);
 }
@@ -609,7 +609,7 @@ writePidFile(void)
 	debug_trap("Could not write pid file");
 	return;
     }
-    snprintf(buf,32, "%d\n", (int) getpid());
+    snprintf(buf, 32, "%d\n", (int) getpid());
     write(fd, buf, strlen(buf));
     file_close(fd);
 }
@@ -659,10 +659,10 @@ setMaxFD(void)
 	if (rl.rlim_cur > rl.rlim_max)
 	    Squid_MaxFD = rl.rlim_cur = rl.rlim_max;
 	if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
-          /* NOTE: couldn't figure size of tmp_error_buf, thus 
-                 assuming ERROR_BUF_SZ */
-	    snprintf(tmp_error_buf, ERROR_BUF_SZ, 
-			"setrlimit: RLIMIT_NOFILE: %s", xstrerror());
+	    /* NOTE: couldn't figure size of tmp_error_buf, thus 
+	     * assuming ERROR_BUF_SZ */
+	    snprintf(tmp_error_buf, ERROR_BUF_SZ,
+		"setrlimit: RLIMIT_NOFILE: %s", xstrerror());
 	    fatal_dump(tmp_error_buf);
 	}
     }
@@ -674,10 +674,10 @@ setMaxFD(void)
 	if (rl.rlim_cur > rl.rlim_max)
 	    Squid_MaxFD = rl.rlim_cur = rl.rlim_max;
 	if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
-          /* NOTE: couldn't figure size of tmp_error_buf, thus
-                assuming ERROR_BUF_SZ  */
-	    snprintf(tmp_error_buf, ERROR_BUF_SZ, 
-			"setrlimit: RLIMIT_OFILE: %s", xstrerror());
+	    /* NOTE: couldn't figure size of tmp_error_buf, thus
+	     * assuming ERROR_BUF_SZ  */
+	    snprintf(tmp_error_buf, ERROR_BUF_SZ,
+		"setrlimit: RLIMIT_OFILE: %s", xstrerror());
 	    fatal_dump(tmp_error_buf);
 	}
     }
@@ -692,10 +692,10 @@ setMaxFD(void)
     } else if (rl.rlim_max > rl.rlim_cur) {
 	rl.rlim_cur = rl.rlim_max;	/* set it to the max */
 	if (setrlimit(RLIMIT_DATA, &rl) < 0) {
-          /* NOTE: couldn't figure size of tmp_error_buf, thus d
-                assuming ERROR_BUF_SZ  */
-	    snprintf(tmp_error_buf, ERROR_BUF_SZ, 
-			"setrlimit: RLIMIT_DATA: %s", xstrerror());
+	    /* NOTE: couldn't figure size of tmp_error_buf, thus d
+	     * assuming ERROR_BUF_SZ  */
+	    snprintf(tmp_error_buf, ERROR_BUF_SZ,
+		"setrlimit: RLIMIT_DATA: %s", xstrerror());
 	    fatal_dump(tmp_error_buf);
 	}
     }
@@ -706,10 +706,10 @@ setMaxFD(void)
     } else if (rl.rlim_max > rl.rlim_cur) {
 	rl.rlim_cur = rl.rlim_max;	/* set it to the max */
 	if (setrlimit(RLIMIT_VMEM, &rl) < 0) {
-          /* NOTE: couldn't figure size of tmp_error_buf, thus 
-                assuming ERROR_BUF_SZ  */
-	    snprintf(tmp_error_buf, ERROR_BUF_SZ, 
-			"setrlimit: RLIMIT_VMEM: %s", xstrerror());
+	    /* NOTE: couldn't figure size of tmp_error_buf, thus 
+	     * assuming ERROR_BUF_SZ  */
+	    snprintf(tmp_error_buf, ERROR_BUF_SZ,
+		"setrlimit: RLIMIT_VMEM: %s", xstrerror());
 	    fatal_dump(tmp_error_buf);
 	}
     }
diff --git a/src/url.cc b/src/url.cc
index ffae27e7fb..dc6ed235e7 100644
--- a/src/url.cc
+++ b/src/url.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.64 1997/10/13 22:09:25 kostas Exp $
+ * $Id: url.cc,v 1.65 1997/10/17 00:00:49 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -280,12 +280,12 @@ urlCanonical(const request_t * request, char *buf)
 	buf = urlbuf;
     switch (request->method) {
     case METHOD_CONNECT:
-	snprintf(buf,MAX_URL, "%s:%d", request->host, request->port);
+	snprintf(buf, MAX_URL, "%s:%d", request->host, request->port);
 	break;
     default:
 	portbuf[0] = '\0';
 	if (request->port != urlDefaultPort(request->protocol))
-	    snprintf(portbuf,32,  ":%d", request->port);
+	    snprintf(portbuf, 32, ":%d", request->port);
 	snprintf(buf, MAX_URL, "%s://%s%s%s%s%s",
 	    ProtocolStr[request->protocol],
 	    request->login,
@@ -311,8 +311,8 @@ urlCanonicalClean(const request_t * request)
     default:
 	portbuf[0] = '\0';
 	if (request->port != urlDefaultPort(request->protocol))
-	    snprintf(portbuf,32, ":%d", request->port);
-	snprintf(buf,MAX_URL, "%s://%s%s%s",
+	    snprintf(portbuf, 32, ":%d", request->port);
+	snprintf(buf, MAX_URL, "%s://%s%s%s",
 	    ProtocolStr[request->protocol],
 	    request->host,
 	    portbuf,
diff --git a/src/useragent.cc b/src/useragent.cc
index 31743de268..e0b86fc880 100644
--- a/src/useragent.cc
+++ b/src/useragent.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: useragent.cc,v 1.11 1997/10/13 22:09:26 kostas Exp $
+ * $Id: useragent.cc,v 1.12 1997/10/17 00:00:50 wessels Exp $
  *
  * DEBUG: section 40    User-Agent logging
  * AUTHOR: Joe Ramey 
@@ -81,8 +81,8 @@ useragentRotateLog(void)
     /* Rotate numbers 0 through N up one */
     for (i = Config.Log.rotateNumber; i > 1;) {
 	i--;
-	snprintf(from,MAXPATHLEN, "%s.%d", fname, i - 1);
-	snprintf(to,MAXPATHLEN, "%s.%d", fname, i);
+	snprintf(from, MAXPATHLEN, "%s.%d", fname, i - 1);
+	snprintf(to, MAXPATHLEN, "%s.%d", fname, i);
 	rename(from, to);
     }
     /* Rotate the current log to .0 */
diff --git a/src/wais.cc b/src/wais.cc
index a1e2d0ad67..7ef30bbc0e 100644
--- a/src/wais.cc
+++ b/src/wais.cc
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wais.cc,v 1.84 1997/10/17 00:00:05 wessels Exp $
+ * $Id: wais.cc,v 1.85 1997/10/17 00:00:51 wessels Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -143,7 +143,7 @@ waisTimeout(int fd, void *data)
     ErrorState *err;
     StoreEntry *entry = waisState->entry;
     debug(24, 4) ("waisTimeout: FD %d: '%s'\n", fd, entry->url);
-	/* was assert */
+    /* was assert */
     err = xcalloc(1, sizeof(ErrorState));
     err->type = ERR_READ_TIMEOUT;
     err->http_status = HTTP_GATEWAY_TIMEOUT;
@@ -169,12 +169,12 @@ waisReadReply(int fd, void *data)
     int off;
     int bin;
     if (protoAbortFetch(entry)) {
-    	ErrorState *err;
-    	err = xcalloc(1, sizeof(ErrorState));
-    	err->type = ERR_CLIENT_ABORT;
-    	err->http_status = HTTP_INTERNAL_SERVER_ERROR;
-    	err->request = urlParse(METHOD_CONNECT, waisState->request);
-    	errorAppendEntry(entry, err);
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_CLIENT_ABORT;
+	err->http_status = HTTP_INTERNAL_SERVER_ERROR;
+	err->request = urlParse(METHOD_CONNECT, waisState->request);
+	errorAppendEntry(entry, err);
 	storeAbort(entry, 0);
 	comm_close(fd);
 	return;
@@ -222,29 +222,29 @@ waisReadReply(int fd, void *data)
 	    commSetSelect(fd, COMM_SELECT_READ,
 		waisReadReply, waisState, 0);
 	} else {
-		ErrorState *err;
+	    ErrorState *err;
 	    BIT_RESET(entry->flag, ENTRY_CACHABLE);
 	    storeReleaseRequest(entry);
-	/* was assert */
+	    /* was assert */
 
-            err = xcalloc(1, sizeof(ErrorState));
-            err->type = ERR_READ_ERROR;
-            err->http_status = HTTP_INTERNAL_SERVER_ERROR;
-            err->request = urlParse(METHOD_CONNECT, waisState->request);
-            errorAppendEntry(entry, err);
+	    err = xcalloc(1, sizeof(ErrorState));
+	    err->type = ERR_READ_ERROR;
+	    err->http_status = HTTP_INTERNAL_SERVER_ERROR;
+	    err->request = urlParse(METHOD_CONNECT, waisState->request);
+	    errorAppendEntry(entry, err);
 
 	    storeAbort(entry, 0);
 	    comm_close(fd);
 	}
     } else if (len == 0 && entry->mem_obj->inmem_hi == 0) {
-		/* was assert */
-            ErrorState *err;
-            err = xcalloc(1, sizeof(ErrorState));
-            err->type = ERR_ZERO_SIZE_OBJECT;
-            err->errno = errno;
-            err->http_status = HTTP_SERVICE_UNAVAILABLE;
-            err->request = urlParse(METHOD_CONNECT, waisState->request);
-            errorAppendEntry(entry, err);
+	/* was assert */
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_ZERO_SIZE_OBJECT;
+	err->errno = errno;
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->request = urlParse(METHOD_CONNECT, waisState->request);
+	errorAppendEntry(entry, err);
 	storeAbort(entry, 0);
 	comm_close(fd);
     } else if (len == 0) {
@@ -272,15 +272,15 @@ waisSendComplete(int fd, char *buf, int size, int errflag, void *data)
 	fd, size, errflag);
     if (errflag) {
 	/* was assert */
-            ErrorState *err;
-            err = xcalloc(1, sizeof(ErrorState));
-            err->type = ERR_CONNECT_FAIL;
-            err->errno=errno;
-            err->host =xstrdup(waisState->relayhost);
-            err->port = waisState->relayport;
-            err->http_status = HTTP_SERVICE_UNAVAILABLE;
-            err->request = urlParse(METHOD_CONNECT, waisState->request);
-            errorAppendEntry(entry, err);
+	ErrorState *err;
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_CONNECT_FAIL;
+	err->errno = errno;
+	err->host = xstrdup(waisState->relayhost);
+	err->port = waisState->relayport;
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->request = urlParse(METHOD_CONNECT, waisState->request);
+	errorAppendEntry(entry, err);
 
 	storeAbort(entry, 0);
 	comm_close(fd);
@@ -312,10 +312,10 @@ waisSendRequest(int fd, void *data)
     buf = xcalloc(1, len + 1);
 
     if (waisState->request_hdr)
-	snprintf(buf, len+1, "%s %s %s\r\n", Method, waisState->request,
+	snprintf(buf, len + 1, "%s %s %s\r\n", Method, waisState->request,
 	    waisState->request_hdr);
     else
-	snprintf(buf, len+1, "%s %s\r\n", Method, waisState->request);
+	snprintf(buf, len + 1, "%s %s\r\n", Method, waisState->request);
     debug(24, 6) ("waisSendRequest: buf: %s\n", buf);
     comm_write(fd,
 	buf,
@@ -336,14 +336,14 @@ waisStart(request_t * request, StoreEntry * entry)
     method_t method = request->method;
     debug(24, 3) ("waisStart: \"%s %s\"\n", RequestMethodStr[method], url);
     if (!Config.Wais.relayHost) {
-        ErrorState *err;
+	ErrorState *err;
 	debug(24, 0) ("waisStart: Failed because no relay host defined!\n");
 	/* was assert */
-        err = xcalloc(1, sizeof(ErrorState));
-        err->type = ERR_NO_RELAY;
-        err->http_status = HTTP_INTERNAL_SERVER_ERROR;
-        err->request = urlParse(METHOD_CONNECT, waisState->request);
-        errorAppendEntry(entry, err);
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_NO_RELAY;
+	err->http_status = HTTP_INTERNAL_SERVER_ERROR;
+	err->request = urlParse(METHOD_CONNECT, waisState->request);
+	errorAppendEntry(entry, err);
 
 	storeAbort(entry, 0);
 	return;
@@ -355,14 +355,14 @@ waisStart(request_t * request, StoreEntry * entry)
 	COMM_NONBLOCKING,
 	url);
     if (fd == COMM_ERROR) {
-        ErrorState *err;
+	ErrorState *err;
 	debug(24, 4) ("waisStart: Failed because we're out of sockets.\n");
 	/* was assert */
-        err = xcalloc(1, sizeof(ErrorState));
-        err->type = ERR_SOCKET_FAILURE;
-        err->http_status = HTTP_INTERNAL_SERVER_ERROR;
-        err->request = urlParse(METHOD_CONNECT, waisState->request);
-        errorAppendEntry(entry, err);
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_SOCKET_FAILURE;
+	err->http_status = HTTP_INTERNAL_SERVER_ERROR;
+	err->request = urlParse(METHOD_CONNECT, waisState->request);
+	errorAppendEntry(entry, err);
 	storeAbort(entry, 0);
 	return;
     }
@@ -395,24 +395,24 @@ waisConnectDone(int fd, int status, void *data)
 
     if (status == COMM_ERR_DNS) {
 	/* was assert */
-        err = xcalloc(1, sizeof(ErrorState));
-        err->type = ERR_DNS_FAIL;
-        err->http_status = HTTP_SERVICE_UNAVAILABLE;
-        err->dnsserver_msg = xstrdup(dns_error_message);
-        err->request = urlParse(METHOD_CONNECT, request);
-        errorAppendEntry(waisState->entry, err);
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_DNS_FAIL;
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->dnsserver_msg = xstrdup(dns_error_message);
+	err->request = urlParse(METHOD_CONNECT, request);
+	errorAppendEntry(waisState->entry, err);
 	storeAbort(waisState->entry, 0);
 	comm_close(fd);
     } else if (status != COMM_OK) {
 	/* was assert */
-        err = xcalloc(1, sizeof(ErrorState));
-        err->type = ERR_CONNECT_FAIL;
-        err->http_status = HTTP_SERVICE_UNAVAILABLE;
-        err->errno = errno;
-        err->host = xstrdup(waisState->relayhost);
-        err->port = waisState->relayport;
-        err->request = urlParse(METHOD_CONNECT, request);
-        errorAppendEntry(waisState->entry, err);
+	err = xcalloc(1, sizeof(ErrorState));
+	err->type = ERR_CONNECT_FAIL;
+	err->http_status = HTTP_SERVICE_UNAVAILABLE;
+	err->errno = errno;
+	err->host = xstrdup(waisState->relayhost);
+	err->port = waisState->relayport;
+	err->request = urlParse(METHOD_CONNECT, request);
+	errorAppendEntry(waisState->entry, err);
 	storeAbort(waisState->entry, 0);
 	comm_close(fd);
     } else {
-- 
2.47.3