]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
some compilers cant grok variable names same as type names
authorwessels <>
Wed, 14 Oct 1998 05:33:29 +0000 (05:33 +0000)
committerwessels <>
Wed, 14 Oct 1998 05:33:29 +0000 (05:33 +0000)
src/acl.cc
src/cache_cf.cc
src/cbdata.cc
src/client_db.cc
src/comm.cc
src/net_db.cc
src/peer_select.cc

index e37f7e0bad9b116a2e0d781c43f57afc254fb0f0..6a4743b799a363c2965160fec360674cb55dfa75 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.184 1998/09/18 22:37:53 wessels Exp $
+ * $Id: acl.cc,v 1.185 1998/10/13 23:33:29 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -1151,123 +1151,123 @@ aclMatchTime(acl_time_data * data, time_t when)
 }
 
 static int
-aclMatchAcl(acl * acl, aclCheck_t * checklist)
+aclMatchAcl(acl * ae, aclCheck_t * checklist)
 {
     request_t *r = checklist->request;
     const ipcache_addrs *ia = NULL;
     const char *fqdn = NULL;
     char *esc_buf;
     int k;
-    if (!acl)
+    if (!ae)
        return 0;
-    debug(28, 3) ("aclMatchAcl: checking '%s'\n", acl->cfgline);
-    switch (acl->type) {
+    debug(28, 3) ("aclMatchAcl: checking '%s'\n", ae->cfgline);
+    switch (ae->type) {
     case ACL_SRC_IP:
-       return aclMatchIp(&acl->data, checklist->src_addr);
+       return aclMatchIp(&ae->data, checklist->src_addr);
        /* NOTREACHED */
     case ACL_DST_IP:
        ia = ipcache_gethostbyname(r->host, IP_LOOKUP_IF_MISS);
        if (ia) {
            for (k = 0; k < (int) ia->count; k++) {
-               if (aclMatchIp(&acl->data, ia->in_addrs[k]))
+               if (aclMatchIp(&ae->data, ia->in_addrs[k]))
                    return 1;
            }
            return 0;
        } else if (checklist->state[ACL_DST_IP] == ACL_LOOKUP_NONE) {
            debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",
-               acl->name, r->host);
+               ae->name, r->host);
            checklist->state[ACL_DST_IP] = ACL_LOOKUP_NEEDED;
            return 0;
        } else {
-           return aclMatchIp(&acl->data, no_addr);
+           return aclMatchIp(&ae->data, no_addr);
        }
        /* NOTREACHED */
     case ACL_DST_DOMAIN:
        if ((ia = ipcacheCheckNumeric(r->host)) == NULL)
-           return aclMatchDomainList(&acl->data, r->host);
+           return aclMatchDomainList(&ae->data, r->host);
        fqdn = fqdncache_gethostbyaddr(ia->in_addrs[0], FQDN_LOOKUP_IF_MISS);
        if (fqdn)
-           return aclMatchDomainList(&acl->data, fqdn);
+           return aclMatchDomainList(&ae->data, fqdn);
        if (checklist->state[ACL_DST_DOMAIN] == ACL_LOOKUP_NONE) {
            debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",
-               acl->name, inet_ntoa(ia->in_addrs[0]));
+               ae->name, inet_ntoa(ia->in_addrs[0]));
            checklist->state[ACL_DST_DOMAIN] = ACL_LOOKUP_NEEDED;
            return 0;
        }
-       return aclMatchDomainList(&acl->data, "none");
+       return aclMatchDomainList(&ae->data, "none");
        /* NOTREACHED */
     case ACL_SRC_DOMAIN:
        fqdn = fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);
        if (fqdn) {
-           return aclMatchDomainList(&acl->data, fqdn);
+           return aclMatchDomainList(&ae->data, fqdn);
        } else if (checklist->state[ACL_SRC_DOMAIN] == ACL_LOOKUP_NONE) {
            debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",
-               acl->name, inet_ntoa(checklist->src_addr));
+               ae->name, inet_ntoa(checklist->src_addr));
            checklist->state[ACL_SRC_DOMAIN] = ACL_LOOKUP_NEEDED;
            return 0;
        }
-       return aclMatchDomainList(&acl->data, "none");
+       return aclMatchDomainList(&ae->data, "none");
        /* NOTREACHED */
     case ACL_DST_DOM_REGEX:
        if ((ia = ipcacheCheckNumeric(r->host)) == NULL)
-           return aclMatchRegex(acl->data, r->host);
+           return aclMatchRegex(ae->data, r->host);
        fqdn = fqdncache_gethostbyaddr(ia->in_addrs[0], FQDN_LOOKUP_IF_MISS);
        if (fqdn)
