]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove "#ifdef SQLITE_ENABLE_FTS5" from individual fts5 source files. Add a single...
authordan <dan@noemail.net>
Thu, 2 Jul 2015 15:52:21 +0000 (15:52 +0000)
committerdan <dan@noemail.net>
Thu, 2 Jul 2015 15:52:21 +0000 (15:52 +0000)
FossilOrigin-Name: 7819002ed85497bbd0f9cf4d39df641573324436

21 files changed:
Makefile.in
Makefile.msc
ext/fts3/unicode/mkunicode.tcl
ext/fts5/fts5Int.h
ext/fts5/fts5_aux.c
ext/fts5/fts5_buffer.c
ext/fts5/fts5_config.c
ext/fts5/fts5_expr.c
ext/fts5/fts5_hash.c
ext/fts5/fts5_index.c
ext/fts5/fts5_main.c
ext/fts5/fts5_storage.c
ext/fts5/fts5_tcl.c
ext/fts5/fts5_tokenize.c
ext/fts5/fts5_unicode2.c
ext/fts5/fts5_varint.c
ext/fts5/fts5_vocab.c
ext/fts5/tool/mkfts5c.tcl
main.mk
manifest
manifest.uuid

index 0a2389225b5a087f1479388b1761230b6c37583e..24c414f515b1ace05e844a72a61b9066f6e5ca0a 100644 (file)
@@ -1000,10 +1000,8 @@ fts5parse.c:     $(TOP)/ext/fts5/fts5parse.y lemon
        rm -f fts5parse.h
        ./lemon $(OPTS) fts5parse.y
        mv fts5parse.c fts5parse.c.orig
-       echo "#ifdef SQLITE_ENABLE_FTS5" > fts5parse.c
        cat fts5parse.c.orig | sed 's/yy/fts5yy/g' | sed 's/YY/fts5YY/g' \
                | sed 's/TOKEN/FTS5TOKEN/g' >> fts5parse.c
-       echo "#endif /* SQLITE_ENABLE_FTS5 */" >> fts5parse.c
 
 fts5parse.h: fts5parse.c
 
index 95c0cf18d48eb28e5abdfd6000dbc1018369ce64..262cc95ecc200620339039eea5ebcb15de363756 100644 (file)
@@ -1680,12 +1680,10 @@ fts5parse.c:    $(TOP)\ext\fts5\fts5parse.y lemon.exe
        del /Q fts5parse.h 2>NUL
        .\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(OPTS) fts5parse.y
        move fts5parse.c fts5parse.c.orig
-       echo #ifdef SQLITE_ENABLE_FTS5 > $@
        type fts5parse.c.orig \
                | $(NAWK) "/.*/ { gsub(/yy/,\"fts5yy\");print }" \
                | $(NAWK) "/.*/ { gsub(/YY/,\"fts5YY\");print }" \
                | $(NAWK) "/.*/ { gsub(/TOKEN/,\"FTS5TOKEN\");print }" >> $@
-       echo #endif /* SQLITE_ENABLE_FTS5 */ >> $@
 
 fts5parse.h: fts5parse.c
 
