Index: third_party/sqlite/src/ext/fts2/fts2.c |
diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext/fts2/fts2.c |
index ec4c108914b378b987be4178d82235e30e10bd46..5ec12659e0fb62434432f653315a2db3288437b9 100644 |
--- a/third_party/sqlite/src/ext/fts2/fts2.c |
+++ b/third_party/sqlite/src/ext/fts2/fts2.c |
@@ -320,8 +320,6 @@ |
#include <stdlib.h> |
#include <stdio.h> |
#include <string.h> |
-#include <ctype.h> |
- |
#include "fts2.h" |
#include "fts2_hash.h" |
#include "fts2_tokenizer.h" |
@@ -369,13 +367,13 @@ static int fts2Corrupt(void){ |
*/ |
/* TODO(shess) Is __isascii() a portable version of (c&0x80)==0? */ |
static int safe_isspace(char c){ |
- return (c&0x80)==0 ? isspace(c) : 0; |
+ return c==' ' || c=='\t' || c=='\n' || c=='\r' || c=='\v' || c=='\f'; |
} |
static int safe_tolower(char c){ |
- return (c>='A' && c<='Z') ? (c-'A'+'a') : c; |
+ return (c>='A' && c<='Z') ? (c - 'A' + 'a') : c; |
} |
static int safe_isalnum(char c){ |
- return (c&0x80)==0 ? isalnum(c) : 0; |
+ return (c>='0' && c<='9') || (c>='A' && c<='Z') || (c>='a' && c<='z'); |
} |
typedef enum DocListType { |