From e3dd531eaf5689f8f4907fdaec3383c8066ea137 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sun, 24 Jan 1999 09:26:19 +0000 Subject: [PATCH] gindent --- src/HttpHeader.cc | 23 +++++++++++------------ src/HttpHeaderTools.cc | 3 ++- src/cache_cf.cc | 17 ++++++++--------- src/client.cc | 3 ++- src/ftp.cc | 16 ++++++++-------- src/gopher.cc | 14 +++++++------- src/store_rebuild.cc | 4 ++-- src/structs.h | 3 +-- src/wais.cc | 14 +++++++------- 9 files changed, 48 insertions(+), 49 deletions(-) diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 1b3b9f7a02..0fb55a4424 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.60 1999/01/22 19:06:58 glenn Exp $ + * $Id: HttpHeader.cc,v 1.61 1999/01/24 02:26:19 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -234,8 +234,8 @@ httpHeaderInitModule() assert(8 * sizeof(HttpHeaderMask) >= HDR_ENUM_END); /* all headers must be described */ assert(countof(HeadersAttrs) == HDR_ENUM_END); - if(!Headers) - Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END); + if (!Headers) + Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END); /* create masks */ httpHeaderMaskInit(&ListHeadersMask, 0); httpHeaderCalcMask(&ListHeadersMask, (const int *) ListHeadersArr, countof(ListHeadersArr)); @@ -1068,11 +1068,11 @@ httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * i { int i; for (i = 0; i < end; ++i) { - if (name_len >= 0 && name_len != strLen(info[i].name)) - continue; - if (!strncasecmp(name, strBuf(info[i].name), - name_len < 0 ? strLen(info[i].name) + 1 : name_len)) - return i; + if (name_len >= 0 && name_len != strLen(info[i].name)) + continue; + if (!strncasecmp(name, strBuf(info[i].name), + name_len < 0 ? strLen(info[i].name) + 1 : name_len)) + return i; } return -1; } @@ -1080,8 +1080,7 @@ httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * i int httpHeaderIdByNameDef(const char *name, int name_len) { - if (!Headers) - Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END); - return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END); + if (!Headers) + Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END); + return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END); } - diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 3a6427aea5..ac572c0b01 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -1,5 +1,6 @@ + /* - * $Id: HttpHeaderTools.cc,v 1.23 1999/01/22 19:06:59 glenn Exp $ + * $Id: HttpHeaderTools.cc,v 1.24 1999/01/24 02:26:20 wessels Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov diff --git a/src/cache_cf.cc b/src/cache_cf.cc index b774f41be4..3455a4f35f 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.320 1999/01/22 19:07:02 glenn Exp $ + * $Id: cache_cf.cc,v 1.321 1999/01/24 02:26:21 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -76,7 +76,7 @@ static void requirePathnameExists(const char *name, const char *path); static OBJH dump_config; static void dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header); static void parse_http_header(HttpHeaderMask * header); -static void free_http_header(HttpHeaderMask *header); +static void free_http_header(HttpHeaderMask * header); static void self_destruct(void) @@ -517,10 +517,10 @@ free_address(struct in_addr *addr) static void dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header) -{ +{ storeAppendPrintf(entry, "%s\n", name); } - + static void parse_http_header(HttpHeaderMask * header) { @@ -544,12 +544,11 @@ parse_http_header(HttpHeaderMask * header) return; } - if(!http_header_first){ + if (!http_header_first) { http_header_first = 1; if (allowed) httpHeaderMaskInit(header, 0xFF); } - while ((t = strtok(NULL, w_space))) { if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1) id = HDR_OTHER; @@ -559,10 +558,10 @@ parse_http_header(HttpHeaderMask * header) CBIT_SET(*header, id); } } - + static void -free_http_header(HttpHeaderMask *header) -{ +free_http_header(HttpHeaderMask * header) +{ httpHeaderMaskInit(header, 0); } diff --git a/src/client.cc b/src/client.cc index 8534f100c0..aae534a7a1 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,7 +1,8 @@ + /* - * $Id: client.cc,v 1.80 1999/01/12 23:38:36 wessels Exp $ + * $Id: client.cc,v 1.81 1999/01/24 02:26:22 wessels Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived diff --git a/src/ftp.cc b/src/ftp.cc index d2e1a8b7ca..83bb79bfb2 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.277 1999/01/22 04:29:01 wessels Exp $ + * $Id: ftp.cc,v 1.278 1999/01/24 02:26:23 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -319,12 +319,12 @@ ftpTimeout(int fd, void *data) FtpStateData *ftpState = data; StoreEntry *entry = ftpState->entry; debug(9, 4) ("ftpTimeout: FD %d: '%s'\n", fd, storeUrl(entry)); - if (entry->store_status == STORE_PENDING) { - if (entry->mem_obj->inmem_hi == 0) { - fwdFail(ftpState->fwd, - errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT)); - } - } + if (entry->store_status == STORE_PENDING) { + if (entry->mem_obj->inmem_hi == 0) { + fwdFail(ftpState->fwd, + errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT)); + } + } if (ftpState->data.fd > -1) { comm_close(ftpState->data.fd); ftpState->data.fd = -1; @@ -2321,7 +2321,7 @@ ftpAppendSuccessHeader(FtpStateData * ftpState) if (ftpState->restarted_offset) { /* Partial reply */ HttpHdrRangeSpec range_spec; - range_spec.offset = ftpState->restarted_offset; + range_spec.offset = ftpState->restarted_offset; range_spec.length = ftpState->size - ftpState->restarted_offset; httpReplySetHeaders(reply, 1.0, HTTP_PARTIAL_CONTENT, "Gatewaying", mime_type, ftpState->size - ftpState->restarted_offset, ftpState->mdtm, -2); diff --git a/src/gopher.cc b/src/gopher.cc index 888b6179aa..2d6a8db2bb 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,7 +1,7 @@ /* - * $Id: gopher.cc,v 1.148 1999/01/20 19:27:11 wessels Exp $ + * $Id: gopher.cc,v 1.149 1999/01/24 02:26:24 wessels Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -576,12 +576,12 @@ gopherTimeout(int fd, void *data) GopherStateData *gopherState = data; StoreEntry *entry = gopherState->entry; debug(10, 4) ("gopherTimeout: FD %d: '%s'\n", fd, storeUrl(entry)); - if (entry->store_status == STORE_PENDING) { - if (entry->mem_obj->inmem_hi == 0) { - fwdFail(gopherState->fwdState, - errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT)); - } - } + if (entry->store_status == STORE_PENDING) { + if (entry->mem_obj->inmem_hi == 0) { + fwdFail(gopherState->fwdState, + errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT)); + } + } comm_close(fd); } diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 835e950a41..3acb1d06d3 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.cc,v 1.55 1999/01/21 21:10:37 wessels Exp $ + * $Id: store_rebuild.cc,v 1.56 1999/01/24 02:26:25 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -155,7 +155,7 @@ storeRebuildFromDirectory(rebuild_dir * d) continue; } file_close(fd); - store_open_disk_fd--; + store_open_disk_fd--; fd = -1; swap_hdr_len = 0; #if USE_TRUNCATE_NOT_UNLINK diff --git a/src/structs.h b/src/structs.h index ed9f929eee..7eb7bf3600 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,7 +1,6 @@ - /* - * $Id: structs.h,v 1.269 1999/01/24 02:22:59 wessels Exp $ + * $Id: structs.h,v 1.270 1999/01/24 02:26:26 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ diff --git a/src/wais.cc b/src/wais.cc index 68a683dbf9..ec383539b2 100644 --- a/src/wais.cc +++ b/src/wais.cc @@ -1,6 +1,6 @@ /* - * $Id: wais.cc,v 1.130 1999/01/20 19:27:12 wessels Exp $ + * $Id: wais.cc,v 1.131 1999/01/24 02:26:26 wessels Exp $ * * DEBUG: section 24 WAIS Relay * AUTHOR: Harvest Derived @@ -69,12 +69,12 @@ waisTimeout(int fd, void *data) WaisStateData *waisState = data; StoreEntry *entry = waisState->entry; debug(24, 4) ("waisTimeout: FD %d: '%s'\n", fd, storeUrl(entry)); - if (entry->store_status == STORE_PENDING) { - if (entry->mem_obj->inmem_hi == 0) { - fwdFail(waisState->fwd, - errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT)); - } - } + if (entry->store_status == STORE_PENDING) { + if (entry->mem_obj->inmem_hi == 0) { + fwdFail(waisState->fwd, + errorCon(ERR_READ_TIMEOUT, HTTP_GATEWAY_TIMEOUT)); + } + } comm_close(fd); } -- 2.47.3