| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** 2012 May 25 | 2 ** 2012 May 25 |
| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 0x07CC0021, 0x07CCC006, 0x07CCDC46, 0x07CE0014, 0x07CE8025, | 118 0x07CC0021, 0x07CCC006, 0x07CCDC46, 0x07CE0014, 0x07CE8025, |
| 119 0x07CF1805, 0x07CF8011, 0x07D0003F, 0x07D10001, 0x07D108B6, | 119 0x07CF1805, 0x07CF8011, 0x07D0003F, 0x07D10001, 0x07D108B6, |
| 120 0x07D3E404, 0x07D4003E, 0x07D50004, 0x07D54018, 0x07D7EC46, | 120 0x07D3E404, 0x07D4003E, 0x07D50004, 0x07D54018, 0x07D7EC46, |
| 121 0x07D9140B, 0x07DA0046, 0x07DC0074, 0x38000401, 0x38008060, | 121 0x07D9140B, 0x07DA0046, 0x07DC0074, 0x38000401, 0x38008060, |
| 122 0x380400F0, | 122 0x380400F0, |
| 123 }; | 123 }; |
| 124 static const unsigned int aAscii[4] = { | 124 static const unsigned int aAscii[4] = { |
| 125 0xFFFFFFFF, 0xFC00FFFF, 0xF8000001, 0xF8000001, | 125 0xFFFFFFFF, 0xFC00FFFF, 0xF8000001, 0xF8000001, |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 if( c<128 ){ | 128 if( (unsigned int)c<128 ){ |
| 129 return ( (aAscii[c >> 5] & (1 << (c & 0x001F)))==0 ); | 129 return ( (aAscii[c >> 5] & (1 << (c & 0x001F)))==0 ); |
| 130 }else if( c<(1<<22) ){ | 130 }else if( (unsigned int)c<(1<<22) ){ |
| 131 unsigned int key = (((unsigned int)c)<<10) | 0x000003FF; | 131 unsigned int key = (((unsigned int)c)<<10) | 0x000003FF; |
| 132 int iRes = 0; | 132 int iRes = 0; |
| 133 int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1; | 133 int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1; |
| 134 int iLo = 0; | 134 int iLo = 0; |
| 135 while( iHi>=iLo ){ | 135 while( iHi>=iLo ){ |
| 136 int iTest = (iHi + iLo) / 2; | 136 int iTest = (iHi + iLo) / 2; |
| 137 if( key >= aEntry[iTest] ){ | 137 if( key >= aEntry[iTest] ){ |
| 138 iRes = iTest; | 138 iRes = iTest; |
| 139 iLo = iTest+1; | 139 iLo = iTest+1; |
| 140 }else{ | 140 }else{ |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 351 |
| 352 if( bRemoveDiacritic ) ret = fts5_remove_diacritic(ret); | 352 if( bRemoveDiacritic ) ret = fts5_remove_diacritic(ret); |
| 353 } | 353 } |
| 354 | 354 |
| 355 else if( c>=66560 && c<66600 ){ | 355 else if( c>=66560 && c<66600 ){ |
| 356 ret = c + 40; | 356 ret = c + 40; |
| 357 } | 357 } |
| 358 | 358 |
| 359 return ret; | 359 return ret; |
| 360 } | 360 } |
| OLD | NEW |