-           return aclMatchRegex(acl->data, fqdn);
+           return aclMatchRegex(ae->data, fqdn);
        if (checklist->state[ACL_DST_DOMAIN] == ACL_LOOKUP_NONE) {
            debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",
-               acl->name, inet_ntoa(ia->in_addrs[0]));
+               ae->name, inet_ntoa(ia->in_addrs[0]));
            checklist->state[ACL_DST_DOMAIN] = ACL_LOOKUP_NEEDED;
            return 0;
        }
-       return aclMatchRegex(acl->data, "none");
+       return aclMatchRegex(ae->data, "none");
        /* NOTREACHED */
     case ACL_SRC_DOM_REGEX:
        fqdn = fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);
        if (fqdn) {
-           return aclMatchRegex(acl->data, fqdn);
+           return aclMatchRegex(ae->data, fqdn);
        } else if (checklist->state[ACL_SRC_DOMAIN] == ACL_LOOKUP_NONE) {
            debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",
-               acl->name, inet_ntoa(checklist->src_addr));
+               ae->name, inet_ntoa(checklist->src_addr));
            checklist->state[ACL_SRC_DOMAIN] = ACL_LOOKUP_NEEDED;
            return 0;
        }
-       return aclMatchRegex(acl->data, "none");
+       return aclMatchRegex(ae->data, "none");
        /* NOTREACHED */
     case ACL_TIME:
-       return aclMatchTime(acl->data, squid_curtime);
+       return aclMatchTime(ae->data, squid_curtime);
        /* NOTREACHED */
     case ACL_URLPATH_REGEX:
        esc_buf = xstrdup(strBuf(r->urlpath));
        rfc1738_unescape(esc_buf);
-       k = aclMatchRegex(acl->data, esc_buf);
+       k = aclMatchRegex(ae->data, esc_buf);
        safe_free(esc_buf);
        return k;
        /* NOTREACHED */
     case ACL_URL_REGEX:
        esc_buf = xstrdup(urlCanonical(r));
        rfc1738_unescape(esc_buf);
-       k = aclMatchRegex(acl->data, esc_buf);
+       k = aclMatchRegex(ae->data, esc_buf);
        safe_free(esc_buf);
        return k;
        /* NOTREACHED */
     case ACL_URL_PORT:
-       return aclMatchIntegerRange(acl->data, r->port);
+       return aclMatchIntegerRange(ae->data, r->port);
        /* NOTREACHED */
     case ACL_USER:
-       return aclMatchIdent(acl->data, checklist->ident);
+       return aclMatchIdent(ae->data, checklist->ident);
        /* NOTREACHED */
     case ACL_PROTO:
-       return aclMatchInteger(acl->data, r->protocol);
+       return aclMatchInteger(ae->data, r->protocol);
        /* NOTREACHED */
     case ACL_METHOD:
-       return aclMatchInteger(acl->data, r->method);
+       return aclMatchInteger(ae->data, r->method);
        /* NOTREACHED */
     case ACL_BROWSER:
-       return aclMatchRegex(acl->data, checklist->browser);
+       return aclMatchRegex(ae->data, checklist->browser);
        /* NOTREACHED */
     case ACL_PROXY_AUTH:
-       k = aclMatchProxyAuth(acl->data, checklist);
+       k = aclMatchProxyAuth(ae->data, checklist);
        if (k == 0) {
            /* no such user OR we need a proxy authentication header */
            checklist->state[ACL_PROXY_AUTH] = ACL_PROXY_AUTH_NEEDED;
@@ -1284,33 +1284,33 @@ aclMatchAcl(acl * acl, aclCheck_t * checklist)
        }
        /* NOTREACHED */
     case ACL_SNMP_COMM:
-       return asnMatchIp(acl->data, checklist->src_addr);
+       return asnMatchIp(ae->data, checklist->src_addr);
     case ACL_SRC_ASN:
-       return asnMatchIp(acl->data, checklist->src_addr);
+       return asnMatchIp(ae->data, checklist->src_addr);
     case ACL_DST_ASN:
        ia = ipcache_gethostbyname(r->host, IP_LOOKUP_IF_MISS);
        if (ia) {
            for (k = 0; k < (int) ia->count; k++) {
-               if (asnMatchIp(acl->data, ia->in_addrs[k]))
+               if (asnMatchIp(ae->data, ia->in_addrs[k]))
                    return 1;
            }
            return 0;
        } else if (checklist->state[ACL_DST_ASN] == ACL_LOOKUP_NONE) {
            debug(28, 3) ("asnMatchAcl: Can't yet compare '%s' ACL for '%s'\n",
-               acl->name, r->host);
+               ae->name, r->host);
            checklist->state[ACL_DST_ASN] = ACL_LOOKUP_NEEDED;
        } else {
-           return asnMatchIp(acl->data, no_addr);
+           return asnMatchIp(ae->data, no_addr);
        }
        return 0;
 #if USE_ARP_ACL
     case ACL_SRC_ARP:
