Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Rename the output_list proc to hd_list_of_links and move its implementation from capi3ref.in into wrap.tcl, since it is used as common code. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c3c40d671123be5a7d8352ae98353fa6 |
User & Date: | drh 2016-09-02 16:57:00.989 |
Context
2016-09-02
| ||
17:03 | Store debugging information in the doc_vardump.txt file after building all documentation. (check-in: cb35d7c443 user: drh tags: trunk) | |
16:57 | Rename the output_list proc to hd_list_of_links and move its implementation from capi3ref.in into wrap.tcl, since it is used as common code. (check-in: c3c40d6711 user: drh tags: trunk) | |
16:30 | Remove unnecessary javascript from the header. Improvements to rendering of C APIs. (check-in: 4180b2cf6f user: drh tags: trunk) | |
Changes
Changes to pages/capi3ref.in.
︙ | ︙ | |||
216 217 218 219 220 221 222 | set oldname [string tolower $oldname] regsub {^sqlite_} $oldname {c_} oldname regsub {^sqlite3_} $oldname {} oldname regsub { } $oldname _ name return $name.html } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | set oldname [string tolower $oldname] regsub {^sqlite_} $oldname {c_} oldname regsub {^sqlite3_} $oldname {} oldname regsub { } $oldname _ name return $name.html } hd_open_aux c3ref/intro.html hd_header Introduction hd_enable_main 0 hd_keywords *capi3ref {C-language Interface} </tcl> <h1 align="center"> |
︙ | ︙ | |||
520 521 522 523 524 525 526 | hd_header {List Of SQLite Objects} hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>List Of Objects:</h2> <tcl> | | | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | hd_header {List Of SQLite Objects} hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>List Of Objects:</h2> <tcl> hd_list_of_links {} 280 [lsort -nocase $objlist] hd_enable_main 0 hd_putsnl {<p>Other lists: <a href="constlist.html">Constants</a> and <a href="funclist.html">Functions</a> and <a href="../rescode.html">Result Codes</a>.} hd_close_aux hd_enable_main 1 |
︙ | ︙ | |||
558 559 560 561 562 563 564 | hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>List Of Constants:</h2> <p>Also available: [error codes|list of error codes]</p> <tcl> set clist [lsort -index 1 $clist] | | | 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | hd_putsnl {<a href="intro.html"><h2>SQLite C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>List Of Constants:</h2> <p>Also available: [error codes|list of error codes]</p> <tcl> set clist [lsort -index 1 $clist] hd_list_of_links {} 400 $clist hd_enable_main 0 hd_putsnl {<p>Other lists: <a href="objlist.html">Objects</a> and <a href="funclist.html">Functions</a> and <a href="../rescode.html">Result Codes</a>.</p>} hd_enable_main 1 hd_close_aux |
︙ | ︙ | |||
599 600 601 602 603 604 605 | </tcl> <h2>List Of Functions:</h2> <p>Note: Functions marked with "<small><i>(exp)</i></small>" are [experimental] and functions whose names are <s>struck through</s> are [deprecated].</p> <tcl> set funclist [lsort -index 1 $funclist] | | | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | </tcl> <h2>List Of Functions:</h2> <p>Note: Functions marked with "<small><i>(exp)</i></small>" are [experimental] and functions whose names are <s>struck through</s> are [deprecated].</p> <tcl> set funclist [lsort -index 1 $funclist] hd_list_of_links {} 315 $funclist hd_enable_main 0 hd_putsnl {<p>Other lists: <a href="constlist.html">Constants</a> and <a href="objlist.html">Objects</a> and <a href="../rescode.html">Result Codes</a></p>} hd_enable_main 1 hd_close_aux |
︙ | ︙ | |||
645 646 647 648 649 650 651 | hd_puts "</p>\n" return } set flst {} foreach x $lx { lappend flst [list $x $x 0] } | | | 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | hd_puts "</p>\n" return } set flst {} foreach x $lx { lappend flst [list $x $x 0] } hd_list_of_links "${label}s:" 350 $flst hd_puts "</p>\n" } # Output all the records # foreach c [lsort $content] { |
︙ | ︙ | |||
680 681 682 683 684 685 686 | hd_resolve {and is subject to change without notice.</p>} } regsub -all "\n\n+" $body "</p>\n\n<p>" body set body <p>$body</p> while {[regexp {^(.*?)\[\[([^]]*)\]\](.*)$} $body all fore anchor aft]} { hd_resolve $fore set anchor [string trim $anchor] | < | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | hd_resolve {and is subject to change without notice.</p>} } regsub -all "\n\n+" $body "</p>\n\n<p>" body set body <p>$body</p> while {[regexp {^(.*?)\[\[([^]]*)\]\](.*)$} $body all fore anchor aft]} { hd_resolve $fore set anchor [string trim $anchor] hd_fragment [hd_fragname $anchor] $anchor set body $aft } hd_resolve $body show_methods_of_object c:$kw Constructor show_methods_of_object d:$kw Destructor show_methods_of_object m:$kw Method |
︙ | ︙ |
Changes to pages/lang.in.
︙ | ︙ | |||
61 62 63 64 65 66 67 | foreach {section} [lsort -index 0 -dictionary $lang_section_list] { foreach {s_title s_tag s_kw} $section {} if {$s_kw == ""} { set s_kw $s_title } lappend lx [list $s_kw $s_title 0] } | < | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | foreach {section} [lsort -index 0 -dictionary $lang_section_list] { foreach {s_title s_tag s_kw} $section {} if {$s_kw == ""} { set s_kw $s_title } lappend lx [list $s_kw $s_title 0] } hd_list_of_links {} 340 $lx </tcl> </ul></td></tr></table> <p>^The routines [sqlite3_prepare_v2()], [sqlite3_prepare()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()], [sqlite3_exec()], and [sqlite3_get_table()] accept an SQL statement list (sql-stmt-list) which is a semicolon-separated |
︙ | ︙ | |||
2700 2701 2702 2703 2704 2705 2706 | foreach basesyntax [array names corefuncset] { foreach {syntax keywords desc} $corefuncset($basesyntax) break regexp {^[a-z_]+} $basesyntax fragment foreach coresyntax $syntax { lappend lx [list $fragment $coresyntax 0] } } | | | 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 | foreach basesyntax [array names corefuncset] { foreach {syntax keywords desc} $corefuncset($basesyntax) break regexp {^[a-z_]+} $basesyntax fragment foreach coresyntax $syntax { lappend lx [list $fragment $coresyntax 0] } } hd_list_of_links {} 225 [lsort -index 1 $lx] hd_putsnl "<hr class='xhr'>" hd_putsnl "<dl>" foreach basesyntax [lsort [array names corefuncset]] { foreach {syntax keywords desc} $corefuncset($basesyntax) break regsub -all {\s+} [string trim $syntax] {<br />} syntax regsub -all {\(([^*)]+)\)} $syntax {(<i>\1</i>)} syntax |
︙ | ︙ | |||
3135 3136 3137 3138 3139 3140 3141 | foreach basesyntax [array names corefuncset] { foreach {syntax keywords desc} $corefuncset($basesyntax) break regexp {^[a-z_]+} $basesyntax fragment foreach coresyntax $syntax { lappend lx [list $fragment $coresyntax 0] } } | | | 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 | foreach basesyntax [array names corefuncset] { foreach {syntax keywords desc} $corefuncset($basesyntax) break regexp {^[a-z_]+} $basesyntax fragment foreach coresyntax $syntax { lappend lx [list $fragment $coresyntax 0] } } hd_list_of_links {} 225 [lsort -index 1 $lx] hd_putsnl "<hr class='xhr'>" hd_putsnl "<dl>" foreach basesyntax [lsort [array names corefuncset]] { foreach {syntax keywords desc} $corefuncset($basesyntax) break regsub -all {\s+} [string trim $syntax] {<br />} syntax regsub -all {\(([^*)]+)\)} $syntax {(<i>\1</i>)} syntax |
︙ | ︙ | |||
4892 4893 4894 4895 4896 4897 4898 | </p> <tcl> set lx {} foreach word $keyword_list { lappend lx [list {} $word 0] } | | | 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 | </p> <tcl> set lx {} foreach word $keyword_list { lappend lx [list {} $word 0] } hd_list_of_links {} 200 $lx </tcl> <blockquote> <table width="100%"><tr> <td align="left" valign="top" width="20%"> <tcl> |
Changes to pages/pragma.in.
︙ | ︙ | |||
1555 1556 1557 1558 1559 1560 1561 | lappend lx [list "PRAGMA $ref" $prag 4] } elseif {[info exists PragmaTest($prag)]} { lappend lx [list "PRAGMA $ref" $prag 5] } else { lappend lx [list "PRAGMA $ref" $prag 0] } } | | | 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 | lappend lx [list "PRAGMA $ref" $prag 4] } elseif {[info exists PragmaTest($prag)]} { lappend lx [list "PRAGMA $ref" $prag 5] } else { lappend lx [list "PRAGMA $ref" $prag 0] } } hd_list_of_links {} 250 [lsort -index 1 $lx] </tcl> <p>Notes: <ol> <li>Pragmas whose names are <s>struck through</s> are deprecated. Do not use them. They exist for historical compatibility. <li>These pragmas are used for debugging SQLite and |
︙ | ︙ |
Changes to pages/rescode.in.
︙ | ︙ | |||
739 740 741 742 743 744 745 | [result code definitions|defined in sqlite3.h] and are listed in alphabetical order below: <tcl> set lx {} foreach name [lsort [array names prim_rc]] { lappend lx [list $name "$name ($prim_rc($name))" 0] } | | | | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | [result code definitions|defined in sqlite3.h] and are listed in alphabetical order below: <tcl> set lx {} foreach name [lsort [array names prim_rc]] { lappend lx [list $name "$name ($prim_rc($name))" 0] } hd_list_of_links {} 320 $lx hd_fragment extrc {extended result code} {extended result codes} \ {extended error code} {extended error codes} </tcl> <h1>Extended Result Code List</h1> <p>The $nExtCode extended result codes are [extended result code definitions|defined in sqlite3.h] and are listed in alphabetical order below: <tcl> set lx {} foreach name [lsort [array names ext_rc]] { lappend lx [list $name "$name ($ext_rc($name))" 0] } hd_list_of_links {} 450 $lx </tcl> <h1>Result Code Meanings</h1> <p> The meanings for all $nResCode result code values are shown below, in numeric order. |
︙ | ︙ |
Changes to pages/session.in.
︙ | ︙ | |||
285 286 287 288 289 290 291 | hd_header {List Of SQLite Objects} hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>Objects:</h2> <tcl> | | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | hd_header {List Of SQLite Objects} hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>Objects:</h2> <tcl> hd_list_of_links {} 300 [lsort $objlist] hd_enable_main 0 hd_putsnl {<p>Other lists: <a href="constlist.html">Constants</a> and <a href="funclist.html">Functions</a>.} hd_close_aux hd_enable_main 1 hd_putsnl {<hr>} |
︙ | ︙ | |||
318 319 320 321 322 323 324 | hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>Constants:</h2> <tcl> set clist [lsort -index 1 $clist] | | | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>Constants:</h2> <tcl> set clist [lsort -index 1 $clist] hd_list_of_links {} 400 $clist hd_enable_main 0 hd_putsnl {<p>Other lists: <a href="objlist.html">Objects</a> and <a href="funclist.html">Functions</a>.</p>} hd_enable_main 1 hd_close_aux hd_putsnl {<hr>} |
︙ | ︙ | |||
353 354 355 356 357 358 359 | hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>Functions:</h2> <tcl> set funclist [lsort -index 1 $funclist] | | | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | hd_enable_main 0 hd_putsnl {<a href="intro.html"><h2>Session Module C Interface</h2></a>} hd_enable_main 1 </tcl> <h2>Functions:</h2> <tcl> set funclist [lsort -index 1 $funclist] hd_list_of_links {} 300 $funclist hd_enable_main 0 hd_putsnl {<p>Other lists: <a href="constlist.html">Constants</a> and <a href="objlist.html">Objects</a>.</p>} hd_enable_main 1 hd_close_aux hd_putsnl {<hr>} |
︙ | ︙ |
Changes to pages/syntax.in.
1 2 3 4 5 6 7 8 9 | <title>List of SQLite Syntax Diagrams</title> <h1 align="center">List of SQLite Syntax Diagrams</h1> <tcl> set lx {} foreach name [lsort $syntax_order] { lappend lx [list syntax/$name.html $name 0] } | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <title>List of SQLite Syntax Diagrams</title> <h1 align="center">List of SQLite Syntax Diagrams</h1> <tcl> set lx {} foreach name [lsort $syntax_order] { lappend lx [list syntax/$name.html $name 0] } hd_list_of_links {} 300 $lx foreach name $syntax_order { file mkdir $::DEST/syntax hd_open_aux syntax/$name.html hd_keywords $name "$name syntax diagram" hd_enable_main 0 hd_header "SQLite Syntax: $name" |
︙ | ︙ |
Changes to wrap.tcl.
︙ | ︙ | |||
160 161 162 163 164 165 166 167 168 169 170 171 172 173 | } else { lappend backlink($kw) $hd(fn-aux) } } } # Record the fact that all keywords given in the argument list should # cause a jump to the current location in the current file. # # If only the main output file is open, then all references to the # keyword jump to the main output file. If both main and aux are # open then references from within the main file jump to the main file | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | } else { lappend backlink($kw) $hd(fn-aux) } } } # Convert the keyword $kw into an appropriate relative URI # This is a helper routine to hd_list_of_links # proc hd_keyword_to_uri {kw} { global hd llink glink if {[string match {*.html} $kw]} {return $kw} if {$hd(enable-main)} { set fn $hd(fn-main) set res "" if {[info exists llink($fn:$kw)]} { set res "$hd(rootpath-main)$llink($fn:$kw)" } elseif {[info exists glink($kw)]} { set res "$hd(rootpath-main)$glink($kw)" } if {$res!=""} { if {$hd(fragment)!=""} { lappend backlink($kw) $fn#$hd(fragment) } else { lappend backlink($kw) $fn } } return $res } if {$hd(enable-aux)} { if {[info exists glink($kw)]} { if {$hd(aux-fragment)!=""} { lappend backlink($kw) $hd(fn-aux)#$hd(aux-fragment) } else { lappend backlink($kw) $hd(fn-aux) } return $hd(rootpath-aux)$glink($kw) } } return "" } # Generate a Javascript table containing the URL and Label from $lx # This is a helper routine for hd_list_of_links. # proc hd_list_of_links_javascript {lx} { set sep {[} foreach entry $lx { foreach {link label s} $entry break set url [hd_keyword_to_uri $link] hd_puts "${sep}{\"u\":\"$url\",\"x\":\"$label\",\"s\":$s}" set sep ",\n" } hd_putsnl "\];" } # Output HTML/JS that displays the list $lx in multiple columns # under the assumption that each column is $w pixels wide. The # number of columns automatically adjusts to fill the available # screen width. # # If $title is not an empty string, then it is used as a title for # the list of links # # $lx is a list of triples. Each triple is {KEYWORD LABEL S}. The # S determines a suffix added to each list element: # # 0: Add nothing (the default and common case) # 1: Add the "(exp)" suffix # 2: Strike through the text and do not hyperlink # 3: Strike through the text and add ¹ # 4: Add ² # 5: Add ³ # proc hd_list_of_links {title w lx} { global listcount hd if {![info exists listcount]} { set listcount 1 } else { incr listcount } set tx listtab$listcount set vx listitems$listcount hd_puts "<style>\n#$tx tr td {vertical-align:top;}\n" hd_puts "</style>\n" hd_putsnl "<table id='$tx' width='100%'></table>" hd_putsnl "<script>" hd_puts "var $vx = " if {$hd(enable-main) && $hd(enable-aux)} { set hd(enable-main) 0 hd_list_of_links_javascript $lx set hd(enable-main) 1 set hd(enable-aux) 0 hd_list_of_links_javascript $lx set hd(enable-aux) 1 } else { hd_list_of_links_javascript $lx } hd_putsnl "var j = 0;" hd_putsnl "var w = Math.max(document.documentElement.clientWidth, \ window.innerWidth || 0);" hd_putsnl "var nCol = Math.floor(w/$w);" hd_putsnl "if(nCol<=0) nCol=1;" hd_putsnl "var nRow = Math.ceil(($vx.length+1)/nCol);" if {$title!=""} { hd_putsnl "var h=\"<tr><td colspan=\"+nCol;" hd_putsnl "h += \">$title</td></tr><tr><td><ul class='multicol_list'>\"" } else { hd_putsnl "var h=\"<tr><td><ul class='multicol_list'>\"" } hd_putsnl "var ea" hd_putsnl "for(var i=0; i<$vx.length; i++){" hd_putsnl " if( (++j)>nRow ){" hd_putsnl " h += \"</ul></td>\\n<td><ul class='multicol_list'>\\n\";" hd_putsnl " j = 1;" hd_putsnl " }" hd_putsnl " if($vx\[i\].u==\"\" || $vx\[i\].s==2){" hd_putsnl " h += \"<li>\"" hd_putsnl " ea = \"\"" hd_putsnl " }else{" hd_putsnl " h += \"<li><a href='\";" hd_putsnl " h += $vx\[i\].u;" hd_putsnl " h += \"'>\";" hd_putsnl " ea = \"</a>\"" hd_putsnl " }" hd_putsnl " if($vx\[i\].s==2 || $vx\[i\].s==3) h += \"<s>\"" hd_putsnl " h += $vx\[i\].x;" hd_putsnl " if($vx\[i\].s==2 || $vx\[i\].s==3) h += \"</s>\"" hd_putsnl " h += ea" hd_putsnl " if($vx\[i\].s==1) h += \"<small><i>(exp)</i></small>\\n\";" hd_putsnl " if($vx\[i\].s==3) h += \"¹\\n\";" hd_putsnl " if($vx\[i\].s==4) h += \"²\\n\";" hd_putsnl " if($vx\[i\].s==5) h += \"³\\n\";" hd_putsnl "}" hd_putsnl "document.getElementById(\"$tx\").innerHTML = h;" hd_putsnl "</script>" } # Record the fact that all keywords given in the argument list should # cause a jump to the current location in the current file. # # If only the main output file is open, then all references to the # keyword jump to the main output file. If both main and aux are # open then references from within the main file jump to the main file |
︙ | ︙ |