/
clang
/
sqlite
Обзор
Документация
Войти
/
clang
/
sqlite
Код
Вики
Пакеты
0
Релизы
0
Аналитика
patch-release
tool/extract-sqlite3h.tcl
21 строка
571 B
drh
Add a script to tool/ that will extract the sqlite3.h header file from an
05 мар 2019, 19:53
05 мар 2019, 19:53
91ed9ce
Код
Авторство
О чём код?
#!/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