Fossil SCM

Begin adding infrastructure to support full-text search using FTS4.

drh 2014-12-17 16:19 UTC trunk
Commit 9f9dfe3a9881aeb8ff912aa329871399c0b9ee87
+22 -13
--- src/db.c
+++ src/db.c
@@ -688,10 +688,25 @@
688688
z = 0;
689689
}
690690
db_finalize(&s);
691691
return z;
692692
}
693
+
694
+/*
695
+** Invoke sqlite3_close() but also check its return code and if the
696
+** return code is SQLITE_BUSY, report errors.
697
+*/
698
+static void db_close_with_checks(sqlite3 *db, int reportErrors){
699
+ int rc = sqlite3_close(db);
700
+ if( rc==SQLITE_BUSY && reportErrors ){
701
+ sqlite3_stmt *pStmt;
702
+ while( (pStmt = sqlite3_next_stmt(g.db, pStmt))!=0 ){
703
+ fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt));
704
+ }
705
+ }
706
+}
707
+
693708
694709
/*
695710
** Initialize a new database file with the given schema. If anything
696711
** goes wrong, call db_err() to exit.
697712
*/
@@ -822,10 +837,11 @@
822837
0, 0
823838
);
824839
if( g.fSqlTrace ) sqlite3_trace(db, db_sql_trace, 0);
825840
re_add_sql_func(db);
826841
foci_register(db);
842
+ ftsearch_add_sql_func(db);
827843
sqlite3_exec(db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
828844
return db;
829845
}
830846
831847
@@ -867,24 +883,24 @@
867883
}
868884
869885
/*
870886
** Close the user database.
871887
*/
872
-void db_close_config(){
888
+void db_close_config(int reportErrors){
873889
if( g.useAttach ){
874890
db_detach("configdb");
875891
g.useAttach = 0;
876892
g.zConfigDbName = 0;
877893
}else if( g.dbConfig ){
878894
sqlite3_wal_checkpoint(g.dbConfig, 0);
879
- sqlite3_close(g.dbConfig);
895
+ db_close_with_checks(g.dbConfig, reportErrors);
880896
g.dbConfig = 0;
881897
g.zConfigDbType = 0;
882898
g.zConfigDbName = 0;
883899
}else if( g.db && fossil_strcmp(g.zMainDbType, "configdb")==0 ){
884900
sqlite3_wal_checkpoint(g.db, 0);
885
- sqlite3_close(g.db);
901
+ db_close_with_checks(g.db, reportErrors);
886902
g.db = 0;
887903
g.zMainDbType = 0;
888904
g.zConfigDbName = 0;
889905
}
890906
}
@@ -904,11 +920,11 @@
904920
void db_open_config(int useAttach){
905921
char *zDbName;
906922
char *zHome;
907923
if( g.zConfigDbName ){
908924
if( useAttach==g.useAttach ) return;
909
- db_close_config();
925
+ db_close_config(1);
910926
}
911927
#if defined(_WIN32) || defined(__CYGWIN__)
912928
zHome = fossil_getenv("LOCALAPPDATA");
913929
if( zHome==0 ){
914930
zHome = fossil_getenv("APPDATA");
@@ -1295,11 +1311,10 @@
12951311
**
12961312
** Check for unfinalized statements and report errors if the reportErrors
12971313
** argument is true. Ignore unfinalized statements when false.
12981314
*/
12991315
void db_close(int reportErrors){
1300
- sqlite3_stmt *pStmt;
13011316
if( g.db==0 ) return;
13021317
if( g.fSqlStats ){
13031318
int cur, hiwtr;
13041319
sqlite3_db_status(g.db, SQLITE_DBSTATUS_LOOKASIDE_USED, &cur, &hiwtr, 0);
13051320
fprintf(stderr, "-- LOOKASIDE_USED %10d %10d\n", cur, hiwtr);
@@ -1327,20 +1342,14 @@
13271342
}
13281343
while( db.pAllStmt ){
13291344
db_finalize(db.pAllStmt);
13301345
}
13311346
db_end_transaction(1);
1332
- pStmt = 0;
1333
- if( reportErrors ){
1334
- while( (pStmt = sqlite3_next_stmt(g.db, pStmt))!=0 ){
1335
- fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt));
1336
- }
1337
- }
1338
- db_close_config();
1347
+ db_close_config(reportErrors);
13391348
if( g.db ){
13401349
sqlite3_wal_checkpoint(g.db, 0);
1341
- sqlite3_close(g.db);
1350
+ db_close_with_checks(g.db, reportErrors);
13421351
g.db = 0;
13431352
g.zMainDbType = 0;
13441353
}
13451354
g.repositoryOpen = 0;
13461355
g.localOpen = 0;
13471356
13481357
ADDED src/ftsearch.c
--- src/db.c
+++ src/db.c
@@ -688,10 +688,25 @@
688 z = 0;
689 }
690 db_finalize(&s);
691 return z;
692 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
694 /*
695 ** Initialize a new database file with the given schema. If anything
696 ** goes wrong, call db_err() to exit.
697 */
@@ -822,10 +837,11 @@
822 0, 0
823 );
824 if( g.fSqlTrace ) sqlite3_trace(db, db_sql_trace, 0);
825 re_add_sql_func(db);
826 foci_register(db);
 
