From: dan Date: Thu, 25 Jun 2015 20:10:24 +0000 (+0000) Subject: Add a script to combine all fts5 code into a single file - fts5.c - that can be used... X-Git-Tag: version-3.8.11~114^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed2589f5556abcf379bbd0570460b182257b6e34;p=thirdparty%2Fsqlite.git Add a script to combine all fts5 code into a single file - fts5.c - that can be used to build an SQLite loadable extension. FossilOrigin-Name: 46e86b0637248fb4d623c97778cc041eabe3636c --- diff --git a/Makefile.in b/Makefile.in index 91bed06261..a4c585c7cd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -352,7 +352,7 @@ SRC += \ $(TOP)/ext/fts5/fts5Int.h \ $(TOP)/ext/fts5/fts5_aux.c \ $(TOP)/ext/fts5/fts5_buffer.c \ - $(TOP)/ext/fts5/fts5.c \ + $(TOP)/ext/fts5/fts5_main.c \ $(TOP)/ext/fts5/fts5_config.c \ $(TOP)/ext/fts5/fts5_expr.c \ $(TOP)/ext/fts5/fts5_hash.c \ diff --git a/ext/fts5/fts5Int.h b/ext/fts5/fts5Int.h index eef36f811e..07d1e4fecb 100644 --- a/ext/fts5/fts5Int.h +++ b/ext/fts5/fts5Int.h @@ -14,7 +14,11 @@ #ifndef _FTS5INT_H #define _FTS5INT_H +#ifdef SQLITE_ENABLE_FTS5 + #include "fts5.h" +#include "sqlite3ext.h" +SQLITE_EXTENSION_INIT1 #include #include @@ -689,3 +693,4 @@ int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic); **************************************************************************/ #endif +#endif diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c index dee9cd7ef3..ec930f1a3b 100644 --- a/ext/fts5/fts5_index.c +++ b/ext/fts5/fts5_index.c @@ -4273,7 +4273,7 @@ static int fts5IndexCharlenToBytelen(const char *p, int nByte, int nChar){ ** pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of ** unicode characters in the string. */ -int fts5IndexCharlen(const char *pIn, int nIn){ +static int fts5IndexCharlen(const char *pIn, int nIn){ int nChar = 0; int i = 0; while( imallocFailed && rc==SQLITE_OK ){ - rc = sqlite3Fts5Init(db); + rc = sqlite3_fts5_init(db, 0, 0); } #endif diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index 9f6699b9a6..5b00368427 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -96,9 +96,6 @@ foreach hdr { fts3Int.h fts3_hash.h fts3_tokenizer.h - fts5.h - fts5Int.h - fts5parse.h hash.h hwtime.h keywordhash.h @@ -372,20 +369,6 @@ foreach file { fts3_unicode.c fts3_unicode2.c - fts5_aux.c - fts5_buffer.c - fts5.c - fts5_config.c - fts5_expr.c - fts5_hash.c - fts5_index.c - fts5parse.c - fts5_storage.c - fts5_tokenize.c - fts5_unicode2.c - fts5_varint.c - fts5_vocab.c - rtree.c icu.c fts3_icu.c