index 6eea9bbc64ff9b092643da34ce08ed8c44ecfb5f..a2e9b1da29316fcd28b753627d6250bb761d50e7 100644 (file)
@@ -590,7 +590,7 @@ proc print_fileheader {} {
   }]
   puts ""
   if {$::generate_fts5_code} {
-    puts "#if defined(SQLITE_ENABLE_FTS5)"
+    # no-op
   } else {
     puts "#ifndef SQLITE_DISABLE_FTS3_UNICODE"
     puts "#if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4)"
@@ -687,7 +687,7 @@ if {$::generate_test_code} {
 }
 
 if {$generate_fts5_code} {
-  puts "#endif /* defined(SQLITE_ENABLE_FTS5) */"
+  # no-op
 } else {
   puts "#endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */"
   puts "#endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */"
index 7b8066ef34255b28c5c219dc0fa3bcbc05eff07c..c66984b286d286e1c80ff491a01d8248317820be 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef _FTS5INT_H
 #define _FTS5INT_H
 
-#ifdef SQLITE_ENABLE_FTS5
-
 #include "fts5.h"
 #include "sqlite3ext.h"
 SQLITE_EXTENSION_INIT1
@@ -693,4 +691,3 @@ int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic);
 **************************************************************************/
 
 #endif
-#endif
index 4ef9e96070e06be04fbcd77a5137efff5e64d43d..3f9c227e6a3720a1a55cac4507635b06ec3e6d6c 100644 (file)
@@ -11,7 +11,6 @@
 ******************************************************************************
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 #include "fts5Int.h"
 #include <math.h>
@@ -552,6 +551,5 @@ int sqlite3Fts5AuxInit(fts5_api *pApi){
 
   return rc;
 }
-#endif /* SQLITE_ENABLE_FTS5 */
 
 
index 33e648a931ac170d0d86dafd318f4fe8bdb5305e..07e1243c3673ae5da9afc66c56eadc9db9f9df58 100644 (file)
@@ -12,7 +12,6 @@
 */
 
 
-#ifdef SQLITE_ENABLE_FTS5
 
 #include "fts5Int.h"
 
@@ -305,5 +304,4 @@ int sqlite3Fts5IsBareword(char t){
   return (t & 0x80) || aBareword[(int)t];
 }
 
-#endif /* SQLITE_ENABLE_FTS5 */
 
index 8103c308c3eff11dee1ffd6140e9b389719598ce..3bf9e2376e9ed70fd72d035623f6f49c379fd39c 100644 (file)
@@ -13,7 +13,6 @@
 ** This is an SQLite module implementing full-text search.
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 
 #include "fts5Int.h"
@@ -861,4 +860,3 @@ int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){
   return rc;
 }
 
-#endif /* SQLITE_ENABLE_FTS5 */
index b29684561ca782ec6e944f673aa0891524a95339..a02a66f15ca3cf7fb3d0a72c3dff0293a8e9fe4b 100644 (file)
@@ -12,7 +12,6 @@
 **
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 
 #include "fts5Int.h"
@@ -2033,4 +2032,3 @@ int sqlite3Fts5ExprPoslist(Fts5Expr *pExpr, int iPhrase, const u8 **pa){
   return nRet;
 }
 
-#endif /* SQLITE_ENABLE_FTS5 */
index 4cc507167e4e031cdd8d6550c6d608dfdb056582..0f878cf783ea751ba7776cd6a627af4d2acef117 100644 (file)
@@ -12,7 +12,6 @@
 **
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 
 #include "fts5Int.h"
@@ -463,4 +462,3 @@ void sqlite3Fts5HashScanEntry(
   }
 }
 
-#endif /* SQLITE_ENABLE_FTS5 */
index ff66dce4412d7ba50f77a6c325ce4718369a4aec..1cde21f437d85a1460a4d40ebe7ec713fa2a7d0e 100644 (file)
@@ -16,7 +16,6 @@
 ** the interface defined in fts5Int.h.
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 #include "fts5Int.h"
 
@@ -5408,4 +5407,3 @@ int sqlite3Fts5IndexInit(sqlite3 *db){
   return rc;
 }
 
-#endif /* SQLITE_ENABLE_FTS5 */
index a598f1cfcefd3fcd042a700ae82eb6383d222b14..b52b2e9ec4de1e266a82e6f4451cd5a89af1d941 100644 (file)
@@ -13,7 +13,6 @@
 ** This is an SQLite module implementing full-text search.
 */
 
-#if defined(SQLITE_ENABLE_FTS5)
 
 #include "fts5Int.h"
 
@@ -2288,6 +2287,16 @@ int sqlite3_fts5_init(
   }
   return rc;
 }
-#endif /* defined(SQLITE_ENABLE_FTS5) */
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int sqlite3_fts_init(
+  sqlite3 *db,
+  char **pzErrMsg,
+  const sqlite3_api_routines *pApi
+){
+  return sqlite3_fts5_init(db, pzErrMsg, pApi);
+}
 
 
index f57c2e2620896f24630855fc04caeec17be7ecf3..601f85713ee3c84a1cc0b4500e0f3fbed84f1ca4 100644 (file)
@@ -12,7 +12,6 @@
 **
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 
 #include "fts5Int.h"
@@ -1092,4 +1091,3 @@ int sqlite3Fts5StorageConfigValue(
 }
 
 
