| | @@ -41,11 +41,11 @@ |
| 41 | 41 | char *z; /* Text */ |
| 42 | 42 | int n; /* length */ |
| 43 | 43 | } a[SEARCH_MAX_TERM]; |
| 44 | 44 | /* Snippet controls */ |
| 45 | 45 | char *zPattern; /* The search pattern */ |
| 46 | | - char *zMarkBegin; /* Start of a match */ |
| 46 | + char *zMarkBegin; /* Start of a match */ |
| 47 | 47 | char *zMarkEnd; /* End of a match */ |
| 48 | 48 | char *zMarkGap; /* A gap between two matches */ |
| 49 | 49 | unsigned fSrchFlg; /* Flags */ |
| 50 | 50 | int iScore; /* Score of the last match attempt */ |
| 51 | 51 | Blob snip; /* Snippet for the most recent match */ |
| | @@ -104,11 +104,11 @@ |
| 104 | 104 | /* |
| 105 | 105 | ** Compile a search pattern |
| 106 | 106 | */ |
| 107 | 107 | Search *search_init( |
| 108 | 108 | const char *zPattern, /* The search pattern */ |
| 109 | | - const char *zMarkBegin, /* Start of a match */ |
| 109 | + const char *zMarkBegin, /* Start of a match */ |
| 110 | 110 | const char *zMarkEnd, /* End of a match */ |
| 111 | 111 | const char *zMarkGap, /* A gap between two matches */ |
| 112 | 112 | unsigned fSrchFlg /* Flags */ |
| 113 | 113 | ){ |
| 114 | 114 | Search *p; |
| | @@ -227,11 +227,11 @@ |
| 227 | 227 | if( zDoc[i]==0 ) break; |
| 228 | 228 | } |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /* Finished search all documents. |
| 232 | | - ** Every term must be seen or else the score is zero |
| 232 | + ** Every term must be seen or else the score is zero |
| 233 | 233 | */ |
| 234 | 234 | score = 1; |
| 235 | 235 | for(j=0; j<p->nTerm; j++) score *= anMatch[j]; |
| 236 | 236 | blob_reset(&p->snip); |
| 237 | 237 | p->iScore = score; |
| | @@ -317,11 +317,11 @@ |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /* |
| 320 | 320 | ** COMMAND: test-match |
| 321 | 321 | ** |
| 322 | | -** Usage: fossil test-match SEARCHSTRING FILE1 FILE2 ... |
| 322 | +** Usage: fossil test-match SEARCHSTRING FILE1 FILE2 ... |
| 323 | 323 | */ |
| 324 | 324 | void test_match_cmd(void){ |
| 325 | 325 | Search *p; |
| 326 | 326 | int i; |
| 327 | 327 | Blob x; |
| | @@ -427,11 +427,11 @@ |
| 427 | 427 | } |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | /* |
| 431 | 431 | ** This is an SQLite function that computes the searchable text. |
| 432 | | -** It is a wrapper around the search_stext() routine. See the |
| 432 | +** It is a wrapper around the search_stext() routine. See the |
| 433 | 433 | ** search_stext() routine for further detail. |
| 434 | 434 | */ |
| 435 | 435 | static void search_stext_sqlfunc( |
| 436 | 436 | sqlite3_context *context, |
| 437 | 437 | int argc, |
| | @@ -776,11 +776,10 @@ |
| 776 | 776 | } |
| 777 | 777 | |
| 778 | 778 | /* |
| 779 | 779 | ** If z[] is of the form "<mark>TEXT</mark>" where TEXT contains |
| 780 | 780 | ** no white-space or punctuation, then return the length of the mark. |
| 781 | | -** If |
| 782 | 781 | */ |
| 783 | 782 | static int isSnippetMark(const char *z){ |
| 784 | 783 | int n; |
| 785 | 784 | if( strncmp(z,"<mark>",6)!=0 ) return 0; |
| 786 | 785 | n = 6; |
| | @@ -789,11 +788,11 @@ |
| 789 | 788 | return n+7; |
| 790 | 789 | } |
| 791 | 790 | |
| 792 | 791 | /* |
| 793 | 792 | ** Return a copy of zSnip (in memory obtained from fossil_malloc()) that |
| 794 | | -** has all "<" characters, other than those on <mark> and </mark>, |
| 793 | +** has all "<" characters, other than those on <mark> and </mark>, |
| 795 | 794 | ** converted into "<". This is similar to htmlize() except that |
| 796 | 795 | ** <mark> and </mark> are preserved. |
| 797 | 796 | */ |
| 798 | 797 | static char *cleanSnippet(const char *zSnip){ |
| 799 | 798 | int i; |
| | @@ -1108,11 +1107,11 @@ |
| 1108 | 1107 | blob_reset(&out); |
| 1109 | 1108 | } |
| 1110 | 1109 | |
| 1111 | 1110 | /* The schema for the full-text index |
| 1112 | 1111 | */ |
| 1113 | | -static const char zFtsSchema[] = |
| 1112 | +static const char zFtsSchema[] = |
| 1114 | 1113 | @ -- One entry for each possible search result |
| 1115 | 1114 | @ CREATE TABLE IF NOT EXISTS "%w".ftsdocs( |
| 1116 | 1115 | @ rowid INTEGER PRIMARY KEY, -- Maps to the ftsidx.docid |
| 1117 | 1116 | @ type CHAR(1), -- Type of document |
| 1118 | 1117 | @ rid INTEGER, -- BLOB.RID or TAG.TAGID for the document |
| | @@ -1230,11 +1229,11 @@ |
| 1230 | 1229 | } |
| 1231 | 1230 | } |
| 1232 | 1231 | |
| 1233 | 1232 | /* |
| 1234 | 1233 | ** If the doc-glob and doc-br settings are valid for document search |
| 1235 | | -** and if the latest check-in on doc-br is in the unindexed set of |
| 1234 | +** and if the latest check-in on doc-br is in the unindexed set of |
| 1236 | 1235 | ** check-ins, then update all 'd' entries in FTSDOCS that have |
| 1237 | 1236 | ** changed. |
| 1238 | 1237 | */ |
| 1239 | 1238 | static void search_update_doc_index(void){ |
| 1240 | 1239 | const char *zDocBr = db_get("doc-branch","trunk"); |
| | @@ -1284,11 +1283,11 @@ |
| 1284 | 1283 | "UPDATE ftsdocs SET idxed=1 WHERE type='d' AND NOT idxed" |
| 1285 | 1284 | ); |
| 1286 | 1285 | } |
| 1287 | 1286 | |
| 1288 | 1287 | /* |
| 1289 | | -** Deal with all of the unindexed 'c' terms in FTSDOCS |
| 1288 | +** Deal with all of the unindexed 'c' terms in FTSDOCS |
| 1290 | 1289 | */ |
| 1291 | 1290 | static void search_update_checkin_index(void){ |
| 1292 | 1291 | db_multi_exec( |
| 1293 | 1292 | "INSERT INTO ftsidx(docid,stext)" |
| 1294 | 1293 | " SELECT rowid, stext('c',rid,NULL) FROM ftsdocs" |
| | @@ -1306,11 +1305,11 @@ |
| 1306 | 1305 | " AND blob.rid=ftsdocs.rid" |
| 1307 | 1306 | ); |
| 1308 | 1307 | } |
| 1309 | 1308 | |
| 1310 | 1309 | /* |
| 1311 | | -** Deal with all of the unindexed 't' terms in FTSDOCS |
| 1310 | +** Deal with all of the unindexed 't' terms in FTSDOCS |
| 1312 | 1311 | */ |
| 1313 | 1312 | static void search_update_ticket_index(void){ |
| 1314 | 1313 | db_multi_exec( |
| 1315 | 1314 | "INSERT INTO ftsidx(docid,stext)" |
| 1316 | 1315 | " SELECT rowid, stext('t',rid,NULL) FROM ftsdocs" |
| | @@ -1328,11 +1327,11 @@ |
| 1328 | 1327 | " AND ticket.tkt_id=ftsdocs.rid" |
| 1329 | 1328 | ); |
| 1330 | 1329 | } |
| 1331 | 1330 | |
| 1332 | 1331 | /* |
| 1333 | | -** Deal with all of the unindexed 'w' terms in FTSDOCS |
| 1332 | +** Deal with all of the unindexed 'w' terms in FTSDOCS |
| 1334 | 1333 | */ |
| 1335 | 1334 | static void search_update_wiki_index(void){ |
| 1336 | 1335 | db_multi_exec( |
| 1337 | 1336 | "INSERT INTO ftsidx(docid,stext)" |
| 1338 | 1337 | " SELECT rowid, stext('w',rid,NULL) FROM ftsdocs" |
| | @@ -1468,11 +1467,11 @@ |
| 1468 | 1467 | search_rebuild_index(); |
| 1469 | 1468 | } |
| 1470 | 1469 | |
| 1471 | 1470 | /* Always show the status before ending */ |
| 1472 | 1471 | for(i=0; i<ArraySize(aSetng); i++){ |
| 1473 | | - fossil_print("%-16s %s\n", aSetng[i].zName, |
| 1472 | + fossil_print("%-16s %s\n", aSetng[i].zName, |
| 1474 | 1473 | db_get_boolean(aSetng[i].zSetting,0) ? "on" : "off"); |
| 1475 | 1474 | } |
| 1476 | 1475 | if( search_index_exists() ){ |
| 1477 | 1476 | fossil_print("%-16s enabled\n", "full-text index:"); |
| 1478 | 1477 | fossil_print("%-16s %d\n", "documents:", |
| 1479 | 1478 | |