]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Allow the 'testfixture.exe' target to be compiled with the __stdcall calling convention.
authormistachkin <mistachkin@noemail.net>
Thu, 28 Jul 2016 14:37:04 +0000 (14:37 +0000)
committermistachkin <mistachkin@noemail.net>
Thu, 28 Jul 2016 14:37:04 +0000 (14:37 +0000)
FossilOrigin-Name: e8be3dfeabaa31b3490793cf8230faae1204be15

45 files changed:
Makefile.msc
ext/fts2/fts2_tokenizer.c
ext/fts3/fts3_test.c
ext/fts3/fts3_tokenizer.c
ext/fts5/fts5_tcl.c
ext/rbu/test_rbu.c
ext/session/test_session.c
manifest
manifest.uuid
src/tclsqlite.c
src/test1.c
src/test2.c
src/test3.c
src/test4.c
src/test5.c
src/test6.c
src/test7.c
src/test8.c
src/test9.c
src/test_async.c
src/test_autoext.c
src/test_backup.c
src/test_bestindex.c
src/test_blob.c
src/test_btree.c
src/test_config.c
src/test_demovfs.c
src/test_fs.c
src/test_func.c
src/test_hexio.c
src/test_init.c
src/test_intarray.c
src/test_malloc.c
src/test_multiplex.c
src/test_mutex.c
src/test_osinst.c
src/test_quota.c
src/test_rtree.c
src/test_schema.c
src/test_superlock.c
src/test_syscall.c
src/test_tclvar.c
src/test_thread.c
src/test_vfs.c
tool/replace.tcl

index 7220f71cd4322a67ca4ed0af6bb451523d942036..c3f7f3a2b0c1d04e0a1051a8210960f269009f83 100644 (file)
@@ -466,12 +466,12 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
 !IF "$(PLATFORM)"=="x86"
 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
-TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
+TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
 !ELSE
 !IFNDEF PLATFORM
 CORE_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
 SHELL_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
-TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
+TEST_CCONV_OPTS = -Gz -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall -DINCLUDE_SQLITE_TCL_H=1 -DSQLITE_TCLAPI=__cdecl
 !ELSE
 CORE_CCONV_OPTS =
 SHELL_CCONV_OPTS =
@@ -1239,6 +1239,12 @@ SRC11 = \
   parse.h \
   $(SQLITE3H)
 
+# Generated Tcl header files
+#
+SRC12 = \
+  sqlite_tcl.h \
+  sqlite_tclDecls.h
+
 # All source code files.
 #
 SRC = $(SRC00) $(SRC01) $(SRC02) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
@@ -1503,7 +1509,7 @@ mptest:   mptester.exe
 # files are automatically generated.  This target takes care of
 # all that automatic generation.
 #
-.target_source:        $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c
+.target_source:        $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c sqlite_tcl.h
        -rmdir /Q/S tsrc 2>NUL
        -mkdir tsrc
        for %i in ($(SRC00)) do copy /Y %i tsrc
@@ -1518,6 +1524,7 @@ mptest:   mptester.exe
        for %i in ($(SRC09)) do copy /Y %i tsrc
        for %i in ($(SRC10)) do copy /Y %i tsrc
        for %i in ($(SRC11)) do copy /Y %i tsrc
+       for %i in ($(SRC12)) do copy /Y %i tsrc
        copy /Y fts5.c tsrc
        copy /Y fts5.h tsrc
        del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
@@ -1799,10 +1806,10 @@ wherecode.lo:   $(TOP)\src\wherecode.c $(HDR)
 whereexpr.lo:  $(TOP)\src\whereexpr.c $(HDR)
        $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\whereexpr.c
 
-tclsqlite.lo:  $(TOP)\src\tclsqlite.c $(HDR)
+tclsqlite.lo:  $(TOP)\src\tclsqlite.c $(HDR) sqlite_tcl.h
        $(LTCOMPILE) $(NO_WARN) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
 
-tclsqlite-shell.lo:    $(TOP)\src\tclsqlite.c $(HDR)
+tclsqlite-shell.lo:    $(TOP)\src\tclsqlite.c $(HDR) sqlite_tcl.h
        $(LTCOMPILE) $(NO_WARN) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
 
 tclsqlite3.exe:        tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