827 sqlite3_exec(db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
828 return db;
829 }
830
831
@@ -867,24 +883,24 @@
867 }
868
869 /*
870 ** Close the user database.
871 */
872 void db_close_config(){
873 if( g.useAttach ){
874 db_detach("configdb");
875 g.useAttach = 0;
876 g.zConfigDbName = 0;
877 }else if( g.dbConfig ){
878 sqlite3_wal_checkpoint(g.dbConfig, 0);
879 sqlite3_close(g.dbConfig);
880 g.dbConfig = 0;
881 g.zConfigDbType = 0;
882 g.zConfigDbName = 0;
883 }else if( g.db && fossil_strcmp(g.zMainDbType, "configdb")==0 ){
884 sqlite3_wal_checkpoint(g.db, 0);
885 sqlite3_close(g.db);
886 g.db = 0;
887 g.zMainDbType = 0;
888 g.zConfigDbName = 0;
889 }
890 }
@@ -904,11 +920,11 @@
904 void db_open_config(int useAttach){
905 char *zDbName;
906 char *zHome;
907 if( g.zConfigDbName ){
908 if( useAttach==g.useAttach ) return;
909 db_close_config();
910 }
911 #if defined(_WIN32) || defined(__CYGWIN__)
912 zHome = fossil_getenv("LOCALAPPDATA");
913 if( zHome==0 ){
914 zHome = fossil_getenv("APPDATA");
@@ -1295,11 +1311,10 @@
1295 **
1296 ** Check for unfinalized statements and report errors if the reportErrors
1297 ** argument is true. Ignore unfinalized statements when false.
1298 */
1299 void db_close(int reportErrors){
1300 sqlite3_stmt *pStmt;
1301 if( g.db==0 ) return;
1302 if( g.fSqlStats ){
1303 int cur, hiwtr;
1304 sqlite3_db_status(g.db, SQLITE_DBSTATUS_LOOKASIDE_USED, &cur, &hiwtr, 0);
1305 fprintf(stderr, "-- LOOKASIDE_USED %10d %10d\n", cur, hiwtr);
@@ -1327,20 +1342,14 @@
1327 }
1328 while( db.pAllStmt ){
1329 db_finalize(db.pAllStmt);
1330 }
1331 db_end_transaction(1);
1332 pStmt = 0;
1333 if( reportErrors ){
1334 while( (pStmt = sqlite3_next_stmt(g.db, pStmt))!=0 ){
1335 fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt));
1336 }
1337 }
1338 db_close_config();
1339 if( g.db ){
1340 sqlite3_wal_checkpoint(g.db, 0);
1341 sqlite3_close(g.db);
1342 g.db = 0;
1343 g.zMainDbType = 0;
1344 }
1345 g.repositoryOpen = 0;
1346 g.localOpen = 0;
1347
1348 DDED src/ftsearch.c
--- src/db.c
+++ src/db.c
@@ -688,10 +688,25 @@
688 z = 0;
689 }
690 db_finalize(&s);
691 return z;
692 }
693
694 /*
695 ** Invoke sqlite3_close() but also check its return code and if the
696 ** return code is SQLITE_BUSY, report errors.
697 */
698 static void db_close_with_checks(sqlite3 *db, int reportErrors){
699 int rc = sqlite3_close(db);
700 if( rc==SQLITE_BUSY && reportErrors ){
701 sqlite3_stmt *pStmt;
702 while( (pStmt = sqlite3_next_stmt(g.db, pStmt))!=0 ){
703 fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt));
704 }
705 }
706 }
707
708
709 /*
710 ** Initialize a new database file with the given schema. If anything
711 ** goes wrong, call db_err() to exit.
712 */
@@ -822,10 +837,11 @@
837 0, 0
838 );
839 if( g.fSqlTrace ) sqlite3_trace(db, db_sql_trace, 0);
840 re_add_sql_func(db);
841 foci_register(db);
842 ftsearch_add_sql_func(db);
843 sqlite3_exec(db, "PRAGMA foreign_keys=OFF;", 0, 0, 0);
844 return db;
845 }
846
847
@@ -867,24 +883,24 @@
883 }
884
885 /*
886 ** Close the user database.
887 */
888 void db_close_config(int reportErrors){
889 if( g.useAttach ){
890 db_detach("configdb");
891 g.useAttach = 0;
892 g.zConfigDbName = 0;
893 }else if( g.dbConfig ){
894 sqlite3_wal_checkpoint(g.dbConfig, 0);
895 db_close_with_checks(g.dbConfig, reportErrors);
896 g.dbConfig = 0;
897 g.zConfigDbType = 0;
898 g.zConfigDbName = 0;
899 }else if( g.db && fossil_strcmp(g.zMainDbType, "configdb")==0 ){
900 sqlite3_wal_checkpoint(g.db, 0);
901 db_close_with_checks(g.db, reportErrors);
902 g.db = 0;
903 g.zMainDbType = 0;
904 g.zConfigDbName = 0;
905 }
906 }
@@ -904,11 +920,11 @@
920 void db_open_config(int useAttach){
921 char *zDbName;
922 char *zHome;
923 if( g.zConfigDbName ){
924 if( useAttach==g.useAttach ) return;
925 db_close_config(1);
926 }
927 #if defined(_WIN32) || defined(__CYGWIN__)
928 zHome = fossil_getenv("LOCALAPPDATA");
929 if( zHome==0 ){
930 zHome = fossil_getenv("APPDATA");
@@ -1295,11 +1311,10 @@
1311 **
1312 ** Check for unfinalized statements and report errors if the reportErrors
1313 ** argument is true. Ignore unfinalized statements when false.
1314 */
1315 void db_close(int reportErrors){
 
1316 if( g.db==0 ) return;
1317 if( g.fSqlStats ){
1318 int cur, hiwtr;
1319 sqlite3_db_status(g.db, SQLITE_DBSTATUS_LOOKASIDE_USED, &cur, &hiwtr, 0);
1320 fprintf(stderr, "-- LOOKASIDE_USED %10d %10d\n", cur, hiwtr);
@@ -1327,20 +1342,14 @@
1342 }
1343 while( db.pAllStmt ){
1344 db_finalize(db.pAllStmt);
1345 }
1346 db_end_transaction(1);
1347 db_close_config(reportErrors);
 
 
 
 
 
 
1348 if( g.db ){
1349 sqlite3_wal_checkpoint(g.db, 0);
1350 db_close_with_checks(g.db, reportErrors);
1351 g.db = 0;
1352 g.zMainDbType = 0;
1353 }
1354 g.repositoryOpen = 0;
1355 g.localOpen = 0;
1356
1357 DDED src/ftsearch.c
--- a/src/ftsearch.c
+++ b/src/ftsearch.c
@@ -0,0 +1,303 @@
1
+/*
2
+** Copyright (c) 2014 D. Richard Hipp
3
+**
4
+** This program is free software; you can redistribute it and/or
5
+** modify it under the terms of the Simplified BSD License (also
6
+** known as the "2-Clause License" or "FreeBSD License".)
7
+
8
+** This program is distributed in the hope that it will be useful,
9
+** but without any warranty; without even the implied warranty of
10
+** merchantability or fitness for a particular purpose.
11
+**
12
+** Author contact information:
13
+** [email protected]
14
+** http://www.hwaci.com/drh/
15
+**
16
+*******************************************************************************
17
+**
18
+** This file contains code to implement a full-text search function in
19
+** Fossil using the FTS4 feature of SQLite.
20
+*/
21
+#include "config.h"
22
+#include "ftsearch.h"
23
+#include <assert.h>
24
+
25
+/*
26
+** Document Codes:
27
+**
28
+** A "document code" is a string that describes a particular document.
29
+** The first letter is the document type. Second letter is '-' (for
30
+** human readability. Subsequent letters are a unique identifier for
31
+** the document.
32
+**
33
+** c-RID - Check-in comment
34
+** d-MID-FID - Diff on filentent(mlink.fid)"
35
+ " code to iTKTID - Ticket text
36
+** w-TAGID - Wiki page (most recent version)
37
+**
38
+** The FTSEARCHXREF table provides a mapping between document codes
39
+** (i
40
+ id
41
+ /*
42
+** Copyright (c) 2014 D014 D. Richard Hipp
43
+**
44
+** This program is free software; you can redistribute it and/or
45
+** modify it under the terms of the Simplified BSD License (also
46
+** known as the "2-Clause License" or "FreeBSD License".)
47
+
48
+** This program is distributed in the hope that it will be useful,
49
+** but without any warranty; without even the implied warranty of
50
+** merchantability or fitness for a particular purpose.
51
+**
52
+** Author contact information:
53
+** [email protected]
54
+** http://www.hwaci.com/drh/
55
+**
56
+*******************************************************************************
57
+**
58
+** This file contains code to implement a full-text search function in
59
+** Fossil using the FTS4 feature of SQLite.
60
+*/
61
+#include "config.h"
62
+#include "ftsearch.h"
63
+#include <assert.h>
64
+
65
+/*
66
+** Document Codes:
67
+**
68
+** A "document code" is a string that describes a particular document.
69
+** The first letter is the document type. Second letter is '-' (for
70
+** huUUan readability. Subsequent letters are a unique identifier for
71
+** the document.
72
+**
73
+** c-RID - Check-in comment
74
+** d-MID-FID - Diff on file FID from checkin MID
75
+** e-TAGID - Event text
76
+** f-FNID - File content (most recent version)
77
+** t-TKTID - Ticket text
78
+** w-TAGID - Wiki page (most recent version)
79
+**
80
+** The FTSEARCHXREF table provides a mapping between document codes
81
+** (in the FTSID column) to the DOCID of the FTS4 tablam is free software; you can redistribute it and/or
82
+** modify it under the terms of the Simplified BSD License (also
83
+** known as the "2-Clause The returned text is in the Wiki format and contains
84
+** links to the docureturn zRes;
85
+}
86
+
87
+/* Return a human-readable description for the document described by
88
+** the arguments.
89
+**
90
+** See ftsearch_content() for further information
91
+*/
92
+char *ftsearch_description(
93
+ const char *zDocType,
94
+ const char *zDocId,
95
+ int bLink /* Provide hyperlink in text if true */
96
+){
97
+ char *zRes = 0; /* The result to be returned */
98
+ int id;
99
+ if( zDocId==0 ){
100
+ if( zDocType[0]==0 || zDocType[1]==0 ) return 0;
101
+ zDocId = zDocType + 2;
102
+ }
103
+ id = atoi(zDocId);
104
+ switch( zDocType[0] ){
105
+ case 'c': { /* A check-in comment. zDocId is the RID */
106
+ char *zUuid = db_text("","SELECT uuid FROM blob WHERE rid=%d", id);
107
+ zRes = mprintf("Check-in [%S]", zUuid);
108
+ fossil_free(zUuid);
109
+ break;
110
+ }
111
+ case 'f': { /* A file. zDocId is the FNID */
112
+ char *zName = db_text("","SELECT name FROM filename WHERE fnid=%d",id);
113
+ zRes = mprintf("File %s", zName);
114
+ fossil_free(zName);
115
+ break;
116
+ }
117
+ default: {
118
+ /* No-op */
119
+ }
120
+ }
121
+ return zRes;
122
+}
123
+
124
+/*
125
+** COMMAND: test-ftsearch-content
126
+**
127
+** Usage: %fossil test-ftsearch-content DOCUMENTCODE
128
+**
129
+** Return the content for the given DOCUMENTCODE. This command is used
130
+** for testing and debugging the ftsearch_content() method in the
131
+** full-text search module.
132
+*/
133
+void test_doc_content_cmd(void){
134
+ char *zContent = 0;
135
+ char *zDesc = 0;
136
+ db_find_and_open_repository(0, 0);
137
+ verify_all_options();
138
+ if( g.argc!=3 ) usage("DOCUMENTCODE");
139
+ if( strlen(g.argv[2])>3 ){
140
+ zContent = ftsearch_content(g.argv[2],0);
141
+ zDesc = ftsearch_description(g.argv[2],0,0);
142
+ }
143
+ if( zDesc ){
144
+ fossil_print("Description: %s\n", zDesc);
145
+ fossil_free(zDesc);
146
+ }
147
+ if( zContent ){
148
+ fossil_print(
149
+ "Content -------------------------------------------------------------\n"
150
+ "%s\n"
151
+ "---------------------------------------------------------------------\n",
152
+ zContent);
153
+ fossil_free(zContent);
154
+ }
155
+}
156
+
157
+/*
158
+** Implementation of the ftsearch_content() SQL function.
159
+*/
160
+static void ftsearch_content_sql_func(
161
+ sqlite3_context *context,
162
+ int argc,
163
+ sqlite3_value **argv
164
+){
165
+ const char *zDocType; /* [cdeftw] */
166
+ const char *zDocId; /* Identifier based on zDocType */
167
+ char *zRes; /* Result */
168
+
169
+ zDocType = (const char*)sqlite3_value_text(argv[0]);
170
+ zDocId = argc>=2 ? (const char*)sqlite3_value_text(argv[1]) : 0;
171
+ zRes = ftsearch_content(zDocType, zDocId);
172
+ if( zRes ){
173
+ sqlite3_result_text(context, zRes, -1, (void(*)(void*))fossil_free);
174
+ }
175
+}
176
+
177
+/*
178
+** Invoke this routine in order to install the ftsearch_content() SQL
179
+** function on an SQLite database connection.
180
+**
181
+** sqlite3_auto_extension(ftsearch_add_sql_func);
182
+**
183
+** to cause this extension to be automatically loaded into each new
184
+** database connection.
185
+*/
186
+int ftsearch_add_sql_func(sqlite3 *db){
187
+ int rc;
188
+ rc = sqlite3_create_function(db, "ftsearch_content", 1, SQLITE_UTF8, 0,
189
+ ftsearch_content_sql_func, 0, 0);
190
+ if( rc==SQLITE_OK ){
191
+ rc = sqlite3_create_function(db, "ftsearch_content", 2, SQLITE_UTF8, 0,
192
+ ftsearch_content_sql_func, 0, 0);
193
+ }
194
+ return rc;
195
+}
196
+
197
+/*
198
+** Delete the ftsearch tables, views, and indexes
199
+*/
200
+void ftsearch_disable_all(void){
201
+ Stmt q;
202
+ Blob sql;
203
+ db_begin_transaction();
204
+ db_prepare(&q,
205
+ "SELECT type, name FROM %s.sqlite_master"
206
+ " WHERE type IN ('table','view')"
207
+ " AND name GLOB 'ftsearch*'"
208
+ " AND name NOT GLOB 'ftsearch_*'",
209
+ db_name("repository")
210
+ );
211
+ blob_init(&sql, 0, 0);
212
+ while( db_step(&q)==SQLITE_ROW ){
213
+ blob_appendf(&sql, "DROP %s IF EXISTS \"%w\";\n",
214
+ db_column_text(&q,0), db_column_text(&q,1));
215
+ }
216
+ db_finalize(&q);
217
+ db_multi_exec("%s", blob_str(&sql)/*safe-for-%s*/);
218
+ blob_reset(&sql);
219
+ db_end_transaction(0);
220
+}
221
+
222
+/*
223
+** Completely rebuild the ftsearch indexes from scratch
224
+*/
225
+void ftsearch_rebuild_all(void){
226
+ const char *zEnables;
227
+ db_begin_transaction();
228
+ ftsearch_disable_all();
229
+ zEnables = db_get("ftsearch-index-type", "cdeftw");
230
+
231
+ /* If none of the search categories are enabled, then do not
232
+ ** bother constructing the search tables
233
+ */
234
+ if( sqlite3_strglob("*[cdeftw]*", zEnables) ) return;
235
+
236
+ /* The FTSSEARCHXREF table provides a mapping between the integer
237
+ ** document-ids in FTS4 to the "document codes" that describe a
238
+ ** referenced object
239
+ */
240
+ db_multi_exec(
241
+ "CREATE TABLE %s.ftsearchxref(\n"
242
+ " docid INTEGER PRIMARY KEY,\n" /* Link to ftsearch.docid */
243
+ " ftsid TEXT UNIQUE,\n" /* The document code */
244
+ " mtime DATE\n" /* Timestamp on this object */
245
+ ");\n",
246
+ db_name("repository")
247
+ );
248
+
249
+ /* The FTSEARCHBODY view provides the content for the FTS4 table
250
+ */
251
+ db_multi_exec(
252
+ "CREATE VIEW %s.ftsearchbody AS"
253
+ " SELECT docid AS rowid, ftsearch_content(ftsid) AS body"
254
+ " FROM ftsearchxref;\n",
255
+ db_name("repository")
256
+ );
257
+
258
+ /* This is the FT */
259
+ db_multi_exec(
260
+ ;
261
+ db_multi_exec(
262
+ "CREAT"
263
+ " USING fts4(co/*
264
+** Copyright (c) 2014 D. Richard Hipp
265
+**
266
+** This program is free software; you can redistribute it and/or
267
+** modify it under the terms of the Simplified BSD License (also
268
+** known as the "2-Clause License" or "FreeBSD License".)
269
+
270
+** This program is distributed in the hope that it will be useful,
271
+** but without any warranty; without even the implied warranty of
272
+** merchantability or fitness for a particular purpose.
273
+**
274
+** Author contact information:
275
+** [email protected]
276
+** http://www.hwaci.com/drh/
277
+**
278
+*******************************************************************************
279
+**
280
+** This file contains code to implement a full-text search function in
281
+** Fossil using the FTS4 feature of SQLite.
282
+*/
283
+#include "config.h"
284
+#include "ftsearch.h"
285
+#include <assert.h>
286
+
287
+/*
288
+** Document Codes:
289
+**
290
+** A "document code" is a string that describes a particular document.
291
+** The first letter is the document type. Second letter is '-' (for
292
+** human readability. Subsequent letters are a unique identifier for
293
+** the document.
294
+**
295
+** c-RID - Check-in comment
296
+** d-MID-FID - Diff on file FID from checkin MID
297
+** e-TAGID - Event text
298
+** f-FNID - File content (most recent version)
299
+** t-TKTID - Ticket text
300
+** w-TAGID - Wiki page (most recent version)
301
+**
302
+** The FTSEARCHXREF table provides a mapping between document codes
303
+** (in the FTSID column)
--- a/src/ftsearch.c
+++ b/src/ftsearch.c
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/ftsearch.c
+++ b/src/ftsearch.c
@@ -0,0 +1,303 @@
1 /*
2 ** Copyright (c) 2014 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains code to implement a full-text search function in
19 ** Fossil using the FTS4 feature of SQLite.
20 */
21 #include "config.h"
22 #include "ftsearch.h"
23 #include <assert.h>
24
25 /*
26 ** Document Codes:
27 **
28 ** A "document code" is a string that describes a particular document.
29 ** The first letter is the document type. Second letter is '-' (for
30 ** human readability. Subsequent letters are a unique identifier for
31 ** the document.
32 **
33 ** c-RID - Check-in comment
34 ** d-MID-FID - Diff on filentent(mlink.fid)"
35 " code to iTKTID - Ticket text
36 ** w-TAGID - Wiki page (most recent version)
37 **
38 ** The FTSEARCHXREF table provides a mapping between document codes
39 ** (i
40 id
41 /*
42 ** Copyright (c) 2014 D014 D. Richard Hipp
43 **
44 ** This program is free software; you can redistribute it and/or
45 ** modify it under the terms of the Simplified BSD License (also
46 ** known as the "2-Clause License" or "FreeBSD License".)
47
48 ** This program is distributed in the hope that it will be useful,
49 ** but without any warranty; without even the implied warranty of
50 ** merchantability or fitness for a particular purpose.
51 **
52 ** Author contact information:
53 ** [email protected]
54 ** http://www.hwaci.com/drh/
55 **
56 *******************************************************************************
57 **
58 ** This file contains code to implement a full-text search function in
59 ** Fossil using the FTS4 feature of SQLite.
60 */
61 #include "config.h"
62 #include "ftsearch.h"
63 #include <assert.h>
64
65 /*
66 ** Document Codes:
67 **
68 ** A "document code" is a string that describes a particular document.
69 ** The first letter is the document type. Second letter is '-' (for
70 ** huUUan readability. Subsequent letters are a unique identifier for
71 ** the document.
72 **
73 ** c-RID - Check-in comment
74 ** d-MID-FID - Diff on file FID from checkin MID
75 ** e-TAGID - Event text
76 ** f-FNID - File content (most recent version)
77 ** t-TKTID - Ticket text
78 ** w-TAGID - Wiki page (most recent version)
79 **
80 ** The FTSEARCHXREF table provides a mapping between document codes
81 ** (in the FTSID column) to the DOCID of the FTS4 tablam is free software; you can redistribute it and/or
82 ** modify it under the terms of the Simplified BSD License (also
83 ** known as the "2-Clause The returned text is in the Wiki format and contains
84 ** links to the docureturn zRes;
85 }
86
87 /* Return a human-readable description for the document described by
88 ** the arguments.
89 **
90 ** See ftsearch_content() for further information
91 */
92 char *ftsearch_description(
93 const char *zDocType,
94 const char *zDocId,
95 int bLink /* Provide hyperlink in text if true */
96 ){
97 char *zRes = 0; /* The result to be returned */
98 int id;
99 if( zDocId==0 ){
100 if( zDocType[0]==0 || zDocType[1]==0 ) return 0;
101 zDocId = zDocType + 2;
102 }
103 id = atoi(zDocId);
104 switch( zDocType[0] ){
105 case 'c': { /* A check-in comment. zDocId is the RID */
106 char *zUuid = db_text("","SELECT uuid FROM blob WHERE rid=%d", id);
107 zRes = mprintf("Check-in [%S]", zUuid);
108 fossil_free(zUuid);
109 break;
110 }
111 case 'f': { /* A file. zDocId is the FNID */
112 char *zName = db_text("","SELECT name FROM filename WHERE fnid=%d",id);
113 zRes = mprintf("File %s", zName);
114 fossil_free(zName);
115 break;
116 }
117 default: {
118 /* No-op */
119 }
120 }
121 return zRes;
122 }
123
124 /*
125 ** COMMAND: test-ftsearch-content
126 **
127 ** Usage: %fossil test-ftsearch-content DOCUMENTCODE
128 **
129 ** Return the content for the given DOCUMENTCODE. This command is used
130 ** for testing and debugging the ftsearch_content() method in the
131 ** full-text search module.
132 */
133 void test_doc_content_cmd(void){
134 char *zContent = 0;
135 char *zDesc = 0;
136 db_find_and_open_repository(0, 0);
137 verify_all_options();
138 if( g.argc!=3 ) usage("DOCUMENTCODE");
139 if( strlen(g.argv[2])>3 ){
140 zContent = ftsearch_content(g.argv[2],0);
141 zDesc = ftsearch_description(g.argv[2],0,0);
142 }
143 if( zDesc ){
144 fossil_print("Description: %s\n", zDesc);
145 fossil_free(zDesc);
146 }
147 if( zContent ){
148 fossil_print(
149 "Content -------------------------------------------------------------\n"
150 "%s\n"
151 "---------------------------------------------------------------------\n",
152 zContent);
153 fossil_free(zContent);
154 }
155 }
156
157 /*
158 ** Implementation of the ftsearch_content() SQL function.
159 */
160 static void ftsearch_content_sql_func(
161 sqlite3_context *context,
162 int argc,
163 sqlite3_value **argv
164 ){
165 const char *zDocType; /* [cdeftw] */
166 const char *zDocId; /* Identifier based on zDocType */
167 char *zRes; /* Result */
168
169 zDocType = (const char*)sqlite3_value_text(argv[0]);
170 zDocId = argc>=2 ? (const char*)sqlite3_value_text(argv[1]) : 0;
171 zRes = ftsearch_content(zDocType, zDocId);
172 if( zRes ){
173 sqlite3_result_text(context, zRes, -1, (void(*)(void*))fossil_free);
174 }
175 }
176
177 /*
178 ** Invoke this routine in order to install the ftsearch_content() SQL
179 ** function on an SQLite database connection.
180 **
181 ** sqlite3_auto_extension(ftsearch_add_sql_func);
182 **
183 ** to cause this extension to be automatically loaded into each new
184 ** database connection.
185 */
186 int ftsearch_add_sql_func(sqlite3 *db){
187 int rc;
188 rc = sqlite3_create_function(db, "ftsearch_content", 1, SQLITE_UTF8, 0,
189 ftsearch_content_sql_func, 0, 0);
190 if( rc==SQLITE_OK ){
191 rc = sqlite3_create_function(db, "ftsearch_content", 2, SQLITE_UTF8, 0,
192 ftsearch_content_sql_func, 0, 0);
193 }
194 return rc;
195 }
196
197 /*
198 ** Delete the ftsearch tables, views, and indexes
199 */
200 void ftsearch_disable_all(void){
201 Stmt q;
202 Blob sql;
203 db_begin_transaction();
204 db_prepare(&q,
205 "SELECT type, name FROM %s.sqlite_master"
206 " WHERE type IN ('table','view')"
207 " AND name GLOB 'ftsearch*'"
208 " AND name NOT GLOB 'ftsearch_*'",
209 db_name("repository")
210 );
211 blob_init(&sql, 0, 0);
212 while( db_step(&q)==SQLITE_ROW ){
213 blob_appendf(&sql, "DROP %s IF EXISTS \"%w\";\n",
214 db_column_text(&q,0), db_column_text(&q,1));
215 }
216 db_finalize(&q);
217 db_multi_exec("%s", blob_str(&sql)/*safe-for-%s*/);
218 blob_reset(&sql);
219 db_end_transaction(0);
220 }
221
222 /*
223 ** Completely rebuild the ftsearch indexes from scratch
224 */
225 void ftsearch_rebuild_all(void){
226 const char *zEnables;
227 db_begin_transaction();
228 ftsearch_disable_all();
229 zEnables = db_get("ftsearch-index-type", "cdeftw");
230
231 /* If none of the search categories are enabled, then do not
232 ** bother constructing the search tables
233 */
234 if( sqlite3_strglob("*[cdeftw]*", zEnables) ) return;
235
236 /* The FTSSEARCHXREF table provides a mapping between the integer
237 ** document-ids in FTS4 to the "document codes" that describe a
238 ** referenced object
239 */
240 db_multi_exec(
241 "CREATE TABLE %s.ftsearchxref(\n"
242 " docid INTEGER PRIMARY KEY,\n" /* Link to ftsearch.docid */
243 " ftsid TEXT UNIQUE,\n" /* The document code */
244 " mtime DATE\n" /* Timestamp on this object */
245 ");\n",
246 db_name("repository")
247 );
248
249 /* The FTSEARCHBODY view provides the content for the FTS4 table
250 */
251 db_multi_exec(
252 "CREATE VIEW %s.ftsearchbody AS"
253 " SELECT docid AS rowid, ftsearch_content(ftsid) AS body"
254 " FROM ftsearchxref;\n",
255 db_name("repository")
256 );
257
258 /* This is the FT */
259 db_multi_exec(
260 ;
261 db_multi_exec(
262 "CREAT"
263 " USING fts4(co/*
264 ** Copyright (c) 2014 D. Richard Hipp
265 **
266 ** This program is free software; you can redistribute it and/or
267 ** modify it under the terms of the Simplified BSD License (also
268 ** known as the "2-Clause License" or "FreeBSD License".)
269
270 ** This program is distributed in the hope that it will be useful,
271 ** but without any warranty; without even the implied warranty of
272 ** merchantability or fitness for a particular purpose.
273 **
274 ** Author contact information:
275 ** [email protected]
276 ** http://www.hwaci.com/drh/
277 **
278 *******************************************************************************
279 **
280 ** This file contains code to implement a full-text search function in
281 ** Fossil using the FTS4 feature of SQLite.
282 */
283 #include "config.h"
284 #include "ftsearch.h"
285 #include <assert.h>
286
287 /*
288 ** Document Codes:
289 **
290 ** A "document code" is a string that describes a particular document.
291 ** The first letter is the document type. Second letter is '-' (for
292 ** human readability. Subsequent letters are a unique identifier for
293 ** the document.
294 **
295 ** c-RID - Check-in comment
296 ** d-MID-FID - Diff on file FID from checkin MID
297 ** e-TAGID - Event text
298 ** f-FNID - File content (most recent version)
299 ** t-TKTID - Ticket text
300 ** w-TAGID - Wiki page (most recent version)
301 **
302 ** The FTSEARCHXREF table provides a mapping between document codes
303 ** (in the FTSID column)
+15 -3
--- src/main.mk
+++ src/main.mk
@@ -45,10 +45,11 @@
4545
$(SRCDIR)/event.c \
4646
$(SRCDIR)/export.c \
4747
$(SRCDIR)/file.c \
4848
$(SRCDIR)/finfo.c \
4949
$(SRCDIR)/foci.c \
50
+ $(SRCDIR)/ftsearch.c \
5051
$(SRCDIR)/fusefs.c \
5152
$(SRCDIR)/glob.c \
5253
$(SRCDIR)/graph.c \
5354
$(SRCDIR)/gzip.c \
5455
$(SRCDIR)/http.c \
@@ -167,10 +168,11 @@
167168
$(OBJDIR)/event_.c \
168169
$(OBJDIR)/export_.c \
169170
$(OBJDIR)/file_.c \
170171
$(OBJDIR)/finfo_.c \
171172
$(OBJDIR)/foci_.c \
173
+ $(OBJDIR)/ftsearch_.c \
172174
$(OBJDIR)/fusefs_.c \
173175
$(OBJDIR)/glob_.c \
174176
$(OBJDIR)/graph_.c \
175177
$(OBJDIR)/gzip_.c \
176178
$(OBJDIR)/http_.c \
@@ -286,10 +288,11 @@
286288
$(OBJDIR)/event.o \
287289
$(OBJDIR)/export.o \
288290
$(OBJDIR)/file.o \
289291
$(OBJDIR)/finfo.o \
290292
$(OBJDIR)/foci.o \
293
+ $(OBJDIR)/ftsearch.o \
291294
$(OBJDIR)/fusefs.o \
292295
$(OBJDIR)/glob.o \
293296
$(OBJDIR)/graph.o \
294297
$(OBJDIR)/gzip.o \
295298
$(OBJDIR)/http.o \
@@ -415,17 +418,17 @@
415418
416419
$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion
417420
$(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
418421
419422
# Setup the options used to compile the included SQLite library.
420
-SQLITE_OPTIONS = -DNDEBUG=1 \
421
- -DSQLITE_OMIT_LOAD_EXTENSION=1 \
423
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
422424
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
423425
-DSQLITE_THREADSAFE=0 \
424426
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
425427
-DSQLITE_OMIT_DEPRECATED \
426
- -DSQLITE_ENABLE_EXPLAIN_COMMENTS
428
+ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
429
+ -DSQLITE_ENABLE_FTS4
427430
428431
# Setup the options used to compile the included SQLite shell.
429432
SHELL_OPTIONS = -Dmain=sqlite3_shell \
430433
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
431434
-DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
@@ -514,10 +517,11 @@
514517
$(OBJDIR)/event_.c:$(OBJDIR)/event.h \
515518
$(OBJDIR)/export_.c:$(OBJDIR)/export.h \
516519
$(OBJDIR)/file_.c:$(OBJDIR)/file.h \
517520
$(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h \
518521
$(OBJDIR)/foci_.c:$(OBJDIR)/foci.h \
522
+ $(OBJDIR)/ftsearch_.c:$(OBJDIR)/ftsearch.h \
519523
$(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
520524
$(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
521525
$(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
522526
$(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
523527
$(OBJDIR)/http_.c:$(OBJDIR)/http.h \
@@ -868,10 +872,18 @@
868872
869873
$(OBJDIR)/foci.o: $(OBJDIR)/foci_.c $(OBJDIR)/foci.h $(SRCDIR)/config.h
870874
$(XTCC) -o $(OBJDIR)/foci.o -c $(OBJDIR)/foci_.c
871875
872876
$(OBJDIR)/foci.h: $(OBJDIR)/headers
877
+
878
+$(OBJDIR)/ftsearch_.c: $(SRCDIR)/ftsearch.c $(OBJDIR)/translate
879
+ $(OBJDIR)/translate $(SRCDIR)/ftsearch.c >$@
880
+
881
+$(OBJDIR)/ftsearch.o: $(OBJDIR)/ftsearch_.c $(OBJDIR)/ftsearch.h $(SRCDIR)/config.h
882
+ $(XTCC) -o $(OBJDIR)/ftsearch.o -c $(OBJDIR)/ftsearch_.c
883
+
884
+$(OBJDIR)/ftsearch.h: $(OBJDIR)/headers
873885
874886
$(OBJDIR)/fusefs_.c: $(SRCDIR)/fusefs.c $(OBJDIR)/translate
875887
$(OBJDIR)/translate $(SRCDIR)/fusefs.c >$@
876888
877889
$(OBJDIR)/fusefs.o: $(OBJDIR)/fusefs_.c $(OBJDIR)/fusefs.h $(SRCDIR)/config.h
878890
--- src/main.mk
+++ src/main.mk
@@ -45,10 +45,11 @@
45 $(SRCDIR)/event.c \
46 $(SRCDIR)/export.c \
47 $(SRCDIR)/file.c \
48 $(SRCDIR)/finfo.c \
49 $(SRCDIR)/foci.c \
 
50 $(SRCDIR)/fusefs.c \
51 $(SRCDIR)/glob.c \
52 $(SRCDIR)/graph.c \
53 $(SRCDIR)/gzip.c \
54 $(SRCDIR)/http.c \
@@ -167,10 +168,11 @@
167 $(OBJDIR)/event_.c \
168 $(OBJDIR)/export_.c \
169 $(OBJDIR)/file_.c \
170 $(OBJDIR)/finfo_.c \
171 $(OBJDIR)/foci_.c \
 
172 $(OBJDIR)/fusefs_.c \
173 $(OBJDIR)/glob_.c \
174 $(OBJDIR)/graph_.c \
175 $(OBJDIR)/gzip_.c \
176 $(OBJDIR)/http_.c \
@@ -286,10 +288,11 @@
286 $(OBJDIR)/event.o \
287 $(OBJDIR)/export.o \
288 $(OBJDIR)/file.o \
289 $(OBJDIR)/finfo.o \
290 $(OBJDIR)/foci.o \
 
291 $(OBJDIR)/fusefs.o \
292 $(OBJDIR)/glob.o \
293 $(OBJDIR)/graph.o \
294 $(OBJDIR)/gzip.o \
295 $(OBJDIR)/http.o \
@@ -415,17 +418,17 @@
415
416 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion
417 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
418
419 # Setup the options used to compile the included SQLite library.
420 SQLITE_OPTIONS = -DNDEBUG=1 \
421 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
422 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
423 -DSQLITE_THREADSAFE=0 \
424 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
425 -DSQLITE_OMIT_DEPRECATED \
426 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
 
427
428 # Setup the options used to compile the included SQLite shell.
429 SHELL_OPTIONS = -Dmain=sqlite3_shell \
430 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
431 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
@@ -514,10 +517,11 @@
514 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
515 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
516 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
517 $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h \
518 $(OBJDIR)/foci_.c:$(OBJDIR)/foci.h \
 
519 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
520 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
521 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
522 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
523 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
@@ -868,10 +872,18 @@
868
869 $(OBJDIR)/foci.o: $(OBJDIR)/foci_.c $(OBJDIR)/foci.h $(SRCDIR)/config.h
870 $(XTCC) -o $(OBJDIR)/foci.o -c $(OBJDIR)/foci_.c
871
872 $(OBJDIR)/foci.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
873
874 $(OBJDIR)/fusefs_.c: $(SRCDIR)/fusefs.c $(OBJDIR)/translate
875 $(OBJDIR)/translate $(SRCDIR)/fusefs.c >$@
876
877 $(OBJDIR)/fusefs.o: $(OBJDIR)/fusefs_.c $(OBJDIR)/fusefs.h $(SRCDIR)/config.h
878
--- src/main.mk
+++ src/main.mk
@@ -45,10 +45,11 @@
45 $(SRCDIR)/event.c \
46 $(SRCDIR)/export.c \
47 $(SRCDIR)/file.c \
48 $(SRCDIR)/finfo.c \
49 $(SRCDIR)/foci.c \
50 $(SRCDIR)/ftsearch.c \
51 $(SRCDIR)/fusefs.c \
52 $(SRCDIR)/glob.c \
53 $(SRCDIR)/graph.c \
54 $(SRCDIR)/gzip.c \
55 $(SRCDIR)/http.c \
@@ -167,10 +168,11 @@
168 $(OBJDIR)/event_.c \
169 $(OBJDIR)/export_.c \
170 $(OBJDIR)/file_.c \
171 $(OBJDIR)/finfo_.c \
172 $(OBJDIR)/foci_.c \
173 $(OBJDIR)/ftsearch_.c \
174 $(OBJDIR)/fusefs_.c \
175 $(OBJDIR)/glob_.c \
176 $(OBJDIR)/graph_.c \
177 $(OBJDIR)/gzip_.c \
178 $(OBJDIR)/http_.c \
@@ -286,10 +288,11 @@
288 $(OBJDIR)/event.o \
289 $(OBJDIR)/export.o \
290 $(OBJDIR)/file.o \
291 $(OBJDIR)/finfo.o \
292 $(OBJDIR)/foci.o \
293 $(OBJDIR)/ftsearch.o \
294 $(OBJDIR)/fusefs.o \
295 $(OBJDIR)/glob.o \
296 $(OBJDIR)/graph.o \
297 $(OBJDIR)/gzip.o \
298 $(OBJDIR)/http.o \
@@ -415,17 +418,17 @@
418
419 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion
420 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
421
422 # Setup the options used to compile the included SQLite library.
423 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
424 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
425 -DSQLITE_THREADSAFE=0 \
426 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
427 -DSQLITE_OMIT_DEPRECATED \
428 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
429 -DSQLITE_ENABLE_FTS4
430
431 # Setup the options used to compile the included SQLite shell.
432 SHELL_OPTIONS = -Dmain=sqlite3_shell \
433 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
434 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
@@ -514,10 +517,11 @@
517 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
518 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
519 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
520 $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h \
521 $(OBJDIR)/foci_.c:$(OBJDIR)/foci.h \
522 $(OBJDIR)/ftsearch_.c:$(OBJDIR)/ftsearch.h \
523 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
524 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
525 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
526 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
527 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
@@ -868,10 +872,18 @@
872
873 $(OBJDIR)/foci.o: $(OBJDIR)/foci_.c $(OBJDIR)/foci.h $(SRCDIR)/config.h
874 $(XTCC) -o $(OBJDIR)/foci.o -c $(OBJDIR)/foci_.c
875
876 $(OBJDIR)/foci.h: $(OBJDIR)/headers
877
878 $(OBJDIR)/ftsearch_.c: $(SRCDIR)/ftsearch.c $(OBJDIR)/translate
879 $(OBJDIR)/translate $(SRCDIR)/ftsearch.c >$@
880
881 $(OBJDIR)/ftsearch.o: $(OBJDIR)/ftsearch_.c $(OBJDIR)/ftsearch.h $(SRCDIR)/config.h
882 $(XTCC) -o $(OBJDIR)/ftsearch.o -c $(OBJDIR)/ftsearch_.c
883
884 $(OBJDIR)/ftsearch.h: $(OBJDIR)/headers
885
886 $(OBJDIR)/fusefs_.c: $(SRCDIR)/fusefs.c $(OBJDIR)/translate
887 $(OBJDIR)/translate $(SRCDIR)/fusefs.c >$@
888
889 $(OBJDIR)/fusefs.o: $(OBJDIR)/fusefs_.c $(OBJDIR)/fusefs.h $(SRCDIR)/config.h
890
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -52,10 +52,11 @@
5252
event
5353
export
5454
file
5555
finfo
5656
foci
57
+ ftsearch
5758
fusefs
5859
glob
5960
graph
6061
gzip
6162
http
@@ -147,19 +148,18 @@
147148
}
148149
149150
# Options used to compile the included SQLite library.
150151
#
151152
set SQLITE_OPTIONS {
152
- -DNDEBUG=1
153153
-DSQLITE_OMIT_LOAD_EXTENSION=1
154154
-DSQLITE_ENABLE_LOCKING_STYLE=0
155155
-DSQLITE_THREADSAFE=0
156156
-DSQLITE_DEFAULT_FILE_FORMAT=4
157157
-DSQLITE_OMIT_DEPRECATED
158158
-DSQLITE_ENABLE_EXPLAIN_COMMENTS
159
+ -DSQLITE_ENABLE_FTS4
159160
}
160
-#lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1
161161
#lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4
162162
#lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI
163163
#lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096
164164
165165
# Options used to compile the included SQLite shell.
166166
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -52,10 +52,11 @@
52 event
53 export
54 file
55 finfo
56 foci
 
57 fusefs
58 glob
59 graph
60 gzip
61 http
@@ -147,19 +148,18 @@
147 }
148
149 # Options used to compile the included SQLite library.
150 #
151 set SQLITE_OPTIONS {
152 -DNDEBUG=1
153 -DSQLITE_OMIT_LOAD_EXTENSION=1
154 -DSQLITE_ENABLE_LOCKING_STYLE=0
155 -DSQLITE_THREADSAFE=0
156 -DSQLITE_DEFAULT_FILE_FORMAT=4
157 -DSQLITE_OMIT_DEPRECATED
158 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
 
159 }
160 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1
161 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4
162 #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI
163 #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096
164
165 # Options used to compile the included SQLite shell.
166
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -52,10 +52,11 @@
52 event
53 export
54 file
55 finfo
56 foci
57 ftsearch
58 fusefs
59 glob
60 graph
61 gzip
62 http
@@ -147,19 +148,18 @@
148 }
149
150 # Options used to compile the included SQLite library.
151 #
152 set SQLITE_OPTIONS {
 
153 -DSQLITE_OMIT_LOAD_EXTENSION=1
154 -DSQLITE_ENABLE_LOCKING_STYLE=0
155 -DSQLITE_THREADSAFE=0
156 -DSQLITE_DEFAULT_FILE_FORMAT=4
157 -DSQLITE_OMIT_DEPRECATED
158 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
159 -DSQLITE_ENABLE_FTS4
160 }
 
161 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4
162 #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI
163 #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096
164
165 # Options used to compile the included SQLite shell.
166
+1 -1
--- src/regexp.c
+++ src/regexp.c
@@ -725,11 +725,11 @@
725725
** Invoke this routine in order to install the REGEXP function in an
726726
** SQLite database connection.
727727
**
728728
** Use:
729729
**
730
-** sqlite3_auto_extension(sqlite3_add_regexp_func);
730
+** sqlite3_auto_extension(re_add_regexp_func);
731731
**
732732
** to cause this extension to be automatically loaded into each new
733733
** database connection.
734734
*/
735735
int re_add_sql_func(sqlite3 *db){
736736
--- src/regexp.c
+++ src/regexp.c
@@ -725,11 +725,11 @@
725 ** Invoke this routine in order to install the REGEXP function in an
726 ** SQLite database connection.
727 **
728 ** Use:
729 **
730 ** sqlite3_auto_extension(sqlite3_add_regexp_func);
731 **
732 ** to cause this extension to be automatically loaded into each new
733 ** database connection.
734 */
735 int re_add_sql_func(sqlite3 *db){
736
--- src/regexp.c
+++ src/regexp.c
@@ -725,11 +725,11 @@
725 ** Invoke this routine in order to install the REGEXP function in an
726 ** SQLite database connection.
727 **
728 ** Use:
729 **
730 ** sqlite3_auto_extension(re_add_regexp_func);
731 **
732 ** to cause this extension to be automatically loaded into each new
733 ** database connection.
734 */
735 int re_add_sql_func(sqlite3 *db){
736
+2 -2
--- src/search.c
+++ src/search.c
@@ -182,12 +182,12 @@
182182
}
183183
184184
/*
185185
** Testing the search function.
186186
**
187
-** COMMAND: search*
188
-** %fossil search [-all|-a] [-limit|-n #] [-width|-W #] pattern...
187
+** COMMAND: test-search*
188
+** %fossil test-search [-all|-a] [-limit|-n #] [-width|-W #] pattern...
189189
**
190190
** Search for timeline entries matching all words
191191
** provided on the command line. Whole-word matches
192192
** scope more highly than partial matches.
193193
**
194194
--- src/search.c
+++ src/search.c
@@ -182,12 +182,12 @@
182 }
183
184 /*
185 ** Testing the search function.
186 **
187 ** COMMAND: search*
188 ** %fossil search [-all|-a] [-limit|-n #] [-width|-W #] pattern...
189 **
190 ** Search for timeline entries matching all words
191 ** provided on the command line. Whole-word matches
192 ** scope more highly than partial matches.
193 **
194
--- src/search.c
+++ src/search.c
@@ -182,12 +182,12 @@
182 }
183
184 /*
185 ** Testing the search function.
186 **
187 ** COMMAND: test-search*
188 ** %fossil test-search [-all|-a] [-limit|-n #] [-width|-W #] pattern...
189 **
190 ** Search for timeline entries matching all words
191 ** provided on the command line. Whole-word matches
192 ** scope more highly than partial matches.
193 **
194
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -135,10 +135,11 @@
135135
){
136136
add_content_sql_commands(db);
137137
re_add_sql_func(db);
138138
g.zMainDbType = "repository";
139139
foci_register(db);
140
+ ftsearch_add_sql_func(db);
140141
g.repositoryOpen = 1;
141142
g.db = db;
142143
return SQLITE_OK;
143144
}
144145
145146
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -135,10 +135,11 @@
135 ){
136 add_content_sql_commands(db);
137 re_add_sql_func(db);
138 g.zMainDbType = "repository";
139 foci_register(db);
 
140 g.repositoryOpen = 1;
141 g.db = db;
142 return SQLITE_OK;
143 }
144
145
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -135,10 +135,11 @@
135 ){
136 add_content_sql_commands(db);
137 re_add_sql_func(db);
138 g.zMainDbType = "repository";
139 foci_register(db);
140 ftsearch_add_sql_func(db);
141 g.repositoryOpen = 1;
142 g.db = db;
143 return SQLITE_OK;
144 }
145
146
+1 -1
--- src/th_main.c
+++ src/th_main.c
@@ -1369,11 +1369,11 @@
13691369
*/
13701370
void Th_CloseConfig(
13711371
int closeRepository
13721372
){
13731373
if( g.th1Flags & TH_STATE_CONFIG ){
1374
- db_close_config();
1374
+ db_close_config(1);
13751375
g.th1Flags &= ~TH_STATE_CONFIG;
13761376
}
13771377
if( closeRepository && (g.th1Flags & TH_STATE_REPOSITORY) ){
13781378
db_close(1);
13791379
g.th1Flags &= ~TH_STATE_REPOSITORY;
13801380
--- src/th_main.c
+++ src/th_main.c
@@ -1369,11 +1369,11 @@
1369 */
1370 void Th_CloseConfig(
1371 int closeRepository
1372 ){
1373 if( g.th1Flags & TH_STATE_CONFIG ){
1374 db_close_config();
1375 g.th1Flags &= ~TH_STATE_CONFIG;
1376 }
1377 if( closeRepository && (g.th1Flags & TH_STATE_REPOSITORY) ){
1378 db_close(1);
1379 g.th1Flags &= ~TH_STATE_REPOSITORY;
1380
--- src/th_main.c
+++ src/th_main.c
@@ -1369,11 +1369,11 @@
1369 */
1370 void Th_CloseConfig(
1371 int closeRepository
1372 ){
1373 if( g.th1Flags & TH_STATE_CONFIG ){
1374 db_close_config(1);
1375 g.th1Flags &= ~TH_STATE_CONFIG;
1376 }
1377 if( closeRepository && (g.th1Flags & TH_STATE_REPOSITORY) ){
1378 db_close(1);
1379 g.th1Flags &= ~TH_STATE_REPOSITORY;
1380
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
8383
8484
# define the SQLite files, which need special flags on compile
8585
SQLITESRC=sqlite3.c
8686
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
8787
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88
-SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_WIN32_NO_ANSI
88
+SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_WIN32_NO_ANSI
8989
9090
# define the SQLite shell files, which need special flags on compile
9191
SQLITESHELLSRC=shell.c
9292
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
9393
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
9494
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the SQLite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_WIN32_NO_ANSI
89
90 # define the SQLite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the SQLite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_WIN32_NO_ANSI
89
90 # define the SQLite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
+11 -5
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,17 +24,17 @@
2424
CFLAGS = -o
2525
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
29
-SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
29
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
33
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
33
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c ftsearch_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
35
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
35
+OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\ftsearch$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3636
3737
3838
RC=$(DMDIR)\bin\rcc
3939
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
4040
@@ -49,11 +49,11 @@
4949
5050
$(OBJDIR)\fossil.res: $B\win\fossil.rc
5151
$(RC) $(RCFLAGS) -o$@ $**
5252
5353
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54
- +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
54
+ +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci ftsearch fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
5555
+echo fossil >> $@
5656
+echo fossil >> $@
5757
+echo $(LIBS) >> $@
5858
+echo. >> $@
5959
+echo fossil >> $@
@@ -320,10 +320,16 @@
320320
$(OBJDIR)\foci$O : foci_.c foci.h
321321
$(TCC) -o$@ -c foci_.c
322322
323323
foci_.c : $(SRCDIR)\foci.c
324324
+translate$E $** > $@
325
+
326
+$(OBJDIR)\ftsearch$O : ftsearch_.c ftsearch.h
327
+ $(TCC) -o$@ -c ftsearch_.c
328
+
329
+ftsearch_.c : $(SRCDIR)\ftsearch.c
330
+ +translate$E $** > $@
325331
326332
$(OBJDIR)\fusefs$O : fusefs_.c fusefs.h
327333
$(TCC) -o$@ -c fusefs_.c
328334
329335
fusefs_.c : $(SRCDIR)\fusefs.c
@@ -826,7 +832,7 @@
826832
827833
zip_.c : $(SRCDIR)\zip.c
828834
+translate$E $** > $@
829835
830836
headers: makeheaders$E page_index.h builtin_data.h VERSION.h
831
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
837
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h ftsearch_.c:ftsearch.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
832838
@copy /Y nul: headers
833839
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,17 +24,17 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -320,10 +320,16 @@
320 $(OBJDIR)\foci$O : foci_.c foci.h
321 $(TCC) -o$@ -c foci_.c
322
323 foci_.c : $(SRCDIR)\foci.c
324 +translate$E $** > $@
 
 
 
 
 
 
325
326 $(OBJDIR)\fusefs$O : fusefs_.c fusefs.h
327 $(TCC) -o$@ -c fusefs_.c
328
329 fusefs_.c : $(SRCDIR)\fusefs.c
@@ -826,7 +832,7 @@
826
827 zip_.c : $(SRCDIR)\zip.c
828 +translate$E $** > $@
829
830 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
831 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
832 @copy /Y nul: headers
833
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,17 +24,17 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c ftsearch_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\ftsearch$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci ftsearch fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -320,10 +320,16 @@
320 $(OBJDIR)\foci$O : foci_.c foci.h
321 $(TCC) -o$@ -c foci_.c
322
323 foci_.c : $(SRCDIR)\foci.c
324 +translate$E $** > $@
325
326 $(OBJDIR)\ftsearch$O : ftsearch_.c ftsearch.h
327 $(TCC) -o$@ -c ftsearch_.c
328
329 ftsearch_.c : $(SRCDIR)\ftsearch.c
330 +translate$E $** > $@
331
332 $(OBJDIR)\fusefs$O : fusefs_.c fusefs.h
333 $(TCC) -o$@ -c fusefs_.c
334
335 fusefs_.c : $(SRCDIR)\fusefs.c
@@ -826,7 +832,7 @@
832
833 zip_.c : $(SRCDIR)\zip.c
834 +translate$E $** > $@
835
836 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
837 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h ftsearch_.c:ftsearch.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
838 @copy /Y nul: headers
839
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -381,10 +381,11 @@
381381
$(SRCDIR)/event.c \
382382
$(SRCDIR)/export.c \
383383
$(SRCDIR)/file.c \
384384
$(SRCDIR)/finfo.c \
385385
$(SRCDIR)/foci.c \
386
+ $(SRCDIR)/ftsearch.c \
386387
$(SRCDIR)/fusefs.c \
387388
$(SRCDIR)/glob.c \
388389
$(SRCDIR)/graph.c \
389390
$(SRCDIR)/gzip.c \
390391
$(SRCDIR)/http.c \
@@ -503,10 +504,11 @@
503504
$(OBJDIR)/event_.c \
504505
$(OBJDIR)/export_.c \
505506
$(OBJDIR)/file_.c \
506507
$(OBJDIR)/finfo_.c \
507508
$(OBJDIR)/foci_.c \
509
+ $(OBJDIR)/ftsearch_.c \
508510
$(OBJDIR)/fusefs_.c \
509511
$(OBJDIR)/glob_.c \
510512
$(OBJDIR)/graph_.c \
511513
$(OBJDIR)/gzip_.c \
512514
$(OBJDIR)/http_.c \
@@ -622,10 +624,11 @@
622624
$(OBJDIR)/event.o \
623625
$(OBJDIR)/export.o \
624626
$(OBJDIR)/file.o \
625627
$(OBJDIR)/finfo.o \
626628
$(OBJDIR)/foci.o \
629
+ $(OBJDIR)/ftsearch.o \
627630
$(OBJDIR)/fusefs.o \
628631
$(OBJDIR)/glob.o \
629632
$(OBJDIR)/graph.o \
630633
$(OBJDIR)/gzip.o \
631634
$(OBJDIR)/http.o \
@@ -934,10 +937,11 @@
934937
$(OBJDIR)/event_.c:$(OBJDIR)/event.h \
935938
$(OBJDIR)/export_.c:$(OBJDIR)/export.h \
936939
$(OBJDIR)/file_.c:$(OBJDIR)/file.h \
937940
$(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h \
938941
$(OBJDIR)/foci_.c:$(OBJDIR)/foci.h \
942
+ $(OBJDIR)/ftsearch_.c:$(OBJDIR)/ftsearch.h \
939943
$(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
940944
$(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
941945
$(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
942946
$(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
943947
$(OBJDIR)/http_.c:$(OBJDIR)/http.h \
@@ -1290,10 +1294,18 @@
12901294
12911295
$(OBJDIR)/foci.o: $(OBJDIR)/foci_.c $(OBJDIR)/foci.h $(SRCDIR)/config.h
12921296
$(XTCC) -o $(OBJDIR)/foci.o -c $(OBJDIR)/foci_.c
12931297
12941298
$(OBJDIR)/foci.h: $(OBJDIR)/headers
1299
+
1300
+$(OBJDIR)/ftsearch_.c: $(SRCDIR)/ftsearch.c $(TRANSLATE)
1301
+ $(TRANSLATE) $(SRCDIR)/ftsearch.c >$@
1302
+
1303
+$(OBJDIR)/ftsearch.o: $(OBJDIR)/ftsearch_.c $(OBJDIR)/ftsearch.h $(SRCDIR)/config.h
1304
+ $(XTCC) -o $(OBJDIR)/ftsearch.o -c $(OBJDIR)/ftsearch_.c
1305
+
1306
+$(OBJDIR)/ftsearch.h: $(OBJDIR)/headers
12951307
12961308
$(OBJDIR)/fusefs_.c: $(SRCDIR)/fusefs.c $(TRANSLATE)
12971309
$(TRANSLATE) $(SRCDIR)/fusefs.c >$@
12981310
12991311
$(OBJDIR)/fusefs.o: $(OBJDIR)/fusefs_.c $(OBJDIR)/fusefs.h $(SRCDIR)/config.h
@@ -1963,17 +1975,17 @@
19631975
$(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
19641976
$(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
19651977
19661978
$(OBJDIR)/zip.h: $(OBJDIR)/headers
19671979
1968
-SQLITE_OPTIONS = -DNDEBUG=1 \
1969
- -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1980
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
19701981
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
19711982
-DSQLITE_THREADSAFE=0 \
19721983
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
19731984
-DSQLITE_OMIT_DEPRECATED \
19741985
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
1986
+ -DSQLITE_ENABLE_FTS4 \
19751987
-DSQLITE_WIN32_NO_ANSI \
19761988
-D_HAVE__MINGW_H \
19771989
-DSQLITE_USE_MALLOC_H \
19781990
-DSQLITE_USE_MSIZE
19791991
19801992
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -381,10 +381,11 @@
381 $(SRCDIR)/event.c \
382 $(SRCDIR)/export.c \
383 $(SRCDIR)/file.c \
384 $(SRCDIR)/finfo.c \
385 $(SRCDIR)/foci.c \
 
386 $(SRCDIR)/fusefs.c \
387 $(SRCDIR)/glob.c \
388 $(SRCDIR)/graph.c \
389 $(SRCDIR)/gzip.c \
390 $(SRCDIR)/http.c \
@@ -503,10 +504,11 @@
503 $(OBJDIR)/event_.c \
504 $(OBJDIR)/export_.c \
505 $(OBJDIR)/file_.c \
506 $(OBJDIR)/finfo_.c \
507 $(OBJDIR)/foci_.c \
 
508 $(OBJDIR)/fusefs_.c \
509 $(OBJDIR)/glob_.c \
510 $(OBJDIR)/graph_.c \
511 $(OBJDIR)/gzip_.c \
512 $(OBJDIR)/http_.c \
@@ -622,10 +624,11 @@
622 $(OBJDIR)/event.o \
623 $(OBJDIR)/export.o \
624 $(OBJDIR)/file.o \
625 $(OBJDIR)/finfo.o \
626 $(OBJDIR)/foci.o \
 
627 $(OBJDIR)/fusefs.o \
628 $(OBJDIR)/glob.o \
629 $(OBJDIR)/graph.o \
630 $(OBJDIR)/gzip.o \
631 $(OBJDIR)/http.o \
@@ -934,10 +937,11 @@
934 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
935 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
936 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
937 $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h \
938 $(OBJDIR)/foci_.c:$(OBJDIR)/foci.h \
 
939 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
940 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
941 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
942 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
943 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
@@ -1290,10 +1294,18 @@
1290
1291 $(OBJDIR)/foci.o: $(OBJDIR)/foci_.c $(OBJDIR)/foci.h $(SRCDIR)/config.h
1292 $(XTCC) -o $(OBJDIR)/foci.o -c $(OBJDIR)/foci_.c
1293
1294 $(OBJDIR)/foci.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1295
1296 $(OBJDIR)/fusefs_.c: $(SRCDIR)/fusefs.c $(TRANSLATE)
1297 $(TRANSLATE) $(SRCDIR)/fusefs.c >$@
1298
1299 $(OBJDIR)/fusefs.o: $(OBJDIR)/fusefs_.c $(OBJDIR)/fusefs.h $(SRCDIR)/config.h
@@ -1963,17 +1975,17 @@
1963 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1964 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1965
1966 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1967
1968 SQLITE_OPTIONS = -DNDEBUG=1 \
1969 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1970 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
1971 -DSQLITE_THREADSAFE=0 \
1972 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
1973 -DSQLITE_OMIT_DEPRECATED \
1974 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
 
1975 -DSQLITE_WIN32_NO_ANSI \
1976 -D_HAVE__MINGW_H \
1977 -DSQLITE_USE_MALLOC_H \
1978 -DSQLITE_USE_MSIZE
1979
1980
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -381,10 +381,11 @@
381 $(SRCDIR)/event.c \
382 $(SRCDIR)/export.c \
383 $(SRCDIR)/file.c \
384 $(SRCDIR)/finfo.c \
385 $(SRCDIR)/foci.c \
386 $(SRCDIR)/ftsearch.c \
387 $(SRCDIR)/fusefs.c \
388 $(SRCDIR)/glob.c \
389 $(SRCDIR)/graph.c \
390 $(SRCDIR)/gzip.c \
391 $(SRCDIR)/http.c \
@@ -503,10 +504,11 @@
504 $(OBJDIR)/event_.c \
505 $(OBJDIR)/export_.c \
506 $(OBJDIR)/file_.c \
507 $(OBJDIR)/finfo_.c \
508 $(OBJDIR)/foci_.c \
509 $(OBJDIR)/ftsearch_.c \
510 $(OBJDIR)/fusefs_.c \
511 $(OBJDIR)/glob_.c \
512 $(OBJDIR)/graph_.c \
513 $(OBJDIR)/gzip_.c \
514 $(OBJDIR)/http_.c \
@@ -622,10 +624,11 @@
624 $(OBJDIR)/event.o \
625 $(OBJDIR)/export.o \
626 $(OBJDIR)/file.o \
627 $(OBJDIR)/finfo.o \
628 $(OBJDIR)/foci.o \
629 $(OBJDIR)/ftsearch.o \
630 $(OBJDIR)/fusefs.o \
631 $(OBJDIR)/glob.o \
632 $(OBJDIR)/graph.o \
633 $(OBJDIR)/gzip.o \
634 $(OBJDIR)/http.o \
@@ -934,10 +937,11 @@
937 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
938 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
939 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
940 $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h \
941 $(OBJDIR)/foci_.c:$(OBJDIR)/foci.h \
942 $(OBJDIR)/ftsearch_.c:$(OBJDIR)/ftsearch.h \
943 $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \
944 $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \
945 $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \
946 $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \
947 $(OBJDIR)/http_.c:$(OBJDIR)/http.h \
@@ -1290,10 +1294,18 @@
1294
1295 $(OBJDIR)/foci.o: $(OBJDIR)/foci_.c $(OBJDIR)/foci.h $(SRCDIR)/config.h
1296 $(XTCC) -o $(OBJDIR)/foci.o -c $(OBJDIR)/foci_.c
1297
1298 $(OBJDIR)/foci.h: $(OBJDIR)/headers
1299
1300 $(OBJDIR)/ftsearch_.c: $(SRCDIR)/ftsearch.c $(TRANSLATE)
1301 $(TRANSLATE) $(SRCDIR)/ftsearch.c >$@
1302
1303 $(OBJDIR)/ftsearch.o: $(OBJDIR)/ftsearch_.c $(OBJDIR)/ftsearch.h $(SRCDIR)/config.h
1304 $(XTCC) -o $(OBJDIR)/ftsearch.o -c $(OBJDIR)/ftsearch_.c
1305
1306 $(OBJDIR)/ftsearch.h: $(OBJDIR)/headers
1307
1308 $(OBJDIR)/fusefs_.c: $(SRCDIR)/fusefs.c $(TRANSLATE)
1309 $(TRANSLATE) $(SRCDIR)/fusefs.c >$@
1310
1311 $(OBJDIR)/fusefs.o: $(OBJDIR)/fusefs_.c $(OBJDIR)/fusefs.h $(SRCDIR)/config.h
@@ -1963,17 +1975,17 @@
1975 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1976 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1977
1978 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1979
1980 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
1981 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
1982 -DSQLITE_THREADSAFE=0 \
1983 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
1984 -DSQLITE_OMIT_DEPRECATED \
1985 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
1986 -DSQLITE_ENABLE_FTS4 \
1987 -DSQLITE_WIN32_NO_ANSI \
1988 -D_HAVE__MINGW_H \
1989 -DSQLITE_USE_MALLOC_H \
1990 -DSQLITE_USE_MSIZE
1991
1992
+12 -2
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -173,17 +173,17 @@
173173
RCC = $(RCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
174174
TCC = $(TCC) /DUSE_TCL_STUBS=1
175175
RCC = $(RCC) /DUSE_TCL_STUBS=1
176176
!endif
177177
178
-SQLITE_OPTIONS = /DNDEBUG=1 \
179
- /DSQLITE_OMIT_LOAD_EXTENSION=1 \
178
+SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
180179
/DSQLITE_ENABLE_LOCKING_STYLE=0 \
181180
/DSQLITE_THREADSAFE=0 \
182181
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
183182
/DSQLITE_OMIT_DEPRECATED \
184183
/DSQLITE_ENABLE_EXPLAIN_COMMENTS \
184
+ /DSQLITE_ENABLE_FTS4 \
185185
/DSQLITE_WIN32_NO_ANSI
186186
187187
SHELL_OPTIONS = /Dmain=sqlite3_shell \
188188
/DSQLITE_OMIT_LOAD_EXTENSION=1 \
189189
/DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
@@ -228,10 +228,11 @@
228228
event_.c \
229229
export_.c \
230230
file_.c \
231231
finfo_.c \
232232
foci_.c \
233
+ ftsearch_.c \
233234
fusefs_.c \
234235
glob_.c \
235236
graph_.c \
236237
gzip_.c \
237238
http_.c \
@@ -349,10 +350,11 @@
349350
$(OX)\event$O \
350351
$(OX)\export$O \
351352
$(OX)\file$O \
352353
$(OX)\finfo$O \
353354
$(OX)\foci$O \
355
+ $(OX)\ftsearch$O \
354356
$(OX)\fusefs$O \
355357
$(OX)\glob$O \
356358
$(OX)\graph$O \
357359
$(OX)\gzip$O \
358360
$(OX)\http$O \
@@ -523,10 +525,11 @@
523525
echo $(OX)\event.obj >> $@
524526
echo $(OX)\export.obj >> $@
525527
echo $(OX)\file.obj >> $@
526528
echo $(OX)\finfo.obj >> $@
527529
echo $(OX)\foci.obj >> $@
530
+ echo $(OX)\ftsearch.obj >> $@
528531
echo $(OX)\fusefs.obj >> $@
529532
echo $(OX)\glob.obj >> $@
530533
echo $(OX)\graph.obj >> $@
531534
echo $(OX)\gzip.obj >> $@
532535
echo $(OX)\http.obj >> $@
@@ -908,10 +911,16 @@
908911
$(OX)\foci$O : foci_.c foci.h
909912
$(TCC) /Fo$@ -c foci_.c
910913
911914
foci_.c : $(SRCDIR)\foci.c
912915
translate$E $** > $@
916
+
917
+$(OX)\ftsearch$O : ftsearch_.c ftsearch.h
918
+ $(TCC) /Fo$@ -c ftsearch_.c
919
+
920
+ftsearch_.c : $(SRCDIR)\ftsearch.c
921
+ translate$E $** > $@
913922
914923
$(OX)\fusefs$O : fusefs_.c fusefs.h
915924
$(TCC) /Fo$@ -c fusefs_.c
916925
917926
fusefs_.c : $(SRCDIR)\fusefs.c
@@ -1450,10 +1459,11 @@
14501459
event_.c:event.h \
14511460
export_.c:export.h \
14521461
file_.c:file.h \
14531462
finfo_.c:finfo.h \
14541463
foci_.c:foci.h \
1464
+ ftsearch_.c:ftsearch.h \
14551465
fusefs_.c:fusefs.h \
14561466
glob_.c:glob.h \
14571467
graph_.c:graph.h \
14581468
gzip_.c:gzip.h \
14591469
http_.c:http.h \
14601470
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -173,17 +173,17 @@
173 RCC = $(RCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
174 TCC = $(TCC) /DUSE_TCL_STUBS=1
175 RCC = $(RCC) /DUSE_TCL_STUBS=1
176 !endif
177
178 SQLITE_OPTIONS = /DNDEBUG=1 \
179 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
180 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
181 /DSQLITE_THREADSAFE=0 \
182 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
183 /DSQLITE_OMIT_DEPRECATED \
184 /DSQLITE_ENABLE_EXPLAIN_COMMENTS \
 
185 /DSQLITE_WIN32_NO_ANSI
186
187 SHELL_OPTIONS = /Dmain=sqlite3_shell \
188 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
189 /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
@@ -228,10 +228,11 @@
228 event_.c \
229 export_.c \
230 file_.c \
231 finfo_.c \
232 foci_.c \
 
233 fusefs_.c \
234 glob_.c \
235 graph_.c \
236 gzip_.c \
237 http_.c \
@@ -349,10 +350,11 @@
349 $(OX)\event$O \
350 $(OX)\export$O \
351 $(OX)\file$O \
352 $(OX)\finfo$O \
353 $(OX)\foci$O \
 
354 $(OX)\fusefs$O \
355 $(OX)\glob$O \
356 $(OX)\graph$O \
357 $(OX)\gzip$O \
358 $(OX)\http$O \
@@ -523,10 +525,11 @@
523 echo $(OX)\event.obj >> $@
524 echo $(OX)\export.obj >> $@
525 echo $(OX)\file.obj >> $@
526 echo $(OX)\finfo.obj >> $@
527 echo $(OX)\foci.obj >> $@
 
528 echo $(OX)\fusefs.obj >> $@
529 echo $(OX)\glob.obj >> $@
530 echo $(OX)\graph.obj >> $@
531 echo $(OX)\gzip.obj >> $@
532 echo $(OX)\http.obj >> $@
@@ -908,10 +911,16 @@
908 $(OX)\foci$O : foci_.c foci.h
909 $(TCC) /Fo$@ -c foci_.c
910
911 foci_.c : $(SRCDIR)\foci.c
912 translate$E $** > $@
 
 
 
 
 
 
913
914 $(OX)\fusefs$O : fusefs_.c fusefs.h
915 $(TCC) /Fo$@ -c fusefs_.c
916
917 fusefs_.c : $(SRCDIR)\fusefs.c
@@ -1450,10 +1459,11 @@
1450 event_.c:event.h \
1451 export_.c:export.h \
1452 file_.c:file.h \
1453 finfo_.c:finfo.h \
1454 foci_.c:foci.h \
 
1455 fusefs_.c:fusefs.h \
1456 glob_.c:glob.h \
1457 graph_.c:graph.h \
1458 gzip_.c:gzip.h \
1459 http_.c:http.h \
1460
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -173,17 +173,17 @@
173 RCC = $(RCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
174 TCC = $(TCC) /DUSE_TCL_STUBS=1
175 RCC = $(RCC) /DUSE_TCL_STUBS=1
176 !endif
177
178 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
179 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
180 /DSQLITE_THREADSAFE=0 \
181 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
182 /DSQLITE_OMIT_DEPRECATED \
183 /DSQLITE_ENABLE_EXPLAIN_COMMENTS \
184 /DSQLITE_ENABLE_FTS4 \
185 /DSQLITE_WIN32_NO_ANSI
186
187 SHELL_OPTIONS = /Dmain=sqlite3_shell \
188 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
189 /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
@@ -228,10 +228,11 @@
228 event_.c \
229 export_.c \
230 file_.c \
231 finfo_.c \
232 foci_.c \
233 ftsearch_.c \
234 fusefs_.c \
235 glob_.c \
236 graph_.c \
237 gzip_.c \
238 http_.c \
@@ -349,10 +350,11 @@
350 $(OX)\event$O \
351 $(OX)\export$O \
352 $(OX)\file$O \
353 $(OX)\finfo$O \
354 $(OX)\foci$O \
355 $(OX)\ftsearch$O \
356 $(OX)\fusefs$O \
357 $(OX)\glob$O \
358 $(OX)\graph$O \
359 $(OX)\gzip$O \
360 $(OX)\http$O \
@@ -523,10 +525,11 @@
525 echo $(OX)\event.obj >> $@
526 echo $(OX)\export.obj >> $@
527 echo $(OX)\file.obj >> $@
528 echo $(OX)\finfo.obj >> $@
529 echo $(OX)\foci.obj >> $@
530 echo $(OX)\ftsearch.obj >> $@
531 echo $(OX)\fusefs.obj >> $@
532 echo $(OX)\glob.obj >> $@
533 echo $(OX)\graph.obj >> $@
534 echo $(OX)\gzip.obj >> $@
535 echo $(OX)\http.obj >> $@
@@ -908,10 +911,16 @@
911 $(OX)\foci$O : foci_.c foci.h
912 $(TCC) /Fo$@ -c foci_.c
913
914 foci_.c : $(SRCDIR)\foci.c
915 translate$E $** > $@
916
917 $(OX)\ftsearch$O : ftsearch_.c ftsearch.h
918 $(TCC) /Fo$@ -c ftsearch_.c
919
920 ftsearch_.c : $(SRCDIR)\ftsearch.c
921 translate$E $** > $@
922
923 $(OX)\fusefs$O : fusefs_.c fusefs.h
924 $(TCC) /Fo$@ -c fusefs_.c
925
926 fusefs_.c : $(SRCDIR)\fusefs.c
@@ -1450,10 +1459,11 @@
1459 event_.c:event.h \
1460 export_.c:export.h \
1461 file_.c:file.h \
1462 finfo_.c:finfo.h \
1463 foci_.c:foci.h \
1464 ftsearch_.c:ftsearch.h \
1465 fusefs_.c:fusefs.h \
1466 glob_.c:glob.h \
1467 graph_.c:graph.h \
1468 gzip_.c:gzip.h \
1469 http_.c:http.h \
1470

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button