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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
« no previous file with comments | « third_party/sqlite/src/tool/mksqlite3c.tcl ('k') | third_party/sqlite/src/tool/omittest.tcl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/tool/mksqlite3h.tcl
diff --git a/third_party/sqlite/src/tool/mksqlite3h.tcl b/third_party/sqlite/src/tool/mksqlite3h.tcl
index 58fe8a89057004ac0c46b7d757abbce94567780b..554069c32398ce78ef236cc8aad23b0e48406b56 100644
--- a/third_party/sqlite/src/tool/mksqlite3h.tcl
+++ b/third_party/sqlite/src/tool/mksqlite3h.tcl
@@ -53,7 +53,7 @@ set in [open $TOP/manifest]
set zDate {}
while {![eof $in]} {
set line [gets $in]
- if {[regexp {^D (2.*[0-9])} $line all date]} {
+ if {[regexp {^D (2[-0-9T:]+)} $line all date]} {
set zDate [string map {T { }} $date]
break
}
@@ -65,32 +65,39 @@ close $in
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]+\(}
-# Process the src/sqlite.h.in file.
+# Process the src/sqlite.h.in ext/rtree/sqlite3rtree.h files.
#
-set in [open $TOP/src/sqlite.h.in]
-while {![eof $in]} {
-
- set line [gets $in]
-
- regsub -- --VERS-- $line $zVersion line
- regsub -- --VERSION-NUMBER-- $line $nVersion line
- regsub -- --SOURCE-ID-- $line "$zDate $zUuid" line
+foreach file [list $TOP/src/sqlite.h.in $TOP/ext/rtree/sqlite3rtree.h] {
+ set in [open $file]
+ while {![eof $in]} {
+
+ set line [gets $in]
- if {[regexp {define SQLITE_EXTERN extern} $line]} {
+ # 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 {define SQLITE_EXTERN extern} $line]} {
+ puts $line
+ puts [gets $in]
+ puts ""
+ puts "#ifndef SQLITE_API"
+ puts "# define SQLITE_API"
+ puts "#endif"
+ set line ""
+ }
+
+ if {([regexp $varpattern $line] && ![regexp {^ *typedef} $line])
+ || ([regexp $declpattern $line])
+ } {
+ set line "SQLITE_API $line"
+ }
puts $line
- puts [gets $in]
- puts ""
- puts "#ifndef SQLITE_API"
- puts "# define SQLITE_API"
- puts "#endif"
- set line ""
}
-
- if {([regexp $varpattern $line] && ![regexp {^ *typedef} $line])
- || ([regexp $declpattern $line])
- } {
- set line "SQLITE_API $line"
- }
- puts $line
+ close $in
}
-close $in
« no previous file with comments | « third_party/sqlite/src/tool/mksqlite3c.tcl ('k') | third_party/sqlite/src/tool/omittest.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698