Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: third_party/sqlite/ext/fts3/fts3.c

Issue 174387: Fix issue 15261: Crash in history::TextDatabase::GetTextMatches... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 ** 2006 Oct 10 2 ** 2006 Oct 10
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 */ 323 */
324 /* TODO(shess) The snippet-generation code should be using the 324 /* TODO(shess) The snippet-generation code should be using the
325 ** tokenizer-generated tokens rather than doing its own local 325 ** tokenizer-generated tokens rather than doing its own local
326 ** tokenization. 326 ** tokenization.
327 */ 327 */
328 /* TODO(shess) Is __isascii() a portable version of (c&0x80)==0? */ 328 /* TODO(shess) Is __isascii() a portable version of (c&0x80)==0? */
329 static int safe_isspace(char c){ 329 static int safe_isspace(char c){
330 return (c&0x80)==0 ? isspace(c) : 0; 330 return (c&0x80)==0 ? isspace(c) : 0;
331 } 331 }
332 static int safe_tolower(char c){ 332 static int safe_tolower(char c){
333 return (c&0x80)==0 ? tolower(c) : c; 333 return (c>='A' && c<='Z') ? (c-'A'+'a') : c;
334 } 334 }
335 static int safe_isalnum(char c){ 335 static int safe_isalnum(char c){
336 return (c&0x80)==0 ? isalnum(c) : 0; 336 return (c&0x80)==0 ? isalnum(c) : 0;
337 } 337 }
338 338
339 typedef enum DocListType { 339 typedef enum DocListType {
340 DL_DOCIDS, /* docids only */ 340 DL_DOCIDS, /* docids only */
341 DL_POSITIONS, /* docids + positions */ 341 DL_POSITIONS, /* docids + positions */
342 DL_POSITIONS_OFFSETS /* docids + positions + offsets */ 342 DL_POSITIONS_OFFSETS /* docids + positions + offsets */
343 } DocListType; 343 } DocListType;
(...skipping 6863 matching lines...) Expand 10 before | Expand all | Expand 10 after
7207 sqlite3 *db, 7207 sqlite3 *db,
7208 char **pzErrMsg, 7208 char **pzErrMsg,
7209 const sqlite3_api_routines *pApi 7209 const sqlite3_api_routines *pApi
7210 ){ 7210 ){
7211 SQLITE_EXTENSION_INIT2(pApi) 7211 SQLITE_EXTENSION_INIT2(pApi)
7212 return sqlite3Fts3Init(db); 7212 return sqlite3Fts3Init(db);
7213 } 7213 }
7214 #endif 7214 #endif
7215 7215
7216 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ 7216 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
OLDNEW
« no previous file with comments | « third_party/sqlite/ext/fts2/fts2_tokenizer1.c ('k') | third_party/sqlite/ext/fts3/fts3_tokenizer1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698