/*
- * $Id: hswitch.c,v 1.3 2000/12/07 20:16:11 adam Exp $
+ * $Id: hswitch.c,v 1.4 2001/11/07 11:50:07 adam Exp $
*/
#include <assert.h>
#include <string.h>
memcpy (value, tag->body_start, body_end - tag->body_start);
value[body_end - tag->body_start] = '\0';
Tcl_SetVar (interp, "body", value, 0);
- free (value);
while (tp)
{
char vname[TAG_MAX_LEN+30];
free (tp0);
}
tcl_err = Tcl_Eval (interp, tag->code);
+ free (value);
if (tcl_err == TCL_ERROR)
{
printf ("Error: code=%d %s\n", tcl_err, interp->result);
#!/usr/bin/tclsh
-# $Id: robot.tcl,v 1.24 2001/11/07 11:30:52 adam Exp $
+# $Id: robot.tcl,v 1.25 2001/11/07 11:50:07 adam Exp $
#
proc RobotFileNext1 {area lead} {
# puts "RobotFileNext1 area=$area lead=$lead"
}
puts $out {></meta>}
} body {
- regsub -all -nocase {<script([^<]|(<!.*>))*</script>} $body {} abody
- regsub -all {<[^\>]+>} $abody {} nbody
+ regsub -all {<!--[^-]*->} $body { } abody
+ regsub -all -nocase {<script[^<]*</script>} $abody {} bbody
+ regsub -all {<[^\>]+>} $bbody {} nbody
puts $out "<documentcontent>"
puts $out $nbody
puts $out "</documentcontent>"