diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-06-22 17:48:41 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-06-22 17:48:41 +0000 |
commit | 4bd19d4632e0a26af00e12e3df2752b890092741 (patch) | |
tree | 33a0231b75b1b03210be7648193e150da9556b7b /lib | |
parent | d5d6219b2893b4877a9699a009356b0cdefb7e0f (diff) |
import 3.7.13
okay jasper@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libsqlite3/ext/fts3/unicode/mkunicode.tcl | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/libsqlite3/ext/fts3/unicode/mkunicode.tcl b/lib/libsqlite3/ext/fts3/unicode/mkunicode.tcl index c3083ee3686..0d58e8aa5c0 100644 --- a/lib/libsqlite3/ext/fts3/unicode/mkunicode.tcl +++ b/lib/libsqlite3/ext/fts3/unicode/mkunicode.tcl @@ -160,7 +160,7 @@ proc print_rd {map} { } assert( key>=aDia[iRes] ); return ((c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c : (int)aChar[iRes]);} - puts "\}" + puts "\};" } proc print_isdiacritic {zFunc map} { @@ -239,10 +239,7 @@ proc an_load_unicodedata_text {zName} { foreach $lField $fields {} set iCode [expr "0x$code"] - set bAlnum [expr { - [lsearch {L N} [string range $general_category 0 0]] >= 0 - || $general_category=="Co" - }] + set bAlnum [expr {[lsearch {L N} [string range $general_category 0 0]]>=0}] if { !$bAlnum } { lappend lRet $iCode } } @@ -298,7 +295,7 @@ proc an_print_range_array {lRange} { ** using this format. */ }] - puts -nonewline " static const unsigned int aEntry\[\] = \{" + puts -nonewline " const static unsigned int aEntry\[\] = \{" set i 0 foreach range $lRange { foreach {iFirst nRange} $range {} @@ -349,7 +346,7 @@ proc print_isalnum {zFunc lRange} { return ( (aAscii[c >> 5] & (1 << (c & 0x001F)))==0 ); }else if( c<(1<<22) ){ unsigned int key = (((unsigned int)c)<<10) | 0x000003FF; - int iRes = 0; + int iRes; int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1; int iLo = 0; while( iHi>=iLo ){ @@ -363,7 +360,7 @@ proc print_isalnum {zFunc lRange} { } assert( aEntry[0]<key ); assert( key>=aEntry[iRes] ); - return (((unsigned int)c) >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF))); + return (c >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF))); } return 1;} puts "\}" @@ -732,7 +729,7 @@ proc print_fileheader {} { */ }] puts "" - puts "#ifndef SQLITE_DISABLE_FTS3_UNICODE" + puts "#if !defined(SQLITE_DISABLE_FTS3_UNICODE)" puts "#if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4)" puts "" puts "#include <assert.h>" |