Documentation Source Text

Check-in [96334c601b]
Login

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

Overview
Comment:Fix a bug in the back-links of the evidence display generator.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 96334c601b874c2b40954ec180c63b264ad96a54
User & Date: drh 2010-07-14 22:40:41
Context
2010-07-15
18:41
Fix typos in the wal.html document. check-in: ad5454b5e0 user: drh tags: trunk
2010-07-14
22:40
Fix a bug in the back-links of the evidence display generator. check-in: 96334c601b user: drh tags: trunk
18:39
Improved documentation of the IN and NOT IN operators. Push back the 3.7.0 release date to 2010-07-22. check-in: 07096801a3 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to format_evidence.tcl.

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
# The input file is named $src.  The HTMLized output should be written
# into $docdir/$dest.  The URL should be $dest with added fragment
# information.  Evidence provided by input file $src can be found in
# the evidence table with srccat=$srccat and srcfile=$srcfile.
#
proc htmlize_evidence {src srccat srcfile docdir dest} {
  htmlizer_start $src $docdir/$dest

  db eval {
     SELECT srcline, reqno, requirement.srcfile AS fn
       FROM evidence JOIN requirement USING(reqno)
      WHERE evidence.srcfile=$srcfile
        AND evidence.srccat=$srccat
      ORDER BY srcline
  } {
    htmlizer_xfer $srcline
    htmlizer_puts_raw "<a name=\"ln$srcline\"></a>"
    set line [htmlizer_gets]
    if {[regexp {^(.*)(R-\d\d\d[\d-]+)(.*$)} $line all pre link post]} {
       set pre [htmlizer_escape $pre]
       set post [htmlizer_escape $post]
       htmlizer_puts_raw "$pre<a href=\"../$fn#$reqno\">$link</a>$post\n"
    } else {
       htmlizer_puts $line
    }
  }
  htmlizer_finish
  db eval {
    UPDATE evidence SET url=$dest || '#ln' || srcline







>













|







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
# The input file is named $src.  The HTMLized output should be written
# into $docdir/$dest.  The URL should be $dest with added fragment
# information.  Evidence provided by input file $src can be found in
# the evidence table with srccat=$srccat and srcfile=$srcfile.
#
proc htmlize_evidence {src srccat srcfile docdir dest} {
  htmlizer_start $src $docdir/$dest
  set up [regsub -all {[^/]+} [file dir $dest] ..]
  db eval {
     SELECT srcline, reqno, requirement.srcfile AS fn
       FROM evidence JOIN requirement USING(reqno)
      WHERE evidence.srcfile=$srcfile
        AND evidence.srccat=$srccat
      ORDER BY srcline
  } {
    htmlizer_xfer $srcline
    htmlizer_puts_raw "<a name=\"ln$srcline\"></a>"
    set line [htmlizer_gets]
    if {[regexp {^(.*)(R-\d\d\d[\d-]+)(.*$)} $line all pre link post]} {
       set pre [htmlizer_escape $pre]
       set post [htmlizer_escape $post]
       htmlizer_puts_raw "$pre<a href=\"$up/$fn#$reqno\">$link</a>$post\n"
    } else {
       htmlizer_puts $line
    }
  }
  htmlizer_finish
  db eval {
    UPDATE evidence SET url=$dest || '#ln' || srcline