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

Unified Diff: third_party/sqlite/src/ext/fts2/fts2_tokenizer1.c

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/ext/fts2/fts2_porter.c ('k') | third_party/sqlite/src/ext/fts3/fts3.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/fts2/fts2_tokenizer1.c
diff --git a/third_party/sqlite/src/ext/fts2/fts2_tokenizer1.c b/third_party/sqlite/src/ext/fts2/fts2_tokenizer1.c
index 1f03cc4b626329777e2bc0c4e4832e80b7e85082..7e13366910d097982174bf61aa3d77a26e050a5a 100644
--- a/third_party/sqlite/src/ext/fts2/fts2_tokenizer1.c
+++ b/third_party/sqlite/src/ext/fts2/fts2_tokenizer1.c
@@ -29,7 +29,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include "fts2_tokenizer.h"
@@ -89,7 +88,8 @@ static int simpleCreate(
/* Mark non-alphanumeric ASCII characters as delimiters */
int i;
for(i=1; i<0x80; i++){
- t->delim[i] = !isalnum(i);
+ t->delim[i] = !((i>='0' && i<='9') || (i>='A' && i<='Z') ||
+ (i>='a' && i<='z'));
}
}
@@ -191,7 +191,7 @@ static int simpleNext(
** case-insensitivity.
*/
unsigned char ch = p[iStartOffset+i];
- c->pToken[i] = (ch>='A' && ch<='Z') ? (ch-'A'+'a') : ch;
+ c->pToken[i] = (ch>='A' && ch<='Z') ? (ch - 'A' + 'a') : ch;
}
*ppToken = c->pToken;
*pnBytes = n;
« no previous file with comments | « third_party/sqlite/src/ext/fts2/fts2_porter.c ('k') | third_party/sqlite/src/ext/fts3/fts3.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698