]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ESIAssign.cc
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / src / ESIAssign.cc
index 3a5fdc81521f95433dffa0078a183c8c50bee351..67508e1697e90a44e129b5b91fb073b35d11d27b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIAssign.cc,v 1.2 2003/08/04 22:14:40 robertc Exp $
+ * $Id$
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  ;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
 
 #include "squid.h"
+
+/* MS Visual Studio Projects are monolithic, so we need the following
+ * #if to exclude the ESI code from compile process when not needed.
+ */
+#if (USE_SQUID_ESI == 1)
+
 #include "ESIAssign.h"
 #include "ESIContext.h"
 #include "ESISequence.h"
 
-MemPool *ESIAssign::Pool = NULL;
-
-void *
-ESIAssign::operator new (size_t byteCount)
-{
-    assert (byteCount == sizeof (ESIAssign));
-
-    if (!Pool)
-        Pool = memPoolCreate ("ESIAssign", sizeof (ESIAssign));
-
-    return memPoolAlloc(Pool);
-}
-
-void
-ESIAssign::operator delete (void *address)
-{
-    memPoolFree (Pool, address);
-}
-
 ESIAssign::~ESIAssign()
 {
     if (value)
@@ -74,14 +61,14 @@ ESIAssign::ESIAssign (esiTreeParentPtr aParent, int attrcount, char const **attr
     for (int i = 0; i < attrcount && attr[i]; i += 2) {
         if (!strcmp(attr[i],"name")) {
             /* the variables name is ...  */
-            debug (86,5)("ESIAssign::ESIAssign: Variable name '%s'\n",attr[i+1]);
+            debugs(86, 5, "ESIAssign::ESIAssign: Variable name '" << attr[i+1] << "'");
             /* If there are duplicate name attributes, we simply use the
              * last one
              */
             name = attr[i+1];
         } else if (!strcmp(attr[i],"value")) {
             /* short form assignment:  */
-            debug (86,5)("ESIAssign::ESIAssign: Unevaluated variable '%s'\n",attr[i+1]);
+            debugs(86, 5, "ESIAssign::ESIAssign: Unevaluated variable '" << attr[i+1] << "'");
             /* Again, if there are duplicate attributes, we use the last */
             unevaluatedVariable = attr[i+1];
         } else {
@@ -140,7 +127,7 @@ ESIAssign::process (int dovars)
 
     value = NULL;
 
-    debug (86,5) ("ESIAssign: Processed %p\n",this);
+    debugs(86, 5, "ESIAssign: Processed " << this);
 
     return ESI_PROCESS_COMPLETE;
 }
@@ -209,3 +196,5 @@ ESIVariableExpression::eval (ESIVarState &state, char const *subref, char const
     /* XXX: Implement evaluation of the expression */
     ESISegment::ListAppend (state.getOutput(), expression.buf(), expression.size());
 }
+
+#endif /* USE_SQUID_ESI == 1 */