Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Generate C interface reference document both as the single big file and also as lots of individual small files. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
ae0c38c66299089a0bee3dec5fca6ee3 |
User & Date: | drh 2007-11-12 20:38:33.000 |
Context
2007-11-13
| ||
01:24 | Cleaned up the famous users webpage. Work on the about page. (check-in: 8a34ae6a2f user: drh tags: trunk) | |
2007-11-12
| ||
20:38 | Generate C interface reference document both as the single big file and also as lots of individual small files. (check-in: ae0c38c662 user: drh tags: trunk) | |
15:32 | Complete reorganization of the documentation sources. (check-in: 275febef8f user: drh tags: trunk) | |
Changes
Changes to main.mk.
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | capi3ref.html: $(DOC)/mkapidoc.tcl sqlite3.h tclsh $(DOC)/mkapidoc.tcl <sqlite3.h >capi3ref.html docdir: mkdir -p doc |
︙ |
Changes to pages/capi3ref.in.
︙ | |||
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + - + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | set keyword($kx) 1 } elseif {[regexp {^typedef .* (sqlite[0-9a-z_]+);} $line all kx]} { set type datatype set keyword($kx) 1 } elseif {[regexp {^[a-z].*[ *](sqlite3_[a-z0-9_]+)\(} $line all kx]} { set type function set keyword($kx) 1 } elseif {[regexp {^SQLITE_EXTERN .*(sqlite[0-9a-z_]+);} $line all kx]} { set type datatype set keyword($kx) 1 } append code $line\n } } } # Convert a tag name into the filename used for the # multi-file version. # proc convert_tag_name {oldname} { regsub -nocase {^sqlite3?_} $oldname {} name return $name.html } # Compute a mapping from keywords to filenames. # unset -nocomplain keyword_to_file foreach c [lsort $content] { foreach {key title type keywords body code} $c break set file [convert_tag_name [lindex $keywords 0]] foreach k $keywords { set keyword_to_file($k) $file } } # Output HTML that displays the given list in N columns # |
Changes to wrap.tcl.
︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | set DEST [lindex $argv 2] set HOMEDIR [pwd] rename puts real_puts proc puts {text} { real_puts $::OUT $text flush $::OUT } proc putsin4 {text} { regsub -all "\n " $text \n text real_puts $::OUT [uplevel 1 [list subst -noback -nocom $text]] flush $::OUT } proc PutsHeader {title {relpath {}}} { puts {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">} puts {<html><head>} puts "<title>$title</title>" putsin4 {<style type="text/css"> body { max-width: 800px; /* not supported in IE 6 */ margin: auto; font-family: "Verdana" "sans-serif"; padding: 8px 1%; } a { color: #4F7263 } a:visited { color: #80a796 } .logo { position:absolute; margin:3px; } .tagline { float:right; text-align:right; font-style:italic; width:240px; margin:12px; margin-top:58px; } .toolbar { background-color: #80a796; position: relative; font-variant: small-caps; clear: both; text-align: center; line-height: 1.6em; margin-bottom: 5px; padding:1px 8px; height:1%; /* IE hack to fix rounded corner positions */ } .toolbar a { color: white; text-decoration: none; padding: 6px 4px; } .toolbar a:visited { color: white; } .toolbar a:hover { color: #80a796; background: white; } .content { margin: 5%; } .content dt { font-weight:bold; } .content dd { margin-bottom: 25px; margin-left:20%; } .content ul { padding:0px; padding-left: 15px; margin:0px; } /* rounded corners */ .se,.ne,.nw,.sw { position: absolute; width:8px; height:8px; font-size:7px; /* IE hack to ensure height=8px */ } .se { background-image: url(${relpath}se.png); bottom: 0px; right: 0px; } .ne { background-image: url(${relpath}ne.png); top: 0px; right: 0px; } .sw { background-image: url(${relpath}sw.png); bottom: 0px; left: 0px; } .nw { background-image: url(${relpath}nw.png); top: 0px; left: 0px; } </style> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> } puts {</head>} putsin4 {<body> <div><!-- container div to satisfy validator --> <img class="logo" src="${relpath}SQLite.gif" alt="SQLite Logo"> <div><!-- IE hack to prevent disappearing logo--></div> <div class="tagline">The World's Most Used SQL Database.</div> <div class="toolbar"> <a href="${relpath}index.html">Home</a> <a href="${relpath}about.html">About</a> <a href="${relpath}docs.html">Documentation</a> <a href="${relpath}download.html">Download</a> <a href="${relpath}copyright.html">License</a> <a href="${relpath}press.html">Advocacy</a> <a href="${relpath}devhome.html">Developers</a> <a href="${relpath}news.html">News</a> <a href="${relpath}support.html">Support</a> <!-- rounded corners --> <div class="ne"></div><div class="se"></div><div class="nw"> </div><div class="sw"></div> </div> } } proc PutsFooter {srcfile} { puts {<hr><small><i>} set mtime [file mtime $srcfile] set date [clock format $mtime -format {%Y/%m/%d %H:%M:%S UTC} -gmt 1] puts "This page last modified $date" puts {</i></small></div></body></html>} } # The following proc is used to ensure consistent formatting in the # HTML generated by lang.tcl and pragma.tcl. # proc Syntax {args} { puts {<table cellpadding="10" class=pdf_syntax>} foreach {rule body} $args { |
︙ | |||
67 68 69 70 71 72 73 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - | set in [read $fd] close $fd set title {No Title} regexp {<title>([^\n]*)</title>} $in all title regsub {<title>[^\n]*</title>} $in {} in set outfile [file root [file tail $infile]].html set ::OUT [open $::DEST/$outfile w] |