summaryrefslogtreecommitdiff
path: root/src/server/httpd/httpd.tcl
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-23 12:52:14 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-23 12:52:14 +0000
commitec7a984b42f5f7e6192963f0c09340227fdfa829 (patch)
treeaf946ebbbc656776881a649f8eb1c3f094c0147a /src/server/httpd/httpd.tcl
parentfb86d0e76d280c544f28ff1396c706f4e19d77ca (diff)
downloadopenocd_libswd-ec7a984b42f5f7e6192963f0c09340227fdfa829.tar.gz
openocd_libswd-ec7a984b42f5f7e6192963f0c09340227fdfa829.tar.bz2
openocd_libswd-ec7a984b42f5f7e6192963f0c09340227fdfa829.tar.xz
openocd_libswd-ec7a984b42f5f7e6192963f0c09340227fdfa829.zip
- add missing svn props from r1270 commit
- change mime-type for png files to image/png git-svn-id: svn://svn.berlios.de/openocd/trunk@1273 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/server/httpd/httpd.tcl')
-rw-r--r--src/server/httpd/httpd.tcl226
1 files changed, 113 insertions, 113 deletions
diff --git a/src/server/httpd/httpd.tcl b/src/server/httpd/httpd.tcl
index a8bce162..a2fee129 100644
--- a/src/server/httpd/httpd.tcl
+++ b/src/server/httpd/httpd.tcl
@@ -1,113 +1,113 @@
-# some dummy proc's to get things going for test purposes
-
-
-
-proc ip {} {
-return 10.0.0.55
-}
-
-proc start_chunked {a} {
- global httpdata
- global httpmime
- set httpmime $a
- set httpdata ""
-}
-
-proc write_chunked {a} {
- global httpdata
- append httpdata $a
-}
-
-proc end_chunked {} {
-}
-
-
-
-#proc formfetch {a} {
-# global httppostdata
- #catch {
-# echo "$a=$httppostdata($a)"
- #return $httppostdata($a)
- #}
-#
- #return ""
-#}
-
-
-
-
-proc tohex {a} {
- set r ""
- while 1 {
-
- set rem [expr $a%16]
- set a [expr $a/16]
- set r [string index "0123456789abcdef" $rem]$r
- if ($a==0) then break
- }
- return $r
-}
-
-# encode text
-proc encode {a} {
- return [string map {\n <br/> { } {&nbsp;} \t {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} > &gt; < &lt; / &#47;} $a]
-}
-
-#stubs that can be overriden to save between sessions
-proc load_var {a} {
- global glob_var
- catch {
- return $glob_var($a)
- }
- return ""
-}
-#stubs that can be overriden to save between sessions
-proc save_var {a b} {
- catch {
- set glob_var($a) $b
- return ""
- } err
- set glob_var($a) ""
- return ""
-}
-
-
-
-proc to_textarea {a} {
- return [string map {& &#38; > &gt; < &lt; / &#47;} $a]
-}
-
-proc from_textarea {a} {
- return [string map {&gt; > &lt; < &#38; & &#47; /} $a]
-}
-
-proc lunion {a b} {
- foreach e $a {
- set x($e) {}
- }
- foreach e $b {
- if {![info exists x($e)]} {
- lappend a $e
- }
- }
- return $a
-}
-
-
-# encode text
-proc encode {a} {
- return [string map {\n <br/> { } {&nbsp;} \t {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} > &gt; < &lt; / &#47;} $a]
-}
-
-# catch any exceptions, capture output and return it
-proc capture_catch {a} {
- catch {
- capture {uplevel $a}
- } result
- return $result
-}
-
-proc first_flash_base {} {
- set t [lindex 0 [ocd_flash_banks]]
- return $t(base)
-}
+# some dummy proc's to get things going for test purposes
+
+
+
+proc ip {} {
+return 10.0.0.55
+}
+
+proc start_chunked {a} {
+ global httpdata
+ global httpmime
+ set httpmime $a
+ set httpdata ""
+}
+
+proc write_chunked {a} {
+ global httpdata
+ append httpdata $a
+}
+
+proc end_chunked {} {
+}
+
+
+
+#proc formfetch {a} {
+# global httppostdata
+ #catch {
+# echo "$a=$httppostdata($a)"
+ #return $httppostdata($a)
+ #}
+#
+ #return ""
+#}
+
+
+
+
+proc tohex {a} {
+ set r ""
+ while 1 {
+
+ set rem [expr $a%16]
+ set a [expr $a/16]
+ set r [string index "0123456789abcdef" $rem]$r
+ if ($a==0) then break
+ }
+ return $r
+}
+
+# encode text
+proc encode {a} {
+ return [string map {\n <br/> { } {&nbsp;} \t {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} > &gt; < &lt; / &#47;} $a]
+}
+
+#stubs that can be overriden to save between sessions
+proc load_var {a} {
+ global glob_var
+ catch {
+ return $glob_var($a)
+ }
+ return ""
+}
+#stubs that can be overriden to save between sessions
+proc save_var {a b} {
+ catch {
+ set glob_var($a) $b
+ return ""
+ } err
+ set glob_var($a) ""
+ return ""
+}
+
+
+
+proc to_textarea {a} {
+ return [string map {& &#38; > &gt; < &lt; / &#47;} $a]
+}
+
+proc from_textarea {a} {
+ return [string map {&gt; > &lt; < &#38; & &#47; /} $a]
+}
+
+proc lunion {a b} {
+ foreach e $a {
+ set x($e) {}
+ }
+ foreach e $b {
+ if {![info exists x($e)]} {
+ lappend a $e
+ }
+ }
+ return $a
+}
+
+
+# encode text
+proc encode {a} {
+ return [string map {\n <br/> { } {&nbsp;} \t {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} > &gt; < &lt; / &#47;} $a]
+}
+
+# catch any exceptions, capture output and return it
+proc capture_catch {a} {
+ catch {
+ capture {uplevel $a}
+ } result
+ return $result
+}
+
+proc first_flash_base {} {
+ set t [lindex 0 [ocd_flash_banks]]
+ return $t(base)
+}