-       return aclMatchArp(&acl->data, checklist->src_addr);
+       return aclMatchArp(&ae->data, checklist->src_addr);
 #endif
     case ACL_NONE:
     default:
        debug(28, 0) ("aclMatchAcl: '%s' has bad type %d\n",
-           acl->name, acl->type);
+           ae->name, ae->type);
        return 0;
     }
     /* NOTREACHED */
index 746ea8dec7380994abebd13efa640bda7904a8c3..0d858697a9968e1e1fd045ce412d21b49262c316 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.306 1998/10/10 14:57:37 wessels Exp $
+ * $Id: cache_cf.cc,v 1.307 1998/10/13 23:33:31 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -416,35 +416,35 @@ parseBytesUnits(const char *unit)
  *****************************************************************************/
 
 static void
-dump_acl(StoreEntry * entry, const char *name, acl * acl)
+dump_acl(StoreEntry * entry, const char *name, acl * ae)
 {
     wordlist *w;
     wordlist *v;
-    while (acl != NULL) {
-       v = w = aclDumpGeneric(acl);
+    while (ae != NULL) {
+       v = w = aclDumpGeneric(ae);
        while (v != NULL) {
            storeAppendPrintf(entry, "%s %s %s %s\n",
                name,
-               acl->name,
-               aclTypeToStr(acl->type),
+               ae->name,
+               aclTypeToStr(ae->type),
                v->key);
            v = v->next;
        }
        wordlistDestroy(&w);
-       acl = acl->next;
+       ae = ae->next;
     }
 }
 
 static void
-parse_acl(acl ** acl)
+parse_acl(acl ** ae)
 {
-    aclParseAclLine(acl);
+    aclParseAclLine(ae);
 }
 
 static void
-free_acl(acl ** acl)
+free_acl(acl ** ae)
 {
-    aclDestroyAcls(acl);
+    aclDestroyAcls(ae);
 }
 
 #if SQUID_SNMP
index 8fbcfd61a3481193043620482205cdf807df0c99..b10efe8a08242827bb0228078dc4e8f433303bd3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cbdata.cc,v 1.24 1998/07/22 20:37:05 wessels Exp $
+ * $Id: cbdata.cc,v 1.25 1998/10/13 23:33:31 wessels Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -113,7 +113,7 @@ void
 #if CBDATA_DEBUG
 cbdataAddDbg(const void *p, mem_type mem_type, const char *file, int line)
 #else
-cbdataAdd(const void *p, mem_type mem_type)
+cbdataAdd(const void *p, mem_type mtype)
 #endif
 {
     cbdata *c;
@@ -124,7 +124,7 @@ cbdataAdd(const void *p, mem_type mem_type)
     c = xcalloc(1, sizeof(cbdata));
     c->key = p;
     c->valid = 1;
-    c->mem_type = mem_type;
+    c->mem_type = mtype;
 #if CBDATA_DEBUG
     c->file = file;
     c->line = line;
@@ -136,18 +136,18 @@ cbdataAdd(const void *p, mem_type mem_type)
 static void
 cbdataReallyFree(cbdata * c)
 {
-    mem_type mem_type = c->mem_type;
+    mem_type mtype = c->mem_type;
     void *p = (void *) c->key;
     hash_remove_link(htable, (hash_link *) c);
     cbdataCount--;
     xfree(c);
-    if (mem_type == MEM_DONTFREE)
+    if (mtype == MEM_DONTFREE)
        return;
     debug(45, 3) ("cbdataReallyFree: Freeing %p\n", p);
-    if (mem_type == MEM_NONE)
+    if (mtype == MEM_NONE)
        xfree(p);
     else
-       memFree(mem_type, p);
+       memFree(mtype, p);
 }
 
 void
index 82b7cb0c0e79bc5b7fd68d938a5c365e278a8a72..132dad20f3bb8c8b7f33d6d3d88a9851ca49d8cb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_db.cc,v 1.41 1998/09/29 16:33:42 wessels Exp $
+ * $Id: client_db.cc,v 1.42 1998/10/13 23:33:32 wessels Exp $
  *
  * DEBUG: section 0     Client Database
  * AUTHOR: Duane Wessels
@@ -64,7 +64,7 @@ clientdbInit(void)
 }
 
 void
-clientdbUpdate(struct in_addr addr, log_type log_type, protocol_t p, size_t size)
+clientdbUpdate(struct in_addr addr, log_type ltype, protocol_t p, size_t size)
 {
     char *key;
     ClientInfo *c;
@@ -78,15 +78,15 @@ clientdbUpdate(struct in_addr addr, log_type log_type, protocol_t p, size_t size
        debug_trap("clientdbUpdate: Failed to add entry");
     if (p == PROTO_HTTP) {
        c->Http.n_requests++;
-       c->Http.result_hist[log_type]++;
+       c->Http.result_hist[ltype]++;
        kb_incr(&c->Http.kbytes_out, size);
-       if (isTcpHit(log_type))
+       if (isTcpHit(ltype))
            kb_incr(&c->Http.hit_kbytes_out, size);
     } else if (p == PROTO_ICP) {
        c->Icp.n_requests++;
-       c->Icp.result_hist[log_type]++;
+       c->Icp.result_hist[ltype]++;
        kb_incr(&c->Icp.kbytes_out, size);
-       if (LOG_UDP_HIT == log_type)
+       if (LOG_UDP_HIT == ltype)
            kb_incr(&c->Icp.hit_kbytes_out, size);
     }
 }
index 2c63f75a2f648ce4422c00647cd0bc3387e912bf..295f728046986f4259fe34e31f5bd2336dffd567 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.289 1998/10/08 20:10:19 wessels Exp $
+ * $Id: comm.cc,v 1.290 1998/10/13 23:33:33 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -448,7 +448,7 @@ comm_connect_addr(int sock, const struct sockaddr_in *address)
 /* Wait for an incoming connection on FD.  FD should be a socket returned
  * from comm_listen. */
 int
-comm_accept(int fd, struct sockaddr_in *peer, struct sockaddr_in *me)
+comm_accept(int fd, struct sockaddr_in *pn, struct sockaddr_in *me)
 {
     int sock;
     struct sockaddr_in P;
@@ -469,8 +469,8 @@ comm_accept(int fd, struct sockaddr_in *peer, struct sockaddr_in *me)
            return COMM_ERROR;
        }
     }
-    if (peer)
-       *peer = P;
+    if (pn)
+       *pn = P;
     Slen = sizeof(M);
     memset(&M, '\0', Slen);
     getsockname(sock, (struct sockaddr *) &M, &Slen);
index 7fe425e8683d84e63a45153febf10f14b70d2033..54b0e27076c285965a7bdc3930c4c8bd34214fa8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.130 1998/09/25 18:31:27 wessels Exp $
+ * $Id: net_db.cc,v 1.131 1998/10/13 23:33:34 wessels Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -804,14 +804,14 @@ netdbHostData(const char *host, int *samp, int *rtt, int *hops)
 }
 
 int
