diff --git a/ext/fts3/fts3Int.h b/ext/fts3/fts3Int.h index 77951746df..1785bf47d6 100644 --- a/ext/fts3/fts3Int.h +++ b/ext/fts3/fts3Int.h @@ -53,6 +53,15 @@ */ #define FTS3_VARINT_MAX 10 +/* +** Macros indicating that conditional expressions are always true or +** false. +*/ +#ifndef SQLITE_AMALGAMATION +# define ALWAYS(x) (x) +# define NEVER(X) (x) +#endif + typedef struct Fts3Table Fts3Table; typedef struct Fts3Cursor Fts3Cursor; typedef struct Fts3Expr Fts3Expr; diff --git a/ext/fts3/fts3_porter.c b/ext/fts3/fts3_porter.c index 6ff67a9aec..b9153a48c2 100644 --- a/ext/fts3/fts3_porter.c +++ b/ext/fts3/fts3_porter.c @@ -234,7 +234,7 @@ static int hasVowel(const char *z){ ** the first two characters of z[]. */ static int doubleConsonant(const char *z){ - return isConsonant(z) && z[0]==z[1] && isConsonant(z+1); + return isConsonant(z) && z[0]==z[1]; } /* @@ -247,10 +247,10 @@ static int doubleConsonant(const char *z){ */ static int star_oh(const char *z){ return - z[0]!=0 && isConsonant(z) && + isConsonant(z) && z[0]!='w' && z[0]!='x' && z[0]!='y' && - z[1]!=0 && isVowel(z+1) && - z[2]!=0 && isConsonant(z+2); + isVowel(z+1) && + isConsonant(z+2); } /* diff --git a/ext/fts3/fts3_snippet.c b/ext/fts3/fts3_snippet.c index 6038b18a00..a5fd934ea3 100644 --- a/ext/fts3/fts3_snippet.c +++ b/ext/fts3/fts3_snippet.c @@ -545,7 +545,7 @@ static int wordBoundary( if( iBreak>=nDoc-10 ){ return nDoc; } - for(i=0; i