From: wessels <> Date: Sat, 9 May 1998 05:29:25 +0000 (+0000) Subject: removed old, unused code X-Git-Tag: SQUID_3_0_PRE1~3356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef849d44f88a13633b9f5001a4ebb52ace48760b;p=thirdparty%2Fsquid.git removed old, unused code --- diff --git a/src/asn.cc b/src/asn.cc index fe6f562572..08a055d89e 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,5 +1,5 @@ /* - * $Id: asn.cc,v 1.32 1998/05/01 17:37:12 wessels Exp $ + * $Id: asn.cc,v 1.33 1998/05/08 23:29:25 wessels Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -292,15 +292,11 @@ asnAddNet(char *as_string, int as_number) *t = '\0'; addr = inet_addr(as_string); bitl = atoi(t + 1); -#if 0 - mask = (1 << bitl) - 1; -#else if (bitl < 0) bitl = 0; if (bitl > 32) bitl = 32; mask = bitl ? 0xfffffffful << (32 - bitl) : 0; -#endif in_a.s_addr = addr; in_m.s_addr = mask; diff --git a/src/errorpage.cc b/src/errorpage.cc index d0ced48205..51822a12eb 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.130 1998/05/08 22:35:06 wessels Exp $ + * $Id: errorpage.cc,v 1.131 1998/05/08 23:29:26 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -242,12 +242,10 @@ errorAppendEntry(StoreEntry * entry, ErrorState * err) { HttpReply *rep; MemObject *mem = entry->mem_obj; -#if 0 /* * Kostas sez PUT "success" replies might not be STORE_PENDING? */ - assert(entry->store_status == STORE_PENDING); -#endif + /* assert(entry->store_status == STORE_PENDING); */ assert(mem != NULL); assert(mem->inmem_hi == 0); storeBuffer(entry); diff --git a/src/ipcache.cc b/src/ipcache.cc index 61d96c08b0..ea46ae8e20 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.182 1998/04/24 07:09:37 wessels Exp $ + * $Id: ipcache.cc,v 1.183 1998/05/08 23:29:27 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -879,30 +879,6 @@ ipcacheUnlockEntry(ipcache_entry * i) ipcache_release(i); } -#if OLD_CODE -void -ipcacheCycleAddr(const char *name) -{ - ipcache_entry *i; - unsigned char fullcircle; - if ((i = ipcache_get(name)) == NULL) - return; - if (i->status != IP_CACHED) - return; - ia = &i->addrs; - fullcircle = ia->cur; - while (ia->bad_mask[ia->cur]) { - if (++ia->cur == ia->count) - ia->cur = 0; - if (ia->cur == fullcircle) { /* All bad, just use next one */ - if (++ia->cur == ia->count) - ia->cur = 0; - break; - } - } -} -#endif - void ipcacheCycleAddr(const char *name, ipcache_addrs * ia) { diff --git a/src/mime.cc b/src/mime.cc index 871e96039e..e4ae6fda02 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,6 +1,6 @@ /* - * $Id: mime.cc,v 1.64 1998/05/05 03:49:59 wessels Exp $ + * $Id: mime.cc,v 1.65 1998/05/08 23:29:28 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -184,27 +184,6 @@ mime_get_header_field(const char *mime, const char *name, const char *prefix) return NULL; } -#if OLD_CODE -/* need to take the lowest, non-zero pointer to the end of the headers. - * The headers end at the first empty line */ -char * -mime_headers_end(const char *mime) -{ - const char *p1, *p2; - const char *end = NULL; - p1 = strstr(mime, "\n\r\n"); - p2 = strstr(mime, "\n\n"); - if (p1 && p2) - end = p1 < p2 ? p1 : p2; - else - end = p1 ? p1 : p2; - if (end) - end += (end == p1 ? 3 : 2); - return (char *) end; -} - -#endif - size_t headersEnd(const char *mime, size_t l) { diff --git a/src/net_db.cc b/src/net_db.cc index de989a97d4..082cba1803 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -1,6 +1,6 @@ /* - * $Id: net_db.cc,v 1.94 1998/05/08 21:22:16 wessels Exp $ + * $Id: net_db.cc,v 1.95 1998/05/08 23:29:28 wessels Exp $ * * DEBUG: section 37 Network Measurement Database * AUTHOR: Duane Wessels @@ -863,9 +863,6 @@ variable_list * snmp_netdbFn(variable_list * Var, snint * ErrP) { variable_list *Answer; -#if 0 - int cnt; -#endif static char key[15]; static netdbEntry *n = NULL; diff --git a/src/store_client.cc b/src/store_client.cc index 6dc87067b3..f797074b28 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -430,21 +430,6 @@ storePendingNClients(const StoreEntry * e) { MemObject *mem = e->mem_obj; int npend = NULL == mem ? 0 : mem->nclients; -#if OLD_CODE - store_client *sc; - store_client *nx = NULL; - if (mem == NULL) - return 0; - for (sc = mem->clients; sc; sc = nx) { - nx = sc->next; - /* Changed from callback_data to just callback. There can be no use */ - /* for callback_data without a callback, and sc->callback we know */ - /* gets reset, but not necessarily sc->callback_data */ - if (sc->callback == NULL) - continue; - npend++; - } -#endif debug(20, 3) ("storePendingNClients: returning %d\n", npend); return npend; } diff --git a/src/store_dir.cc b/src/store_dir.cc index 333bfd5db6..43b5150338 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.65 1998/05/07 20:49:19 wessels Exp $ + * $Id: store_dir.cc,v 1.66 1998/05/08 23:29:30 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -638,13 +638,6 @@ storeDirWriteCleanLogs(int reopen) if (store_rebuilding) { debug(20, 1) ("Not currently OK to rewrite swap log.\n"); debug(20, 1) ("storeDirWriteCleanLogs: Operation aborted.\n"); -#if DONT - /* - * why did we want to close the current swap logs here? - * DW/1.2.beta19 - */ - storeDirCloseSwapLogs(); -#endif return 0; } debug(20, 1) ("storeDirWriteCleanLogs: Starting...\n"); diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 8afb33677c..e5835cf12e 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -1,5 +1,5 @@ /* - * $Id: store_rebuild.cc,v 1.35 1998/04/27 19:16:12 wessels Exp $ + * $Id: store_rebuild.cc,v 1.36 1998/05/08 23:29:30 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -179,17 +179,6 @@ storeRebuildFromDirectory(rebuild_dir * d) continue; } tmpe.key = key; -#if OLD_CODE - if (tmpe.swap_file_sz == 0) { - RebuildState.invalid++; - x = log(++RebuildState.zero_object_sz) / log(10.0); - if (0.0 == x - (double) (int) x) - debug(20, 1) ("WARNING: %d swapfiles found with ZERO size\n", - RebuildState.zero_object_sz); - storeUnlinkFileno(sfileno); - continue; - } -#endif /* check sizes */ if (tmpe.swap_file_sz == 0) { tmpe.swap_file_sz = sb.st_size; diff --git a/src/url.cc b/src/url.cc index adb10b7505..b6b1ac6b52 100644 --- a/src/url.cc +++ b/src/url.cc @@ -1,6 +1,6 @@ /* - * $Id: url.cc,v 1.90 1998/05/08 06:34:59 wessels Exp $ + * $Id: url.cc,v 1.91 1998/05/08 23:29:31 wessels Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels @@ -277,11 +277,7 @@ urlParse(method_t method, char *url) xstrncpy(request->host, host, SQUIDHOSTNAMELEN); xstrncpy(request->login, login, MAX_LOGIN_SZ); request->port = (u_short) port; -#if OLD_CODE - xstrncpy(request->urlpath, urlpath, MAX_URL); -#else stringReset(&request->urlpath, urlpath); -#endif request->max_age = -1; request->max_forwards = -1; return request; @@ -295,11 +291,7 @@ urnParse(method_t method, char *urn) request = memAllocate(MEM_REQUEST_T); request->method = method; request->protocol = PROTO_URN; -#if OLD_CODE - xstrncpy(request->urlpath, &urn[4], MAX_URL); -#else stringReset(&request->urlpath, urn + 4); -#endif request->max_age = -1; request->max_forwards = -1; return request; diff --git a/src/urn.cc b/src/urn.cc index 7b3f527b4e..091bcec4b7 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -1,7 +1,7 @@ /* * - * $Id: urn.cc,v 1.30 1998/05/08 21:59:49 wessels Exp $ + * $Id: urn.cc,v 1.31 1998/05/08 23:29:32 wessels Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis @@ -113,14 +113,8 @@ urnStart(request_t * r, StoreEntry * e) if (strncasecmp(strBuf(r->urlpath), "menu.", 5) == 0) { char *new_path = xstrdup(strBuf(r->urlpath) + 5); EBIT_SET(urnState->flags, URN_FORCE_MENU); -#if OLD_CODE - t = xstrdup(strBuf(r->urlpath) + 5); - xstrncpy(r->urlpath, t, MAX_URL); - xfree(t); -#else stringReset(&r->urlpath, new_path); xfree(new_path); -#endif } if ((t = strChr(r->urlpath, ':')) != NULL) { strSet(r->urlpath, t, '\0');