diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-12-23 08:52:02 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-12-23 08:52:02 +0000 |
commit | fb86d0e76d280c544f28ff1396c706f4e19d77ca (patch) | |
tree | 2a5df28281e6f46e542a2f624d287a27734da3ef /src/server/httpd | |
parent | 6e1184dcffaf807476ab312404c1bc0a32c38c36 (diff) | |
download | openocd+libswd-fb86d0e76d280c544f28ff1396c706f4e19d77ca.tar.gz openocd+libswd-fb86d0e76d280c544f28ff1396c706f4e19d77ca.tar.bz2 openocd+libswd-fb86d0e76d280c544f28ff1396c706f4e19d77ca.tar.xz openocd+libswd-fb86d0e76d280c544f28ff1396c706f4e19d77ca.zip |
httpd wip
git-svn-id: svn://svn.berlios.de/openocd/trunk@1272 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server/httpd')
-rw-r--r-- | src/server/httpd/build.sh | 2 | ||||
-rw-r--r-- | src/server/httpd/erase.tcl | 2 | ||||
-rw-r--r-- | src/server/httpd/httpd.tcl | 6 | ||||
-rw-r--r-- | src/server/httpd/menu.xml | 6 | ||||
-rw-r--r-- | src/server/httpd/openocd.tcl | 4 |
5 files changed, 11 insertions, 9 deletions
diff --git a/src/server/httpd/build.sh b/src/server/httpd/build.sh index 93831a50..8824debf 100644 --- a/src/server/httpd/build.sh +++ b/src/server/httpd/build.sh @@ -1,3 +1,5 @@ set e java -classpath ../../../../zy1000/build/xalan.jar\;. Stylizer menu.xsl menu.xml . find . -regex ".*\.tcl" -type f -exec sh html2tcl.sh {} {} \; +echo "Copy .tcl files to /usr/local/lib/openocd/httpd/" +cp *.tcl /usr/local/lib/openocd/httpd/
\ No newline at end of file diff --git a/src/server/httpd/erase.tcl b/src/server/httpd/erase.tcl index 3c29840d..fa921073 100644 --- a/src/server/httpd/erase.tcl +++ b/src/server/httpd/erase.tcl @@ -161,7 +161,7 @@ append buffer { set form_length 0x10000
}
if {[string compare $form_address ""]==0} {
- if {[catch {[zy1000_flash]} result]==0} {
+ if {[catch {[first_flash_base]} result]==0} {
set form_address "0x[tohex $result]"
}
}
diff --git a/src/server/httpd/httpd.tcl b/src/server/httpd/httpd.tcl index 607660cc..a8bce162 100644 --- a/src/server/httpd/httpd.tcl +++ b/src/server/httpd/httpd.tcl @@ -102,12 +102,12 @@ proc encode {a} { # catch any exceptions, capture output and return it
proc capture_catch {a} {
catch {
- return [eval {capture $a}]
+ capture {uplevel $a}
} result
- return $result
+ return $result
}
-proc zy1000_flash {} {
+proc first_flash_base {} {
set t [lindex 0 [ocd_flash_banks]]
return $t(base)
}
diff --git a/src/server/httpd/menu.xml b/src/server/httpd/menu.xml index 11daef94..26ecf7a9 100644 --- a/src/server/httpd/menu.xml +++ b/src/server/httpd/menu.xml @@ -438,7 +438,7 @@ set form_length 0x10000
}
if {[string compare $form_address ""]==0} {
- if {[catch {[zy1000_flash]} result]==0} {
+ if {[catch {[first_flash_base]} result]==0} {
set form_address "0x[tohex $result]"
}
}
@@ -794,8 +794,8 @@ append console [encode [capture_catch poll]] set form_command [formfetch form_command]
set form_edittext ""
- if {[string length $form_command]>0} {
- catch {capture_catch {eval "$form_command"}} form_edittext
+ if {[string length $form_command]>0} {
+ set form_edittext [capture_catch {eval $form_command}]
}
append buffer {<form action="openocd.tcl" method="post">} "\n"
diff --git a/src/server/httpd/openocd.tcl b/src/server/httpd/openocd.tcl index cb28026e..4fed3877 100644 --- a/src/server/httpd/openocd.tcl +++ b/src/server/httpd/openocd.tcl @@ -154,8 +154,8 @@ append buffer { set form_command [formfetch form_command]
set form_edittext ""
- if {[string length $form_command]>0} {
- catch {capture_catch {eval "$form_command"}} form_edittext
+ if {[string length $form_command]>0} {
+ set form_edittext [capture_catch {eval $form_command}]
}
append buffer {<form action="openocd.tcl" method="post">} "\n"
|