-#endif /* SQLITE_ENABLE_FTS5 */
index d93213a9d0d71903f1017ee86f3515221cca48c6..6ff91cdceb6293c27a5432d46b24056d31ed909f 100644 (file)
@@ -417,14 +417,14 @@ static int xF5tApi(
     CASE(14, "xSetAuxdataInt") {
       int iVal;
       if( Tcl_GetIntFromObj(interp, objv[2], &iVal) ) return TCL_ERROR;
-      rc = p->pApi->xSetAuxdata(p->pFts, (void*)iVal, 0);
+      rc = p->pApi->xSetAuxdata(p->pFts, (void*)((char*)0 + iVal), 0);
       break;
     }
     CASE(15, "xGetAuxdataInt") {
       int iVal;
       int bClear;
       if( Tcl_GetBooleanFromObj(interp, objv[2], &bClear) ) return TCL_ERROR;
-      iVal = (int)p->pApi->xGetAuxdata(p->pFts, bClear);
+      iVal = ((char*)p->pApi->xGetAuxdata(p->pFts, bClear) - (char*)0);
       Tcl_SetObjResult(interp, Tcl_NewIntObj(iVal));
       break;
     }
index 36ef26cb352d4b5bf91d11708e86577882ab9735..afaa3034cec27355f2292ed9f63875d4d60893a1 100644 (file)
@@ -11,7 +11,6 @@
 ******************************************************************************
 */
 
-#if defined(SQLITE_ENABLE_FTS5)
 
 #include "fts5Int.h"
 
@@ -1226,6 +1225,5 @@ int sqlite3Fts5TokenizerInit(fts5_api *pApi){
 
   return SQLITE_OK;
 }
-#endif /* defined(SQLITE_ENABLE_FTS5) */
 
 
index 493cabf4310c3f308b06684d7dcbfbc09ec6b444..8ad709d0fd6b4528f9e2b94bf326b361386fa136 100644 (file)
@@ -15,7 +15,6 @@
 ** DO NOT EDIT THIS MACHINE GENERATED FILE.
 */
 
-#if defined(SQLITE_ENABLE_FTS5)
 
 #include <assert.h>
 
@@ -359,4 +358,3 @@ int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic){
 
   return ret;
 }
-#endif /* defined(SQLITE_ENABLE_FTS5) */
index 386c0d676e39bab3c3106bc5da880769f93c5d03..21858506acd7dac5ac2bb36eecdac3c00e32bf74 100644 (file)
@@ -13,7 +13,6 @@
 ** Routines for varint serialization and deserialization.
 */
 
-#ifdef SQLITE_ENABLE_FTS5
 
 #include "fts5Int.h"
 
@@ -341,4 +340,3 @@ int sqlite3Fts5GetVarintLen(u32 iVal){
   return 5;
 }
 
-#endif /* SQLITE_ENABLE_FTS5 */
index ebbaf362e33c13e6d7df781b52a6d24507176baf..609beb0b30c80e4fcd74712140db5cdda60dbf33 100644 (file)
@@ -31,7 +31,6 @@
 **   $term in the database.
 */
 
-#if defined(SQLITE_ENABLE_FTS5)
 
 #include "fts5Int.h"
 
@@ -486,6 +485,5 @@ int sqlite3Fts5VocabInit(Fts5Global *pGlobal, sqlite3 *db){
 
   return sqlite3_create_module_v2(db, "fts5vocab", &fts5Vocab, p, 0);
 }
