Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Unified Diff: third_party/sqlite/sqlite-src-3100200/tool/mksqlite3h.tcl

Issue 2846743003: [sql] Remove SQLite 3.10.2 reference directory. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/sqlite-src-3100200/tool/mksqlite3h.tcl
diff --git a/third_party/sqlite/sqlite-src-3100200/tool/mksqlite3h.tcl b/third_party/sqlite/sqlite-src-3100200/tool/mksqlite3h.tcl
deleted file mode 100644
index 3f59aef4675dd478b48a7fd253c60896e25f6509..0000000000000000000000000000000000000000
--- a/third_party/sqlite/sqlite-src-3100200/tool/mksqlite3h.tcl
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/tclsh
-#
-# This script constructs the "sqlite3.h" header file from the following
-# sources:
-#
-# 1) The src/sqlite.h.in source file. This is the template for sqlite3.h.
-# 2) The VERSION file containing the current SQLite version number.
-# 3) The manifest file from the fossil SCM. This gives use the date.
-# 4) The manifest.uuid file from the fossil SCM. This gives the SHA1 hash.
-#
-# Run this script by specifying the root directory of the source tree
-# on the command-line.
-#
-# This script performs processing on src/sqlite.h.in. It:
-#
-# 1) Adds SQLITE_EXTERN in front of the declaration of global variables,
-# 2) Adds SQLITE_API in front of the declaration of API functions,
-# 3) Replaces the string --VERS-- with the current library version,
-# formatted as a string (e.g. "3.6.17"), and
-# 4) Replaces the string --VERSION-NUMBER-- with current library version,
-# formatted as an integer (e.g. "3006017").
-# 5) Replaces the string --SOURCE-ID-- with the date and time and sha1
-# hash of the fossil-scm manifest for the source tree.
-#
-# This script outputs to stdout.
-#
-# Example usage:
-#
-# tclsh mksqlite3h.tcl ../sqlite >sqlite3.h
-#
-
-
-# Get the source tree root directory from the command-line
-#
-set TOP [lindex $argv 0]
-
-# Get the SQLite version number (ex: 3.6.18) from the $TOP/VERSION file.
-#
-set in [open $TOP/VERSION]
-set zVersion [string trim [read $in]]
-close $in
-set nVersion [eval format "%d%03d%03d" [split $zVersion .]]
-
-# Get the fossil-scm version number from $TOP/manifest.uuid.
-#
-set in [open $TOP/manifest.uuid]
-set zUuid [string trim [read $in]]
-close $in
-
-# Get the fossil-scm check-in date from the "D" card of $TOP/manifest.
-#
-set in [open $TOP/manifest]
-set zDate {}
-while {![eof $in]} {
- set line [gets $in]
- if {[regexp {^D (2[-0-9T:]+)} $line all date]} {
- set zDate [string map {T { }} $date]
- break
- }
-}
-close $in
-
-# Set up patterns for recognizing API declarations.
-#
-set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+sqlite3_[_a-zA-Z0-9]+(\[|;| =)}
-set declpattern {^ *([a-zA-Z][a-zA-Z_0-9 ]+ \**)(sqlite3_[_a-zA-Z0-9]+)(\(.*)$}
-
-# Force the output to use unix line endings, even on Windows.
-fconfigure stdout -translation lf
-
-set filelist [subst {
- $TOP/src/sqlite.h.in
- $TOP/ext/rtree/sqlite3rtree.h
- $TOP/ext/fts5/fts5.h
-}]
-
-# These are the functions that accept a variable number of arguments. They
-# always need to use the "cdecl" calling convention even when another calling
-# convention (e.g. "stcall") is being used for the rest of the library.
-set cdecllist {
- sqlite3_config
- sqlite3_db_config
- sqlite3_log
- sqlite3_mprintf
- sqlite3_snprintf
- sqlite3_test_control
- sqlite3_vtab_config
-}
-
-# Process the source files.
-#
-foreach file $filelist {
- set in [open $file]
- while {![eof $in]} {
-
- set line [gets $in]
-
- # File sqlite3rtree.h contains a line "#include <sqlite3.h>". Omit this
- # line when copying sqlite3rtree.h into sqlite3.h.
- #
- if {[string match {*#include*[<"]sqlite3.h[>"]*} $line]} continue
-
- regsub -- --VERS-- $line $zVersion line
- regsub -- --VERSION-NUMBER-- $line $nVersion line
- regsub -- --SOURCE-ID-- $line "$zDate $zUuid" line
-
- if {[regexp $varpattern $line] && ![regexp {^ *typedef} $line]} {
- set line "SQLITE_API $line"
- } else {
- if {[regexp $declpattern $line all rettype funcname rest]} {
- set line SQLITE_API
- append line " " [string trim $rettype]
- if {[string index $rettype end] ne "*"} {
- append line " "
- }
- if {[lsearch -exact $cdecllist $funcname] >= 0} {
- append line SQLITE_CDECL
- } else {
- append line SQLITE_STDCALL
- }
- append line " " $funcname $rest
- }
- }
- puts $line
- }
- close $in
-}

Powered by Google App Engine
This is Rietveld 408576698