projects
/
tclrobot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93e08ec
)
Use simpler regular expression to avoid Tcl regsub error (Tcl8.0.4-5).
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 7 Nov 2001 11:50:07 +0000
(11:50 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 7 Nov 2001 11:50:07 +0000
(11:50 +0000)
hswitch.c
patch
|
blob
|
history
robot.tcl
patch
|
blob
|
history
diff --git
a/hswitch.c
b/hswitch.c
index
7c7f5c3
..
c55e66d
100644
(file)
--- a/
hswitch.c
+++ b/
hswitch.c
@@
-1,5
+1,5
@@
/*
/*
- * $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>
*/
#include <assert.h>
#include <string.h>
@@
-172,7
+172,6
@@
static int tagEnd (Tcl_Interp *interp, struct tagInfo *tag,
memcpy (value, tag->body_start, body_end - tag->body_start);
value[body_end - tag->body_start] = '\0';
Tcl_SetVar (interp, "body", value, 0);
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];
while (tp)
{
char vname[TAG_MAX_LEN+30];
@@
-186,6
+185,7
@@
static int tagEnd (Tcl_Interp *interp, struct tagInfo *tag,
free (tp0);
}
tcl_err = Tcl_Eval (interp, tag->code);
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);
if (tcl_err == TCL_ERROR)
{
printf ("Error: code=%d %s\n", tcl_err, interp->result);
diff --git
a/robot.tcl
b/robot.tcl
index
b49ca0b
..
2e175d6
100755
(executable)
--- a/
robot.tcl
+++ b/
robot.tcl
@@
-1,5
+1,5
@@
#!/usr/bin/tclsh
#!/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"
#
proc RobotFileNext1 {area lead} {
# puts "RobotFileNext1 area=$area lead=$lead"
@@
-441,8
+441,9
@@
proc RobotTextHtml {url out} {
}
puts $out {></meta>}
} body {
}
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>"
puts $out "<documentcontent>"
puts $out $nbody
puts $out "</documentcontent>"