Documentation Source Text

Check-in [2111eeb610]
Login

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

Overview
Comment:Continuing work on the C/C++ interface requirements.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2111eeb6105309a216fa0b708ec8dd708f27b206
User & Date: drh 2007-12-06 02:41:34
Context
2007-12-07
22:07
Add the sqlite.h.in file to the documentation tree temporarily, while we work on inserting detailed requirements. check-in: e0edc0f438 user: drh tags: trunk
2007-12-06
02:41
Continuing work on the C/C++ interface requirements. check-in: 2111eeb610 user: drh tags: trunk
2007-12-05
18:03
Tinkering with the C/C++ documentation generator so that it extracts requirements from the sqlite.h.in file. check-in: dbc14b00bf user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/capi3ref.in.

44
45
46
47
48
49
50


51
52
53
54
55
56
57
  } elseif {$phase==2} {
    if {$line==""} {
      set kwlist [lsort [array names keyword]]
      unset -nocomplain keyword
      set key $type:$kwlist
      regsub { *\{[\w.]+\}} $title {} title
      regsub -all { *\{[\w.]+\}} $body {} body


      set code [string map {& &amp; < &lt; > &gt;} $code]
      lappend content [list $key $title $type $kwlist $body $code]
      set title {}
      set keywords {}
      set type {}
      set body {}
      set code {}







>
>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  } elseif {$phase==2} {
    if {$line==""} {
      set kwlist [lsort [array names keyword]]
      unset -nocomplain keyword
      set key $type:$kwlist
      regsub { *\{[\w.]+\}} $title {} title
      regsub -all { *\{[\w.]+\}} $body {} body
      set body [string map \
          {<todo> {<font color="red">(TODO: } </todo> )</font>} $body]
      set code [string map {& &amp; < &lt; > &gt;} $code]
      lappend content [list $key $title $type $kwlist $body $code]
      set title {}
      set keywords {}
      set type {}
      set body {}
      set code {}

Changes to pages/requirements.in.

116
117
118
119
120
121
122


123
124
125
126
127
128
129
...
149
150
151
152
153
154
155

156
157
158
159


160

161
162
163
          set x $tail
        } else {
          set x "{$endtag} $tail"
        }
        regsub -all {\[([^]|]+\|)?([^]]+)\]} $req {\2} req
        #regsub -all {\s+} $req { } req
        set req [string trim $req]


        regexp {\d+} $tag key
        lappend reqlist [list $key $tag sqlite3.h $title_lineno $req $docfile]
      }
      set title {}
      set keywords {}
      set type {}
      set body {}
................................................................................
        incr dcnt
      }
      append code $line\n
    }
  }
}


foreach req [lsort -index 0 $reqlist] {
  foreach {key tag file lineno text docfile} $req break
  puts "<tr><td valign=\"top\"><a href=\"c3ref/$docfile\">$tag</a></td>"
  puts "<td valign=\"top\">$text</td></tr>"


}

</tcl>

</table>







>
>







 







>




>
>

>



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
          set x $tail
        } else {
          set x "{$endtag} $tail"
        }
        regsub -all {\[([^]|]+\|)?([^]]+)\]} $req {\2} req
        #regsub -all {\s+} $req { } req
        set req [string trim $req]
        set req [string map \
          {<todo> {<font color="red">(TODO: } </todo> )</font>} $req]
        regexp {\d+} $tag key
        lappend reqlist [list $key $tag sqlite3.h $title_lineno $req $docfile]
      }
      set title {}
      set keywords {}
      set type {}
      set body {}
................................................................................
        incr dcnt
      }
      append code $line\n
    }
  }
}

set dbfd [open reqdb.sql w]
foreach req [lsort -index 0 $reqlist] {
  foreach {key tag file lineno text docfile} $req break
  puts "<tr><td valign=\"top\"><a href=\"c3ref/$docfile\">$tag</a></td>"
  puts "<td valign=\"top\">$text</td></tr>"
  set qtext [string map {' ''} $text]
  real_puts $dbfd "INSERT INTO req VALUES('$tag','$file',$lineno,'$qtext');"
}
close $dbfd
</tcl>

</table>