-netdbHostPeerRtt(const char *host, peer * peer)
+netdbHostPeerRtt(const char *host, peer * p)
 {
 #if USE_ICMP
     const netdbEntry *n = netdbLookupHost(host);
     if (n) {
-       const net_db_peer *p = netdbPeerByName(n, peer->host);
-       if (p && p->expires >= squid_curtime)
-           return (int) (p->rtt + 0.5);
+       const net_db_peer *np = netdbPeerByName(n, p->host);
+       if (np && np->expires >= squid_curtime)
+           return (int) (np->rtt + 0.5);
     }
 #endif
     return 0;
index 529d27118297b16ace15aeb44d41e116f07f9c60..98164f177e3bb7ed0e7d76f3342f1ed167907e53 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.87 1998/10/12 21:41:00 wessels Exp $
+ * $Id: peer_select.cc,v 1.88 1998/10/13 23:33:35 wessels Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -553,13 +553,13 @@ peerHtcpParentMiss(peer * p, htcpReplyData * htcp, ps_state * ps)
 #endif
 
 static void
-peerHandlePingReply(peer * p, peer_t type, protocol_t proto, void *ping_data, void *data)
+peerHandlePingReply(peer * p, peer_t type, protocol_t proto, void *pingdata, void *data)
 {
     if (proto == PROTO_ICP)
-       peerHandleIcpReply(p, type, ping_data, data);
+       peerHandleIcpReply(p, type, pingdata, data);
 #if USE_HTCP
     else if (proto == PROTO_HTCP)
-       peerHandleHtcpReply(p, type, ping_data, data);
+       peerHandleHtcpReply(p, type, pingdata, data);
 #endif
     else
        debug(44, 1) ("peerHandlePingReply: unknown protocol_t %d\n", (int) proto);