--------------------- PatchSet 2992 Date: 2001/09/09 15:25:56 Author: serassio Branch: nt-2_3-tolsty Tag: (none) Log: Fixed indent problems Members: src/urn.c:1.1.1.3.4.1.2.1.2.1->1.1.1.3.4.1.2.1.2.2 src/wais.c:1.1.1.2.4.1.2.1.2.1->1.1.1.2.4.1.2.1.2.2 src/whois.c:1.1.1.2.4.2.2.1.2.1->1.1.1.2.4.2.2.1.2.2 Index: squid/src/urn.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/urn.c,v retrieving revision 1.1.1.3.4.1.2.1.2.1 retrieving revision 1.1.1.3.4.1.2.1.2.2 diff -u -r1.1.1.3.4.1.2.1.2.1 -r1.1.1.3.4.1.2.1.2.2 --- squid/src/urn.c 27 Aug 2001 21:48:22 -0000 1.1.1.3.4.1.2.1.2.1 +++ squid/src/urn.c 9 Sep 2001 15:25:56 -0000 1.1.1.3.4.1.2.1.2.2 @@ -1,6 +1,7 @@ + /* * - * $Id: urn.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $ + * $Id: urn.c,v 1.1.1.3.4.1.2.1.2.2 2001/09/09 15:25:56 serassio Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis @@ -35,32 +36,24 @@ #include "squid.h" -typedef struct -{ +typedef struct { StoreEntry *entry; StoreEntry *urlres_e; request_t *request; request_t *urlres_r; - struct - { + struct { int force_menu:1; - } - flags; -} -UrnState; + } flags; +} UrnState; -typedef struct -{ +typedef struct { char *url; char *host; int rtt; - struct - { + struct { int cached; - } - flags; -} -url_entry; + } flags; +} url_entry; static STCB urnHandleReply; static url_entry *urnParseReply(const char *inbuf, method_t); @@ -97,7 +90,8 @@ if (rtt_ret) *rtt_ret = min_rtt; debug(52, 1) ("urnFindMinRtt: Returning '%s' RTT %d\n", - min_u ? min_u->url : "NONE", min_rtt); + min_u ? min_u->url : "NONE", + min_rtt); return min_u; } @@ -130,8 +124,7 @@ } else { host = xstrdup(strBuf(r->urlpath)); } - snprintf(urlres, 4096, "http://%s/uri-res/N2L?urn:%s", host, - strBuf(r->urlpath)); + snprintf(urlres, 4096, "http://%s/uri-res/N2L?urn:%s", host, strBuf(r->urlpath)); safe_free(host); urlres_r = urlParse(METHOD_GET, urlres); if (urlres_r == NULL) { @@ -143,8 +136,7 @@ } httpHeaderPutStr(&urlres_r->header, HDR_ACCEPT, "text/plain"); if ((urlres_e = storeGetPublic(urlres, METHOD_GET)) == NULL) { - urlres_e = - storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET); + urlres_e = storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET); storeClientListAdd(urlres_e, urnState); fwdStart(-1, urlres_e, urlres_r); } else { @@ -154,7 +146,12 @@ urnState->urlres_e = urlres_e; urnState->urlres_r = requestLink(urlres_r); storeClientCopy(urlres_e, - 0, 0, 4096, memAllocate(MEM_4K_BUF), urnHandleReply, urnState); + 0, + 0, + 4096, + memAllocate(MEM_4K_BUF), + urnHandleReply, + urnState); } static int @@ -203,7 +200,12 @@ } if (urlres_e->store_status == STORE_PENDING && size < SM_PAGE_SIZE) { storeClientCopy(urlres_e, - size, 0, SM_PAGE_SIZE, buf, urnHandleReply, urnState); + size, + 0, + SM_PAGE_SIZE, + buf, + urnHandleReply, + urnState); return; } /* we know its STORE_OK */ @@ -251,9 +253,11 @@ for (i = 0; i < urlcnt; i++) { u = &urls[i]; debug(52, 3) ("URL {%s}\n", u->url); - memBufPrintf(&mb, "%s", u->url, u->url); + memBufPrintf(&mb, + "%s", u->url, u->url); if (urls[i].rtt > 0) - memBufPrintf(&mb, "%4d ms", u->rtt); + memBufPrintf(&mb, + "%4d ms", u->rtt); else memBufPrintf(&mb, "Unknown"); memBufPrintf(&mb, @@ -264,7 +268,8 @@ "
\n" "
\n" "Generated by %s@%s\n" - "
\n", full_appname_string, getMyHostname()); + "\n", + full_appname_string, getMyHostname()); rep = e->mem_obj->reply; httpReplyReset(rep); httpReplySetHeaders(rep, 1.0, HTTP_MOVED_TEMPORARILY, NULL, Index: squid/src/wais.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/wais.c,v retrieving revision 1.1.1.2.4.1.2.1.2.1 retrieving revision 1.1.1.2.4.1.2.1.2.2 diff -u -r1.1.1.2.4.1.2.1.2.1 -r1.1.1.2.4.1.2.1.2.2 --- squid/src/wais.c 27 Aug 2001 21:48:22 -0000 1.1.1.2.4.1.2.1.2.1 +++ squid/src/wais.c 9 Sep 2001 15:25:56 -0000 1.1.1.2.4.1.2.1.2.2 @@ -1,5 +1,6 @@ + /* - * $Id: wais.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $ + * $Id: wais.c,v 1.1.1.2.4.1.2.1.2.2 2001/09/09 15:25:56 serassio Exp $ * * DEBUG: section 24 WAIS Relay * AUTHOR: Harvest Derived @@ -34,8 +35,7 @@ #define WAIS_C #include "squid.h" -typedef struct -{ +typedef struct { int fd; StoreEntry *entry; method_t method; @@ -43,8 +43,7 @@ char url[MAX_URL]; request_t *request; FwdState *fwd; -} -WaisStateData; +} WaisStateData; static PF waisStateFree; static PF waisTimeout; @@ -127,7 +126,8 @@ if (ignoreErrno(errno)) { /* reinstall handlers */ /* XXX This may loop forever */ - commSetSelect(fd, COMM_SELECT_READ, waisReadReply, waisState, 0); + commSetSelect(fd, COMM_SELECT_READ, + waisReadReply, waisState, 0); } else { ErrorState *err; EBIT_CLR(entry->flags, ENTRY_CACHABLE); @@ -152,7 +152,10 @@ comm_close(fd); } else { storeAppend(entry, buf, len); - commSetSelect(fd, COMM_SELECT_READ, waisReadReply, waisState, 0); + commSetSelect(fd, + COMM_SELECT_READ, + waisReadReply, + waisState, 0); } } @@ -181,7 +184,10 @@ comm_close(fd); } else { /* Schedule read reply. */ - commSetSelect(fd, COMM_SELECT_READ, waisReadReply, waisState, 0); + commSetSelect(fd, + COMM_SELECT_READ, + waisReadReply, + waisState, 0); commSetDefer(fd, fwdCheckDeferRead, entry); } } Index: squid/src/whois.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/whois.c,v retrieving revision 1.1.1.2.4.2.2.1.2.1 retrieving revision 1.1.1.2.4.2.2.1.2.2 diff -u -r1.1.1.2.4.2.2.1.2.1 -r1.1.1.2.4.2.2.1.2.2 --- squid/src/whois.c 27 Aug 2001 21:48:22 -0000 1.1.1.2.4.2.2.1.2.1 +++ squid/src/whois.c 9 Sep 2001 15:25:57 -0000 1.1.1.2.4.2.2.1.2.2 @@ -1,5 +1,6 @@ + /* - * $Id: whois.c,v 1.1.1.2.4.2.2.1.2.1 2001/08/27 21:48:22 tolsty Exp $ + * $Id: whois.c,v 1.1.1.2.4.2.2.1.2.2 2001/09/09 15:25:57 serassio Exp $ * * DEBUG: section 75 WHOIS protocol * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -36,13 +37,11 @@ #define WHOIS_PORT 43 -typedef struct -{ +typedef struct { StoreEntry *entry; request_t *request; FwdState *fwd; -} -WhoisState; +} WhoisState; static PF whoisClose; static PF whoisTimeout; @@ -101,14 +100,12 @@ kb_incr(&Counter.server.all.kbytes_in, len); kb_incr(&Counter.server.http.kbytes_in, len); storeAppend(entry, buf, len); - commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p, - Config.Timeout.read); + commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p, Config.Timeout.read); } else if (len < 0) { debug(50, 2) ("whoisReadReply: FD %d: read failure: %s.\n", fd, xstrerror()); if (ignoreErrno(errno)) { - commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p, - Config.Timeout.read); + commSetSelect(fd, COMM_SELECT_READ, whoisReadReply, p, Config.Timeout.read); } else if (mem->inmem_hi == 0) { ErrorState *err; err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR);