Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/tool/extract-sqlite3h.tcl # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / tool / extract-sqlite3h.tcl` 21 lines ยท 571 bytes Raw Blame History 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