summaryrefslogtreecommitdiffstats
path: root/src/search.php
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-04-10 18:36:52 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-04-10 18:36:52 (GMT)
commit76e39987363c93fdd3f2d99ffdb9f87743d6af7c (patch)
treea604824ba5bbf13dd607ebd57c1a426a0d225d58 /src/search.php
parentc8be4837b6a2a96cc3e57aa941645b9dc017e8b2 (diff)
downloadDoxygen-76e39987363c93fdd3f2d99ffdb9f87743d6af7c.zip
Doxygen-76e39987363c93fdd3f2d99ffdb9f87743d6af7c.tar.gz
Doxygen-76e39987363c93fdd3f2d99ffdb9f87743d6af7c.tar.bz2
Release-1.4.2-20050410
Diffstat (limited to 'src/search.php')
-rw-r--r--src/search.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/search.php b/src/search.php
index ab8e248..ee8802a 100644
--- a/src/search.php
+++ b/src/search.php
@@ -21,15 +21,24 @@ function readHeader($file)
function computeIndex($word)
{
- if (strlen($word)<2) return -1;
+ $lword = strtolower($word);
+ $l = strlen($lword);
+ for ($i=0;$i<$l;$i++)
+ {
+ $c = ord($lword{$i});
+ $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
+ }
+ return $v;
+
+ //if (strlen($word)<2) return -1;
// high char of the index
- $hi = ord($word{0});
- if ($hi==0) return -1;
+ //$hi = ord($word{0});
+ //if ($hi==0) return -1;
// low char of the index
- $lo = ord($word{1});
- if ($lo==0) return -1;
+ //$lo = ord($word{1});
+ //if ($lo==0) return -1;
// return index
- return $hi*256+$lo;
+ //return $hi*256+$lo;
}
function search($file,$word,&$statsList)