Documentation Source Text

Check-in [9e95bb666d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use the variable-number-of-columns routine for the keyword list.
Timelines: family | ancestors | descendants | both | mobile-friendly
Files: files | file ages | folders
SHA1: 9e95bb666de01dbcc277c708cb418fbc7d2d4785
User & Date: drh 2016-08-31 20:03:56
Context
2016-08-31
20:47
Automatically disable the "Search" menu option if the document does not originate from an HTTP server, since there is no chance of running the CGI script in that case. check-in: 3de5aaebc8 user: drh tags: mobile-friendly
20:03
Use the variable-number-of-columns routine for the keyword list. check-in: 9e95bb666d user: drh tags: mobile-friendly
19:13
Fix the multi-column bullet lists in the c3ref documents so that the number of columns varies with the screen width. check-in: edc0f779f7 user: drh tags: mobile-friendly
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/capi3ref.in.

253
254
255
256
257
258
259




260
261
262
263
264
265
266
...
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
  }
  hd_putsnl "\];"
}

# Output HTML/JS that displays the list $lx in multiple columns
# under the assumption that each column is $w pixels wide.
#




proc output_list {title w lx} {
  global listcount hd
  if {![info exists listcount]} {
    set listcount 1
  } else {
    incr listcount
  }
................................................................................
  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>\""
  } else {
    hd_putsnl "var h=\"<tr><td><ul>\""
  }

  hd_putsnl "for(var i=0; i<$vx.length; i++){"
  hd_putsnl "  if( (++j)>nRow ){"
  hd_putsnl "    h += \"</ul></td>\\n<td><ul>\\n\";"
  hd_putsnl "    j = 1;"
  hd_putsnl "  }"




  hd_putsnl "  h += \"<li><a href='\";"
  hd_putsnl "  h += $vx\[i\].u;"


  hd_putsnl "  h += \"'>\";"
  hd_putsnl "  if($vx\[i\].s==2) h += \"<s>\""
  hd_putsnl "  h += $vx\[i\].x;"
  hd_putsnl "  if($vx\[i\].s==2) h += \"</s>\""
  hd_putsnl "  h += \"</a>\\n\";"
  hd_putsnl "  if($vx\[i\].s==1) h += \"<small><i>(exp)</i></small>\\n\";"
  hd_putsnl "}"
  hd_putsnl "document.getElementById(\"$tx\").innerHTML = h;"
  hd_putsnl "</script>"
}

hd_open_aux c3ref/intro.html







>
>
>
>







 







>





>
>
>
>
|
|
>
>
|



|







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
...
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
  }
  hd_putsnl "\];"
}

# Output HTML/JS that displays the list $lx in multiple columns
# under the assumption that each column is $w pixels wide.
#
# $lx is a list of triples.  Each triple is {KEYWORD LABEL S} where
# S is an integer between 0 and 2.  1 means add the "(exp)" suffix
# and 2 means strike-through.  0 is a no-op.
#
proc output_list {title w lx} {
  global listcount hd
  if {![info exists listcount]} {
    set listcount 1
  } else {
    incr listcount
  }
................................................................................
  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>\""
  } else {
    hd_putsnl "var h=\"<tr><td><ul>\""
  }
  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>\\n\";"
  hd_putsnl "    j = 1;"
  hd_putsnl "  }"
  hd_putsnl "  if($vx\[i\].u==\"\" || $vx\[i\].s==2){"
  hd_putsnl "    h += \"<li>\""
  hd_putsnl "    ea = \"\\n\""
  hd_putsnl "  }else{"
  hd_putsnl "    h += \"<li><a href='\";"
  hd_putsnl "    h += $vx\[i\].u;"
  hd_putsnl "    h += \"'>\";"
  hd_putsnl "    ea = \"</a>\\n\""
  hd_putsnl "  }"
  hd_putsnl "  if($vx\[i\].s==2) h += \"<s>\""
  hd_putsnl "  h += $vx\[i\].x;"
  hd_putsnl "  if($vx\[i\].s==2) h += \"</s>\""
  hd_putsnl "  h += ea"
  hd_putsnl "  if($vx\[i\].s==1) h += \"<small><i>(exp)</i></small>\\n\";"
  hd_putsnl "}"
  hd_putsnl "document.getElementById(\"$tx\").innerHTML = h;"
  hd_putsnl "</script>"
}

hd_open_aux c3ref/intro.html

Changes to pages/lang.in.

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
....
4850
4851
4852
4853
4854
4855
4856







4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
    {{ANALYZE} analyze}
    {{INDEXED BY} indexedby}
    {{aggregate functions} aggfunc aggfunc}
    {{core functions} corefunc corefunc}
    {{date and time functions} datefunc datefunc}
    {keywords keywords {SQL keywords}}
  }
  set lang_section_break [expr {([llength $lang_section_list]+2)/3}]
  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
  }
  if {$s_tag=="pragma.html"} {
    set url $s_tag
  } else {
    set url lang_$s_tag.html
  }
  hd_resolve "<li>\[$s_kw|$s_title\]</li>"
  incr i
  if {$i==$lang_section_break || $i==2*$lang_section_break} {
    hd_puts "</ul></td><td valign=\"top\"><ul>"
  }
}


</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
................................................................................
but some keywords may be omitted when SQL language features are
disabled.
^(Regardless of the compile-time configuration, any identifier that is not on
the following <tcl>hd_puts [llength $keyword_list]</tcl> element
list is not a keyword to the SQL parser in SQLite:
</p>








<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>
set n [llength $keyword_list]
set nCol 5
set nRow [expr {($n+$nCol-1)/$nCol}]
set i 0
foreach word $keyword_list {
  if {$i==$nRow} {
    hd_puts "</td><td valign=\"top\" align=\"left\" width=\"20%\">"
    set i 1
  } else {
    incr i
  }
  hd_puts "$word<br>\n"
}
</tcl>
</td></tr></table></blockquote>)^







|

|
|
|
|
|
<
<
<

<
<
<
<
<
<
>
>







 







>
>
>
>
>
>
>




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
53
54
55
56
57
58
59
60
61
62
63
64
65
66



67






68
69
70
71
72
73
74
75
76
....
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860















    {{ANALYZE} analyze}
    {{INDEXED BY} indexedby}
    {{aggregate functions} aggfunc aggfunc}
    {{core functions} corefunc corefunc}
    {{date and time functions} datefunc datefunc}
    {keywords keywords {SQL keywords}}
  }
  set lx {}
  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]



  }






  # The output_list proc is implemented in capi3ref.in.
  output_list {} 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
................................................................................
but some keywords may be omitted when SQL language features are
disabled.
^(Regardless of the compile-time configuration, any identifier that is not on
the following <tcl>hd_puts [llength $keyword_list]</tcl> element
list is not a keyword to the SQL parser in SQLite:
</p>

<tcl>
set lx {}
foreach word $keyword_list {
  lappend lx [list {} $word 0]
}
output_list {} 180 $lx
</tcl>
<blockquote>
<table width="100%"><tr>
<td align="left" valign="top" width="20%">
<tcl>