/ Check-in [38d2e510]
Login

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 Unified Diffs Show Whitespace Changes Patch

Added tool/extract-sqlite3h.tcl.











































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