-#endif /* defined(SQLITE_ENABLE_FTS5) */
 
 
index eb287cbd7d81a6e1eaa220120814b214fe55bbba..34777e39151da34dba49ef2f627c11501689c1b1 100644 (file)
@@ -24,6 +24,8 @@ set G(src) [string map [list %dir% $srcdir] {
 
 set G(hdr) {
 
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) 
+
 #if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
 # define NDEBUG 1
 #endif
@@ -33,6 +35,11 @@ set G(hdr) {
 
 }
 
+set G(footer) {
+    
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */
+}
+
 proc readfile {zFile} {
   set fd [open $zFile]
   set data [read $fd]
@@ -63,6 +70,7 @@ proc fts5c_printfile {zIn} {
 
 proc fts5c_close {} {
   global G
+  puts -nonewline $G(fd) $G(footer)
   if {$G(fd)!="stdout"} {
     close $G(fd)
   }
diff --git a/main.mk b/main.mk
index 5b93a99771abbcbb0093726aa4d354c024fe7db6..1f658440abb9f157a50d980f663f07fe13f5717b 100644 (file)
--- a/main.mk
+++ b/main.mk
@@ -658,10 +658,8 @@ fts5parse.c:       $(TOP)/ext/fts5/fts5parse.y lemon
        rm -f fts5parse.h
        ./lemon $(OPTS) fts5parse.y
        mv fts5parse.c fts5parse.c.orig
-       echo "#ifdef SQLITE_ENABLE_FTS5" > fts5parse.c
        cat fts5parse.c.orig | sed 's/yy/fts5yy/g' | sed 's/YY/fts5YY/g' \
                | sed 's/TOKEN/FTS5TOKEN/g' >> fts5parse.c
-       echo "#endif /* SQLITE_ENABLE_FTS5 */" >> fts5parse.c
 
 fts5parse.h: fts5parse.c
 
index 7b4d29ae98bdcce7c27dd6004ff96433478a70a7..01d9a5ce330ce5d69cf68d2158db65321858279c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Add\sthe\s--shrink-memory\soption\sto\sthe\sspeedtest1\stest\sprogram.
-D 2015-07-02T01:38:39.494
+C Remove\s"#ifdef\sSQLITE_ENABLE_FTS5"\sfrom\sindividual\sfts5\ssource\sfiles.\sAdd\sa\ssingle\s"#if\s!defined(SQLITE_CORE)\s||\sdefined(SQLITE_ENABLE_FTS5)"\sto\sfts5.c.
+D 2015-07-02T15:52:21.801
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
-F Makefile.in 285a0a234ed7610d431d91671c136098c2bd86a9
+F Makefile.in 1f525f24e2d3a4defd0ce819c10980caeec967fe
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc 0a0568c12cf37fd9683241dfe7aa484fcdf27554
+F Makefile.msc 0dd6214eb5a8038e4a4b4a551c55578dbb8e1b56
 F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858
 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
 F VERSION ce0ae95abd7121c534f6917c1c8f2b70d9acd4db
@@ -102,24 +102,24 @@ F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
 F ext/fts3/tool/fts3view.c 8e53d0190a7b3443764bbd32ad47be2bd852026d
 F ext/fts3/unicode/CaseFolding.txt 8c678ca52ecc95e16bc7afc2dbf6fc9ffa05db8c
 F ext/fts3/unicode/UnicodeData.txt cd07314edb62d49fde34debdaf92fa2aa69011e7
-F ext/fts3/unicode/mkunicode.tcl ed0534dd51efce39878bce33944c6073d37a1e20
+F ext/fts3/unicode/mkunicode.tcl 95cf7ec186e48d4985e433ff8a1c89090a774252
 F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95
 F ext/fts5/extract_api_docs.tcl 55a6d648d516f35d9a1e580ac00de27154e1904a
 F ext/fts5/fts5.h 81d1a92fc2b4bd477af7e4e0b38b456f3e199fba
-F ext/fts5/fts5Int.h 918e947c0c20122ed5eb9ea695d83c6c8cf7239a
-F ext/fts5/fts5_aux.c d53f00f31ad615ca4f139dd8751f9041afa00971
-F ext/fts5/fts5_buffer.c 7428b0bcb257641cbecc3bacce7f40686cf99f36
-F ext/fts5/fts5_config.c 7d19f4516cd79f1f8b58d38aa051b70195404422
-F ext/fts5/fts5_expr.c 3386ab0a71dbab7e1259c3b16d6113c97d14123e
-F ext/fts5/fts5_hash.c c1cfdb2cae0fad00b06fae38a40eaf9261563ccc
-F ext/fts5/fts5_index.c ad32235180757f182050b8d24c9dbe61056385d2
-F ext/fts5/fts5_main.c c5b2a219d65967c07fd1bc8fd45206863a2fe360
-F ext/fts5/fts5_storage.c 3e672a0d35f63979556903861b324e7b8932cecc
-F ext/fts5/fts5_tcl.c b82f13f73a30f0959f539743f8818bece994a970
-F ext/fts5/fts5_tokenize.c 97251d68d7a6a9415bde1203f9382864dfc1f989
-F ext/fts5/fts5_unicode2.c da3cf712f05cd8347c8c5bc00964cc0361c88da9
-F ext/fts5/fts5_varint.c 366452037bf9a000c351374b489badc1b3541796
-F ext/fts5/fts5_vocab.c e454fa58c6d591024659a9b61eece0d708e8b575
+F ext/fts5/fts5Int.h c91773920639c01571d6870ac0c20e960798f79c
+F ext/fts5/fts5_aux.c 7cd0e2858171dacf505fea4e2e84ee6126854c3d
+F ext/fts5/fts5_buffer.c 80f9ba4431848cb857e3d2158f5280093dcd8015
+F ext/fts5/fts5_config.c b2456e9625bca41c51d54c363e369c6356895c90
+F ext/fts5/fts5_expr.c d2e148345639c5a5583e0daa39a639bf298ae6a7
+F ext/fts5/fts5_hash.c 219f4edd72e5cf95b19c33f1058809a18fad5229
+F ext/fts5/fts5_index.c fb1f0de6b4cd02a212c0c9c5580daa64a5634035
+F ext/fts5/fts5_main.c c24ee96e7b97178d02e66e1fe1d43f6145aab8f8
+F ext/fts5/fts5_storage.c 4cae85b5287b159d9d98174a4e70adf872b0930a
+F ext/fts5/fts5_tcl.c 85eb4e0d0fefa9420b78151496ad4599a1783e20
+F ext/fts5/fts5_tokenize.c 30f97a8c74683797b4cd233790444fbefb3b0708
+F ext/fts5/fts5_unicode2.c 78273fbd588d1d9bd0a7e4e0ccc9207348bae33c
+F ext/fts5/fts5_varint.c 3f86ce09cab152e3d45490d7586b7ed2e40c13f1
+F ext/fts5/fts5_vocab.c 4e268a3fcbc099e50e335a1135be985a41ff6f7f
 F ext/fts5/fts5parse.y 833db1101b78c0c47686ab1b84918e38c36e9452
 F ext/fts5/mkportersteps.tcl 5acf962d2e0074f701620bb5308155fa1e4a63ba
 F ext/fts5/test/fts5_common.tcl 9553cce0757092d194307c2168d4edd100eab578
@@ -178,7 +178,7 @@ F ext/fts5/test/fts5unindexed.test e9539d5b78c677315e7ed8ea911d4fd25437c680
 F ext/fts5/test/fts5version.test bed59038e937c40d3c0056d08076db7874c6cd4a
 F ext/fts5/test/fts5vocab.test cdf97b9678484e9bad5062edf9c9106e5c3b0c5c
 F ext/fts5/tool/loadfts5.tcl 7ef3e62131f0434a78e4f5c5b056b09d221710a8
-F ext/fts5/tool/mkfts5c.tcl fdb449263837a18d9131bc2f61b256fd77e64361
+F ext/fts5/tool/mkfts5c.tcl 7174fce13c9d4b11c702eef3767344066cffe87e
 F ext/fts5/tool/showfts5.tcl 921f33b30c3189deefd2b2cc81f951638544aaf1
 F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43
 F ext/icu/icu.c b2732aef0b076e4276d9b39b5a33cec7a05e1413
@@ -248,7 +248,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e
 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
 F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
-F main.mk 934da670dac2fe2b40986a83741cec770c91fdc0
+F main.mk 8a1aded277e90ea7c10d0100d1a38f980e7d12a1
 F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea
 F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a
 F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
@@ -1364,7 +1364,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 2a897b9e94acaf1fd91e9f8e94fa52e01694f011
-R a63cfb1ec4b20130b51d242769f92882
-U drh
-Z c9a2a6985068d8d618fc6cc57a241b1d
+P c9ddbd88998d9523e72ad910ea67eb55024b3a88
+R 6e7391ae89eb1933cb67f3ce933af577
+U dan
+Z 75f643c411d6a670d86998374f15370f
index 5b0468411c63ae5c1c4129800dcaca116432f51a..64d940be85de1a5fa9d1dda2a9f092933694df02 100644 (file)
@@ -1 +1 @@
-c9ddbd88998d9523e72ad910ea67eb55024b3a88
\ No newline at end of file
+7819002ed85497bbd0f9cf4d39df641573324436
\ No newline at end of file