@@ -1974,7 +1981,16 @@ TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0)
 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1)
 !ENDIF
 
-testfixture.exe:       $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR)
+sqlite_tclDecls.h:
+       echo #ifndef SQLITE_TCLAPI > sqlite_tclDecls.h
+       echo #  define SQLITE_TCLAPI __cdecl >> sqlite_tclDecls.h
+       echo #endif >> sqlite_tclDecls.h
+       type "$(TCLINCDIR)\tclDecls.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?.*?\s+?)Tcl_" "\1 SQLITE_TCLAPI Tcl_" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl regsub "^(EXTERN\s+?(?:void|VOID)\s+?)TclFreeObj" "\1 SQLITE_TCLAPI TclFreeObj" >> sqlite_tclDecls.h
+
+sqlite_tcl.h:  sqlite_tclDecls.h
+       type "$(TCLINCDIR)\tcl.h" | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact tclDecls.h sqlite_tclDecls.h >> sqlite_tcl.h
+
+testfixture.exe:       $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) sqlite_tcl.h
        $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
                -DBUILD_sqlite -I$(TCLINCDIR) \
                $(TESTFIXTURE_SRC) \
@@ -2023,7 +2039,7 @@ smoketest:        $(TESTPROGS)
        @set PATH=$(LIBTCLPATH);$(PATH)
        .\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
 
-sqlite3_analyzer.c:    $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
+sqlite3_analyzer.c:    $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl sqlite_tcl.h
        echo #define TCLSH 2 > $@
        echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
        copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
@@ -2103,7 +2119,7 @@ clean:
        -rmdir /Q/S .libs 2>NUL
        -rmdir /Q/S tsrc 2>NUL
        del /Q .target_source 2>NUL
-       del /Q tclsqlite3.exe 2>NUL
+       del /Q tclsqlite3.exe sqlite_tcl.h sqlite_tclDecls.h 2>NUL
        del /Q testloadext.dll 2>NUL
        del /Q testfixture.exe test.db 2>NUL
        del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL
index a3d6a6312a9e71f1c29f5c77080ebcf959429d40..dda33a72d262e38cab8154b5be824a5d4cd2dc40 100644 (file)
@@ -99,7 +99,11 @@ static void scalarFunc(
 
 #ifdef SQLITE_TEST
 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <string.h>
 
 /*
index 2596e6dec70a395bd17b87de8bf462c09ceba15c..c3b71284ec4d12e952c21fefe87a4efb71f4664f 100644 (file)
 ** that the sqlite3_tokenizer_module.xLanguage() method is invoked correctly.
 */
 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <string.h>
 #include <assert.h>
 
index b7d9d2b3b287b52dd39094a8a8f5089ec1ec357e..bfc36af3e38bb1f5bb6a4b44fa4fd4c28abff166 100644 (file)
@@ -224,7 +224,11 @@ int sqlite3Fts3InitTokenizer(
 
 #ifdef SQLITE_TEST
 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <string.h>
 
 /*
index 72db65777f1d06c2853f7483183e71754195d1f8..dee9bc7f18eb2e3a61f06fdbd8f511f9637bab77 100644 (file)
 
 
 #ifdef SQLITE_TEST
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #ifdef SQLITE_ENABLE_FTS5
 
index 6418d30d593e0e3a1216be77165f8b829c41b6ca..671f16c553491cc5ced764c6ee45854eb2da9c71 100644 (file)
 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
 
 #include "sqlite3rbu.h"
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <assert.h>
 
 /* From main.c */ 
@@ -347,7 +351,11 @@ int SqliteRbu_Init(Tcl_Interp *interp){
 }
 
 #else
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 int SqliteRbu_Init(Tcl_Interp *interp){ return TCL_OK; }
 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */
 #endif /* defined(SQLITE_TEST) */
index 1aa63b74edcc23a937d5d2bfdb54044067d5f497..9f6bc3f70d04b17d5b2c7148e1451129858733aa 100644 (file)
@@ -5,7 +5,11 @@
 #include "sqlite3session.h"
 #include <assert.h>
 #include <string.h>
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 typedef struct TestSession TestSession;
 struct TestSession {
index a174c165d96e6d7f5f2bae9fafbdbf0c72de24e0..8f0151d5f2b63aaed7b938018e7aaf86bab7c8d8 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
-C Work\sin\sprogress\son\ssetting\sa\scalling\sconvention\sfor\sall\scallback\sfunctions.
-D 2016-07-28T04:14:37.455
+C Allow\sthe\s'testfixture.exe'\starget\sto\sbe\scompiled\swith\sthe\s__stdcall\scalling\sconvention.
+D 2016-07-28T14:37:04.758
 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
-F Makefile.msc 843c563182b26a358674c520d7b8d40b832e9436
+F Makefile.msc da4c9f5bc46f6f12d7313d12be18a2d2c55e06c0
 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
 F VERSION cb29eb11e493dd85b3eeec4053c03949bf98478e
 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
@@ -62,7 +62,7 @@ F ext/fts2/fts2_hash.c 011a1d32de45bb1b519a1fd0048e857d6a843558
 F ext/fts2/fts2_hash.h 1824b99dfd8d0225facbdb26a2c87289b2e7dcf8
 F ext/fts2/fts2_icu.c 51c5cd3c04954badd329fa738c95fcdb717b5188
 F ext/fts2/fts2_porter.c 2cd4a507bf3c3085fe66f59b0f2a325f65aaacf5
-F ext/fts2/fts2_tokenizer.c 3dbe8058e97afb55fff3ea844120ce3208b114cc
+F ext/fts2/fts2_tokenizer.c b529493d55e55497213c37e1f31680a77746be26
 F ext/fts2/fts2_tokenizer.h 27a1a99ca2d615cf7e142839b8d79e8751b4529e
 F ext/fts2/fts2_tokenizer1.c 07e223eecb483d448313b5f1553a4f299a7fb7a1
 F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
@@ -81,9 +81,9 @@ F ext/fts3/fts3_icu.c deb46f7020d87ea7a14a433fb7a7f4bef42a9652
 F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009
 F ext/fts3/fts3_snippet.c 68ae118b0f834ea53d2b89e4087fc0f0b8c4ee4e
 F ext/fts3/fts3_term.c 88c55a6fa1a51ab494e33dced0401a6c28791fd7
-F ext/fts3/fts3_test.c a940cf104d545ad1abf926956ce65db2aa5af0cf
+F ext/fts3/fts3_test.c 7d8c9e17bc11cc245c91585ef5a47ee4a600f7b2
 F ext/fts3/fts3_tokenize_vtab.c a27593ab19657166f6fa5ec073b678cc29a75860
-F ext/fts3/fts3_tokenizer.c 3cf21cd2212db17a88d4ef7da0fd8a80275979a1
+F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7
 F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
 F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
 F ext/fts3/fts3_unicode.c a93f5edc0aff44ef8b06d7cb55b52026541ca145
@@ -107,7 +107,7 @@ F ext/fts5/fts5_hash.c 880998e596b60f078348d48732ca4ad9a90caad2
 F ext/fts5/fts5_index.c b429e23fabb57506f71e406997cc46b89190dc97
 F ext/fts5/fts5_main.c f85281445dcf8be32d18841c93a6f90fe27dbfe2
 F ext/fts5/fts5_storage.c de0ed8a06738bde433afe11e92295ceaffbc4e58
-F ext/fts5/fts5_tcl.c f8731e0508299bd43f1a2eff7dbeaac870768966
+F ext/fts5/fts5_tcl.c b41f04600936a2b910b5dff179e8bd050ccb34c7
 F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc
 F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be
 F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8
@@ -255,7 +255,7 @@ F ext/rbu/rbuvacuum.test 4a977447c15c2581ab668781d9ef4294382530e0
 F ext/rbu/rbuvacuum2.test 45009e127c3fb385e5c0fd5a8a63fb922a79d0ab
 F ext/rbu/sqlite3rbu.c 948677ee0ec57da51148e6c5f64ac68afcf36ab2
 F ext/rbu/sqlite3rbu.h db8858120c9be14b60c9225f9da28221f5f6b945
-F ext/rbu/test_rbu.c 9f043b74c46c45b231f4313aed1fccb379a76fe6
+F ext/rbu/test_rbu.c c2c1859dfd69f1a55125d38009d0d49e36895780
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
 F ext/rtree/rtree.c d26a815b0df1c412a6881dae8d7fd3c9c08cce68
 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
@@ -301,7 +301,7 @@ F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7
 F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0
 F ext/session/sqlite3session.c 37485891b4add26cf61495df193c419f36556a32
 F ext/session/sqlite3session.h 69bf73cfd71e58f2ae5d2aa935b2c1a541aee555
-F ext/session/test_session.c 464f2c8bf502795d95969387eb8e93f68c513c15
+F ext/session/test_session.c ebf9acf2bd70885e6245512427f800693b65dc9c
 F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220
 F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
 F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e
@@ -392,51 +392,51 @@ F src/sqliteInt.h d25c18c1272a7811e2569c39bfc2fca96156eead
 F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
 F src/status.c 5b18f9526900f61189ab0b83f1ef41d9f871a2ab
 F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
-F src/tclsqlite.c 53274d5bbd66e7246c573a6b48026781d42c7efe
-F src/test1.c 5ec959d088af063cac44cf1685455f3fcddecc8c
-F src/test2.c 5586f43fcd9a1be0830793cf9d354082c261b25b
-F src/test3.c c75c8af0eadb335236c9e61b51044c58a8f7dd59
-F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e
-F src/test5.c 5a34feec76d9b3a86aab30fd4f6cc9c48cbab4c1
-F src/test6.c a684b7abd01352ab50cb79c0bf727e6b3f381a3d
-F src/test7.c 9c89a4f1ed6bb13af0ed805b8d782bd83fcd57e3
-F src/test8.c fa262391d3edea6490a71bfaa8fed477ccbbac75
-F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
-F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8
-F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12
-F src/test_backup.c 2e6e6a081870150f20c526a2e9d0d29cda47d803
-F src/test_bestindex.c f9e6807c52aa532e4775321ce3ed8e47c907ed45
-F src/test_blob.c b2551a9b5573232db5f66f292307c37067937239
-F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f
-F src/test_config.c 7003f6f35134de6f19c6588f44783e43390ea277
-F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852
+F src/tclsqlite.c e348648c28fcaa04ab8da98bf7e8a37b3629e634
+F src/test1.c a625e4d2857e0b08a9d66bdb737ce95b02326a9f
+F src/test2.c ce1e56fd0983866df1dbaf6c0558f3ad726ec222
+F src/test3.c 68b6b3b17df3028deda0a79607af70ff4ac5fc52
+F src/test4.c a305bb93783fa0db03b9e5e899ec5367cf139903
+F src/test5.c 3ca6874d52d658607d2f25bb6ed88fd03ad78a6c
+F src/test6.c 4fc2c870b4f41d46f11a24b5c7dcff89486442b8
+F src/test7.c 57b6dae963ff12cb6ef8389285427f07e8b042ff
+F src/test8.c 33cefbf2911e12c74c6adb798cc0c8ee3287a58d
+F src/test9.c 6b9792e8a692a67fcce77dfe4a2ca4744c4ece54
+F src/test_async.c 233536b7e364a4a95597d6aa6fdf07fa9351de67
+F src/test_autoext.c 2a2343174ff46477dd081b7582dc1e72c69330bc
+F src/test_backup.c 7fe86c0be6c1a05a254b845a6aa32294dbdab012
+F src/test_bestindex.c 832b9968bf15d60029c1700905d56cefeb0f5dd7
+F src/test_blob.c 6af2552a059f326a107214fb13917f31a1606caf
+F src/test_btree.c 3d2abd96336f1cbb760c7c5a758e74eaae98aed6
+F src/test_config.c 4d3d4a886416f369771d69a6dba926866deda788
+F src/test_demovfs.c ed337b14964a5f5ba08bf9472c94c64e88c547a7
 F src/test_devsym.c 4e58dec2602d8e139ca08659f62a62450587cb58
-F src/test_fs.c f10f840ca4f8c72e4837908bd8347ac4bcab074b
-F src/test_func.c 37453d346cfcf118774efd5bf6187f7e6a7e3254
-F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd
-F src/test_init.c 66b33120ffe9cd853b5a905ec850d51151337b32
-F src/test_intarray.c 870124b95ec4c645d4eb84f15efb7133528fb1a5
+F src/test_fs.c 39086f99413e73f60afe2280a0ff27dfab63ab47
+F src/test_func.c 4197173afb7d8453d3d0c7f7b109226dcef52997
+F src/test_hexio.c 2ab200d91f77085bd69c721dcb2b649f036d608b
+F src/test_init.c a55015461868ca979d819f8db72aa682ba068185
+F src/test_intarray.c 9fee7f930ff988dd0fc20315da4c762f77f01a78
 F src/test_intarray.h f3b7672f5d1056eac563c0d6ea8480a660b1475c
 F src/test_journal.c d3b83f2bcb7792c709e57abddc456a2b1818643a
 F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
-F src/test_malloc.c 6b27e947eeeb70d11aa65406ed28d749e39b6356
-F src/test_multiplex.c eafc567ebe162e36f17b5062285dfe90461cf8e9
+F src/test_malloc.c 90cbc63ebab11d16b440d394e77bc26629829f11
+F src/test_multiplex.c a0bcea72bc981f64c9c71edf22cc503cf83e0348
 F src/test_multiplex.h 5436d03f2d0501d04f3ed50a75819e190495b635
-F src/test_mutex.c dbdfaff8580071f2212a0deae3325a93a737819c
+F src/test_mutex.c 85021f2ffe67cdb4dfa6089f3f55f5e01cd76aea
 F src/test_onefile.c 416f87a28d6d673352d33fc4b1c7d39db878e50f
-F src/test_osinst.c ad0233b1dabb0390e25edded4ebd79a2a61538c6
+F src/test_osinst.c 4e21c7b2709955f9907b80bfc874afb81ce1b4a7
 F src/test_pcache.c a5cd24730cb43c5b18629043314548c9169abb00
-F src/test_quota.c 180813f43683be5725458fc1ff13ac455d8e722d
+F src/test_quota.c 7c2bb6d302f9cab9d4782b1a37dd01f0c7bde071
 F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d
-F src/test_rtree.c 43fff4c5a01576d6d213f27472598801a247890c
-F src/test_schema.c 2bdba21b82f601da69793e1f1d11bf481a79b091
+F src/test_rtree.c 0aad72f4854b01957b20c3c325eecd8512e9731d
+F src/test_schema.c ab94aeab8a94486de3d2ce06567b7ee35f3a59b8
 F src/test_server.c a2615049954cbb9cfb4a62e18e2f0616e4dc38fe
 F src/test_sqllog.c 0d138a8180a312bf996b37fa66da5c5799d4d57b
-F src/test_superlock.c 06797157176eb7085027d9dd278c0d7a105e3ec9
-F src/test_syscall.c 268c072541162564a882c57f54a6fee12ef4a4d2
-F src/test_tclvar.c d86412527da65468ee6fa1b8607c65d0af736bc4
-F src/test_thread.c af391ec03d23486dffbcc250b7e58e073f172af9
-F src/test_vfs.c 4d02f38bfb8f7f273da7ba84bfe000f5babf206c
+F src/test_superlock.c 9389ee2aa8f8fa7487ea2e3bf01c033c65eaf21a
+F src/test_syscall.c 8313aa5d43989913c2dfd42b987e6ed29d6b8770
+F src/test_tclvar.c 0239df9e83f9adc7b21ae01dce20229dd8592e71
+F src/test_thread.c 30ae6818d21a168ef8cbceb9456411751c714cd9
+F src/test_vfs.c 2edd39d413301baf15c1d7384f21c2e8b3fca2dd
 F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698
 F src/test_windirent.c 8f5fada630348558d5745b334702f301da1ffc61
 F src/test_windirent.h b12055cab6227f7be10f5c19296f67c60cc5e2a5
@@ -1457,7 +1457,7 @@ F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
 F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97
 F tool/opcodesum.tcl 740ed206ba8c5040018988129abbf3089a0ccf4a
 F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b
-F tool/replace.tcl 7727c60a04299b65a92f5e1590896fea0f25b9e0
+F tool/replace.tcl 3856f87247dde5418d16dac92fa4060813431778
 F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
 F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
 F tool/run-speed-test.sh f95d19fd669b68c4c38b6b475242841d47c66076
@@ -1508,10 +1508,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 9e2b26811452a5011d0a97a689636fa4409da856
-R 6c56defa4f9211ce028bec2ac1e13231
-T *branch * callbackConv
-T *sym-callbackConv *
-T -sym-trunk *
+P 02b8040e1add02734d2dbc6c59737ab74ff8fb18
+R ccdbec6a43a33ea0f78bbd174bf27dd8
 U mistachkin
-Z d50c4a0ba4b8e38dec3c91619f068656
+Z 9a093adb6bae045a3c1e5e0de6859957
index 57781e18c1d85cef606471101733b2989de72610..8d4ac6e27c594f97973179673ea6b2d06c566269 100644 (file)
@@ -1 +1 @@
-02b8040e1add02734d2dbc6c59737ab74ff8fb18
\ No newline at end of file
+e8be3dfeabaa31b3490793cf8230faae1204be15
\ No newline at end of file
index e559043c083f9a5a6fc1d4132bf9b35d98beb890..d26c62285913f7f8ea3787673013c7cdf7d9f4f9 100644 (file)
 ** If requested, include the SQLite compiler options file for MSVC.
 */
 #if defined(INCLUDE_MSVC_H)
-#include "msvc.h"
+# include "msvc.h"
 #endif
 
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+# include "sqlite_tcl.h"
+#else
+# include "tcl.h"
+#endif
 #include <errno.h>
 
 /*
@@ -4123,7 +4127,7 @@ static void init_all(Tcl_Interp *interp){
     Sqlitetesttclvar_Init(interp);
     Sqlitetestfs_Init(interp);
     SqlitetestThread_Init(interp);
-    SqlitetestOnefile_Init(interp);
+    SqlitetestOnefile_Init();
     SqlitetestOsinst_Init(interp);
     Sqlitetestbackup_Init(interp);
     Sqlitetestintarray_Init(interp);
index 35c43d0ef910940f86e8ff7ddf6a927fd1fa04c4..e1b4fc0f31839a65c2abe21c2beb46e017b0f6ee 100644 (file)
 #endif
 
 #include "vdbeInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index d16ba5016a848be952dd718b58ed6ba2b4614153..8946196ff30ad831c1fb9ef6c27f91b7a3414a1b 100644 (file)
 ** testing of the SQLite library.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
index bfd7c30b65908ac502142596722bb19ca5899982..f1b9f37924e199e86c187a7068f0d14e6c34c120 100644 (file)
 */
 #include "sqliteInt.h"
 #include "btreeInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index d68903030330003c2b45d858b560ea03725aff7e..85b521b06091154590b40a3a133fc062aff62201 100644 (file)
 ** Code for testing the SQLite library in a multithreaded environment.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #if SQLITE_OS_UNIX && SQLITE_THREADSAFE
 #include <stdlib.h>
 #include <string.h>
index 952e3325e5f4cf02f413bc9fb8d2b015c1abc7be..2b49e408b666c7eb0fbd097866cbc52384d12103 100644 (file)
 */
 #include "sqliteInt.h"
 #include "vdbeInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index 24fe725f78b44d6e7410261ff00d92f3045f22b2..e6eabf996a31e6d7b4de36779bca91a694b02bf5 100644 (file)
 */
 #if SQLITE_TEST          /* This file is used for testing only */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #ifndef SQLITE_OMIT_DISKIO  /* This file is a no-op if disk I/O is disabled */
 
index 6ba3631b41645edf4b052e0f82b219a4d003cadf..d3b789e9675768ba233ae8b0f2f9229778d48ddc 100644 (file)
 ** Derived from test4.c.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 /*
 ** This test only works on UNIX with a SQLITE_THREADSAFE build that includes
index fb781ac8fdd02b8ad77ab291ce5589a7dc610196..e635d5ed2c80d1b7987a916f6af8b91e79375bc6 100644 (file)
 ** testing of the SQLite library.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index e5993e8ff78f61c2435b6f97a3b463e227c767ac..3c3629c0a75ea1f5b5043c0f9fc3097513a60277 100644 (file)
 ** as there is not much point in binding to Tcl.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index b0b943185bfc23c17fd08f55768cac12a9f56951..8389e75dbded91bffe36ccb757a1bdc25fd3cdcd 100644 (file)
 */
 
 #define TCL_THREADS 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #ifdef SQLITE_ENABLE_ASYNCIO
 
index a5236d23908d45e00c0cc13dd78d3397692ec167..b536cd732175e4effbe82606c94cf2849f4138a5 100644 (file)
 *************************************************************************
 ** Test extension for testing the sqlite3_auto_extension() function.
 */
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include "sqlite3ext.h"
 
 #ifndef SQLITE_OMIT_LOAD_EXTENSION
index 6b4d6b9b1ce063b52eb2fb0211d27bbbd34fa55c..3e91f1f219ca6e79badfb37bc59e23003d3977f8 100644 (file)
 **
 */
 
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include "sqlite3.h"
 #include <assert.h>
 
index f6f9d3eaf84da7ccba44aa21fb02eb82dc63e3eb..8e0ff00b52de28fa9cb7a616e004b337079c76a7 100644 (file)
 
 
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #ifndef SQLITE_OMIT_VIRTUALTABLE
 
index ec2227bb390a53faa087926dc47433b67201ae42..703664190b68259dabbfa4e089268d809940d04c 100644 (file)
 **
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
index dfe77051b6bbee0d1db796a10427f969b4957b67..46860afb30bd86efcb964adefc847cb8f309ea87 100644 (file)
 ** testing of the SQLite library.
 */
 #include "btreeInt.h"
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 /*
 ** Usage: sqlite3_shared_cache_report
index 9ce9bfcaca9dd93e9401abe3df442de1d151431e..1e68e58d8d52426a5ae1afe111bfff4c7fa9e741 100644 (file)
 #  include "os_win.h"
 #endif
 
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index 9410a309a6ef180a22953482ea0658841f3bddb2..9cc0eb030959d399297db9c3bf732ec102fa18f5 100644 (file)
@@ -641,7 +641,11 @@ sqlite3_vfs *sqlite3_demovfs(void){
 
 #ifdef SQLITE_TEST
 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #if SQLITE_OS_UNIX
 static int register_demovfs(
index 32026d0f382652a4f8e8e515d86ba407649675c9..329594a5ab541161a7b3630a9f90f2c48dcf0e40 100644 (file)
 **   SELECT * FROM fstree WHERE path LIKE '/home/dan/sqlite/%'
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #include <stdlib.h>
 #include <string.h>
index 579177b70c5fae6b5312aa51f14229ec5a776302..08ea98fb7accf8d8ccf061bc90b4dac6b79470bb 100644 (file)
 ** implements new SQL functions used by the test scripts.
 */
 #include "sqlite3.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
index b20b5ce730ab7fa800d2d0cc38c77275593ebdbb..88f5ed7bfacdb1f51484b6ca4ff6e3efd0f34dab 100644 (file)
 ** easier and safer to build our own mechanism.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
index 502d95c05237348bb925b2e81d9de73027a94454..c66b5785d0b05871c862160b9ca0caa336c1fe14 100644 (file)
 
 #include "sqliteInt.h"
 #include <string.h>
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 static struct Wrapped {
   sqlite3_pcache_methods2 pcache;
index 70e34db3e191a3d1a31376208e104257bbd416eb..c27b4597c07806028f3ed578784a77e7f23ede03 100644 (file)
@@ -270,7 +270,11 @@ SQLITE_API int sqlite3_intarray_bind(
 ** Everything below is interface for testing this module.
 */
 #ifdef SQLITE_TEST
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 /*
 ** Routines to encode and decode pointers
index 37612561ebb2be80cbcdf484ee1a2f507bc038f6..66d8a881ba68d3d8b84564fd0bdf74b39774cd05 100644 (file)
 ** memory allocation subsystem.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
index ba4e61b0905b0cca45fbe743b27e0ac2cd853c98..dffdb4494138d0a655b20e2e038182653845c7f3 100644 (file)
@@ -1229,7 +1229,11 @@ int sqlite3_multiplex_shutdown(int eForce){
 
 /***************************** Test Code ***********************************/
 #ifdef SQLITE_TEST
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 extern const char *sqlite3ErrName(int);
 
 
index 995b89a4c64f264b5fc062133e3fd9d6467921e1..22375197b77b9982df2fb1203b92a2650348e449 100644 (file)
 ** This file contains test logic for the sqlite3_mutex interfaces.
 */
 
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include "sqlite3.h"
 #include "sqliteInt.h"
 #include <stdlib.h>
index e51ce77ef859864f5c2bb15cd7fd0c712ba3ea94..5ab8ed5c938fef455bf8a6005f20cf02d334be62 100644 (file)
@@ -1104,7 +1104,11 @@ int sqlite3_vfslog_register(sqlite3 *db){
 
 #if defined(SQLITE_TEST) || defined(TCLSH)
 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 static int test_vfslog(
   void *clientData,
index e8e0b3407223e1829bfcd2563420f066b96f9686..8ea48e5b5375c840ec8fe0ba7eb64dd5cdd4ec8c 100644 (file)
@@ -1278,7 +1278,11 @@ int sqlite3_quota_remove(const char *zFilename){
   
 /***************************** Test Code ***********************************/
 #ifdef SQLITE_TEST
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 /*
 ** Argument passed to a TCL quota-over-limit callback.
index 797ec0026c83adf89966182a36e94af76f88ce40..1f15566f97c34a812054b4592db6ebbd17154df2 100644 (file)
 */
 
 #include "sqlite3.h"
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 /* Solely for the UNUSED_PARAMETER() macro. */
 #include "sqliteInt.h"
@@ -353,7 +357,11 @@ static int bfs_query_func(sqlite3_rtree_query_info *p){
 *************************************************************************/
 
 #include <assert.h>
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 typedef struct Cube Cube;
 struct Cube {
index 4ee18193b049fc753618d02aa55cf110cc8c9a67..f2bd3b35202355900a1e7b437c4cf1fe469121e1 100644 (file)
 ** to be compiled into an sqlite dynamic extension.
 */
 #ifdef SQLITE_TEST
-  #include "sqliteInt.h"
-  #include "tcl.h"
+#  include "sqliteInt.h"
+#  if defined(INCLUDE_SQLITE_TCL_H)
+#    include "sqlite_tcl.h"
+#  else
+#    include "tcl.h"
+#  endif
 #else
-  #include "sqlite3ext.h"
+#  include "sqlite3ext.h"
   SQLITE_EXTENSION_INIT1
 #endif
 
index cac789842d328f30a647dd571aadeba41fb5fe45..cad5b51f0fc1b5a29c04186f175c38def5b1f709 100644 (file)
@@ -256,7 +256,11 @@ int sqlite3demo_superlock(
 
 #ifdef SQLITE_TEST
 
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 struct InterpAndScript {
   Tcl_Interp *interp;
index f1d5c61bc3080f97a1f026672f8dca1e23fdb8a8..eab989518685cb8e8702388eb2291bfacfa98232 100644 (file)
 
 #include "sqliteInt.h"
 #include "sqlite3.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
index 63ed394734260fa30bdc6b59987d973d466848c0..95a065c853e0b779a58c6d0af0c3dfdbcf117024 100644 (file)
 ** access to TCL variables.
 */
 #include "sqliteInt.h"
-#include "tcl.h"
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 #include <stdlib.h>
 #include <string.h>
 
index a4d96e194288c5b3fc14b927be64b58c515a4208..1fd646e7698b4b4f32d9144907b9e0f103ed2a2d 100644 (file)
 */
 
 #include "sqliteInt.h"
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 #if SQLITE_THREADSAFE
 
index b476a42cb4f2b47e99db8d8a00bade9a27fdf521..acc1c6682eb0ffa330dcd6ef1c773fb047233af2 100644 (file)
 
 #include "sqlite3.h"
 #include "sqliteInt.h"
-#include <tcl.h>
+#if defined(INCLUDE_SQLITE_TCL_H)
+#  include "sqlite_tcl.h"
+#else
+#  include "tcl.h"
+#endif
 
 typedef struct Testvfs Testvfs;
 typedef struct TestvfsShm TestvfsShm;
index b01a83accb8c158ecb8e10ae4b8b2221856326ad..1ecc6dc7b5184251ead8fd17b209b43d1e127784 100644 (file)
@@ -7,13 +7,14 @@
 set mode [string tolower [lindex $argv 0]]
 set from [lindex $argv 1]
 set to [lindex $argv 2]
-if {$mode ni [list exact include]} {exit 1}
+if {$mode ni [list exact regsub include]} {exit 1}
 if {[string length $from]==0} {exit 2}
 while {![eof stdin]} {
   set line [gets stdin]
   if {[eof stdin]} break
   switch -exact $mode {
     exact {set line [string map [list $from $to] $line]}
+    regsub {regsub -all -- $from $line $to line}
     include {if {[regsub -all -- $from $line $to line]==0} continue}
   }
   puts stdout $line