/ Check-in [38d2e510]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add a script to tool/ that will extract the sqlite3.h header file from an sqlite3.c amalgamation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 38d2e510cdedf38153466b161c0842b1604aef7b5589c51f628ae7cbb6a8722a
User & Date: drh 2019-03-05 16:53:16
Context
2019-03-05
23:49
Fix a potential 32-bit integer overflow in the "showdb" utility program when it is trying to interpret a corrupt database file. check-in: 3803e750 user: drh tags: trunk
16:53
Add a script to tool/ that will extract the sqlite3.h header file from an sqlite3.c amalgamation. check-in: 38d2e510 user: drh tags: trunk
14:47
New dbfuzz2 test cases added to test/fuzzdata7.db check-in: 25975e1f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added tool/extract-sqlite3h.tcl.

            1  +#!/usr/bin/tclsh
            2  +#
            3  +# Given an sqlite3.c source file identified by the command-line
            4  +# argument, extract the "sqlite3.h" header file that is embedded inside
            5  +# the sqlite3.c source file and write it to standard output.
            6  +#
            7  +if {[llength $argv]!=1} {
            8  +  puts stderr "Usage: $argv0 sqlite3.c >sqlite3.h"
            9  +  exit 1
           10  +}
           11  +set in [open [lindex $argv 0] rb]
           12  +while {![eof $in]} {
           13  +  set line [gets $in]
           14  +  if {[string match {* Begin file sqlite3.h *} $line]} break
           15  +}
           16  +while {![eof $in]} {
           17  +  set line [gets $in]
           18  +  if {[string match {* End of sqlite3.h *} $line]} break
           19  +  puts $line
           20  +}
           21  +close $in