From: robertc <> Date: Tue, 11 Mar 2003 03:12:43 +0000 (+0000) Subject: Summary: Merge in 6th set of windows changes from Guido X-Git-Tag: SQUID_3_0_PRE1~269 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a748a3909bcce9f9282d939fe157974d66aabe7a;p=thirdparty%2Fsquid.git Summary: Merge in 6th set of windows changes from Guido Keywords: Merge in 6th set of windows changes from Guido --- diff --git a/src/ACLMaxUserIP.cc b/src/ACLMaxUserIP.cc index b52d135d6a..842132e68c 100644 --- a/src/ACLMaxUserIP.cc +++ b/src/ACLMaxUserIP.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLMaxUserIP.cc,v 1.1 2003/02/25 12:16:55 robertc Exp $ + * $Id: ACLMaxUserIP.cc,v 1.2 2003/03/10 20:12:43 robertc Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -48,10 +48,10 @@ ACLMaxUserIP::clone() const return new ACLMaxUserIP(*this); } -ACLMaxUserIP::ACLMaxUserIP (char const *theClass) : class_ (theClass), max(0) +ACLMaxUserIP::ACLMaxUserIP (char const *theClass) : class_ (theClass), maximum(0) {} -ACLMaxUserIP::ACLMaxUserIP (ACLMaxUserIP const & old) :class_ (old.class_), max (old.max), flags (old.flags) +ACLMaxUserIP::ACLMaxUserIP (ACLMaxUserIP const & old) :class_ (old.class_), maximum (old.maximum), flags (old.flags) {} MemPool *ACLMaxUserIP::Pool(NULL); @@ -91,13 +91,13 @@ ACLMaxUserIP::typeString() const bool ACLMaxUserIP::valid () const { - return max != 0; + return maximum != 0; } void ACLMaxUserIP::parse() { - if (max) { + if (maximum) { debug(28, 1) ("Attempting to alter already set User max IP acl\n"); return; } @@ -118,9 +118,9 @@ ACLMaxUserIP::parse() if (!t) fatal("aclParseUserMaxIP: Malformed ACL\n"); - max = atoi(t); + maximum = atoi(t); - debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) max); + debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) maximum); return; } @@ -141,7 +141,7 @@ ACLMaxUserIP::match(auth_user_request_t * auth_user_request, * one off is currently undecided (RBC) */ - if (authenticateAuthUserRequestIPCount(auth_user_request) <= max) + if (authenticateAuthUserRequestIPCount(auth_user_request) <= maximum) return 0; /* this is a match */ @@ -185,7 +185,7 @@ ACLMaxUserIP::match(ACLChecklist *checklist) wordlist * ACLMaxUserIP::dump() const { - if (!max) + if (!maximum) return NULL; wordlist *W = NULL; @@ -195,7 +195,7 @@ ACLMaxUserIP::dump() const char buf[128]; - snprintf(buf, sizeof(buf), "%lu", (unsigned long int) max); + snprintf(buf, sizeof(buf), "%lu", (unsigned long int) maximum); wordlistAdd(&W, buf); diff --git a/src/DelayBucket.cc b/src/DelayBucket.cc index fb83dff087..3c7966518a 100644 --- a/src/DelayBucket.cc +++ b/src/DelayBucket.cc @@ -1,6 +1,6 @@ /* - * $Id: DelayBucket.cc,v 1.4 2003/03/08 09:43:49 robertc Exp $ + * $Id: DelayBucket.cc,v 1.5 2003/03/10 20:12:43 robertc Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -77,9 +77,9 @@ DelayBucket::update (DelaySpec const &rate, int incr) } int -DelayBucket::bytesWanted (int min, int max) const +DelayBucket::bytesWanted (int minimum, int maximum) const { - int result = XMAX(min, XMIN(max, level())); + int result = max(minimum, min(maximum, level())); return result; } diff --git a/src/DelayId.cc b/src/DelayId.cc index bb39223d1e..10a7ec0d7f 100644 --- a/src/DelayId.cc +++ b/src/DelayId.cc @@ -1,6 +1,6 @@ /* - * $Id: DelayId.cc,v 1.5 2003/03/04 01:40:25 robertc Exp $ + * $Id: DelayId.cc,v 1.6 2003/03/10 20:12:43 robertc Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -134,18 +134,18 @@ DelayId::setNoDelay(bool const newValue) * into account bytes already buffered - that is up to the caller. */ int -DelayId::bytesWanted(int min, int max) const +DelayId::bytesWanted(int minimum, int maximum) const { /* unlimited */ if (! (*this) || markedAsNoDelay) - return XMAX(min, max); + return max(minimum, maximum); /* limited */ - int nbytes = XMAX(min, max); + int nbytes = max(minimum, maximum); if (compositeId.getRaw()) - nbytes = compositeId->bytesWanted(min, nbytes); + nbytes = compositeId->bytesWanted(minimum, nbytes); return nbytes; } diff --git a/src/DelayVector.cc b/src/DelayVector.cc index 7d632c53ab..882d88a4de 100644 --- a/src/DelayVector.cc +++ b/src/DelayVector.cc @@ -1,6 +1,6 @@ /* - * $Id: DelayVector.cc,v 1.4 2003/03/04 01:40:25 robertc Exp $ + * $Id: DelayVector.cc,v 1.5 2003/03/10 20:12:43 robertc Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -164,17 +164,17 @@ DelayVector::Id::~Id() } int -DelayVector::Id::bytesWanted (int min, int max) const +DelayVector::Id::bytesWanted (int minimum, int maximum) const { - int nbytes = max; + int nbytes = maximum; const_iterator pos = ids.begin(); while (pos != ids.end()) { - nbytes = XMIN (nbytes, (*pos)->bytesWanted(min, nbytes)); + nbytes = min (nbytes, (*pos)->bytesWanted(minimum, nbytes)); ++pos; } - nbytes = XMAX(min, nbytes); + nbytes = max(minimum, nbytes); return nbytes; }