/*
- * $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)
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 {
value = NULL;
- debug (86,5) ("ESIAssign: Processed %p\n",this);
+ debugs(86, 5, "ESIAssign: Processed " << this);
return ESI_PROCESS_COMPLETE;
}
/* XXX: Implement evaluation of the expression */
ESISegment::ListAppend (state.getOutput(), expression.buf(), expression.size());
}
+
+#endif /* USE_SQUID_ESI == 1 */