aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl90
1 files changed, 90 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl b/libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl
new file mode 100644
index 0000000..07129f8
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/www/common.tcl
@@ -0,0 +1,90 @@
1# This file contains TCL procedures used to generate standard parts of
2# web pages.
3#
4
5proc header {txt} {
6 puts "<html><head><title>$txt</title></head>"
7 puts {<DIV class="pdf_ignore">}
8 puts \
9{<body bgcolor="white" link="#50695f" vlink="#508896">
10<table width="100%" border="0">
11<tr><td valign="top">
12<a href="index.html"><img src="sqlite.gif" border="none"></a></td>
13<td width="100%"></td>
14<td valign="bottom">
15<ul>
16<li><a href="http://www.sqlite.org/cvstrac/tktnew">bugs</a></li>
17<li><a href="changes.html">changes</a></li>
18<li><a href="contrib">contrib</a></li>
19<li><a href="download.html#cvs">cvs&nbsp;repository</a></li>
20<li><a href="docs.html">documentation</a></li>
21</ul>
22</td>
23<td width="10"></td>
24<td valign="bottom">
25<ul>
26<li><a href="download.html">download</a></li>
27<li><a href="faq.html">faq</a></li>
28<li><a href="index.html">home</a></li>
29<li><a href="copyright.html">license</a></li>
30<li><a href="index.html">news</a></li>
31</ul>
32</td>
33<td width="10"></td>
34<td valign="bottom">
35<ul>
36<li><a href="quickstart.html">quick&nbsp;start</a></li>
37<li><a href="support.html">support</a></li>
38<li><a href="lang.html">syntax</a></li>
39<li><a href="http://www.sqlite.org/cvstrac/timeline">timeline</a></li>
40<li><a href="http://www.sqlite.org/cvstrac/wiki">wiki</a></li>
41</ul>
42</td>
43</tr></table>
44<table width="100%">
45<tr><td bgcolor="#80a796"></td></tr>
46</table>}
47 puts </DIV>
48}
49
50proc footer {{rcsid {}}} {
51 puts {
52<table width="100%">
53<tr><td bgcolor="#80a796"></td></tr>
54</table>}
55 set date [lrange $rcsid 3 4]
56 if {$date!=""} {
57 puts "<small><i>This page last modified on $date</i></small>"
58 }
59 puts {</body></html>}
60}
61
62
63# The following proc is used to ensure consistent formatting in the
64# HTML generated by lang.tcl and pragma.tcl.
65#
66proc Syntax {args} {
67 puts {<table cellpadding="10" class=pdf_syntax>}
68 foreach {rule body} $args {
69 puts "<tr><td align=\"right\" valign=\"top\">"
70 puts "<i><font color=\"#ff3434\">$rule</font></i>&nbsp;::=</td>"
71 regsub -all < $body {%LT} body
72 regsub -all > $body {%GT} body
73 regsub -all %LT $body {</font></b><i><font color="#ff3434">} body
74 regsub -all %GT $body {</font></i><b><font color="#2c2cf0">} body
75 regsub -all {[]|[*?]} $body {</font></b>&<b><font color="#2c2cf0">} body
76 regsub -all "\n" [string trim $body] "<br>\n" body
77 regsub -all "\n *" $body "\n\\&nbsp;\\&nbsp;\\&nbsp;\\&nbsp;" body
78 regsub -all {[|,.*()]} $body {<big>&</big>} body
79 regsub -all { = } $body { <big>=</big> } body
80 regsub -all {STAR} $body {<big>*</big>} body
81 ## These metacharacters must be handled to undo being
82 ## treated as SQL punctuation characters above.
83 regsub -all {RPPLUS} $body {</font></b>)+<b><font color="#2c2cf0">} body
84 regsub -all {LP} $body {</font></b>(<b><font color="#2c2cf0">} body
85 regsub -all {RP} $body {</font></b>)<b><font color="#2c2cf0">} body
86 ## Place the left-hand side of the rule in the 2nd table column.
87 puts "<td><b><font color=\"#2c2cf0\">$body</font></b></td></tr>"
88 }
89 puts {</table>}
90}