vim:sw=4:sts=4 Support for the FCH algorithm of the cmph library, which is an older and less powerful algorithm than BDZ, which is also supported. by Wolfgang Oertl 2007 This code is derived from the cmph library (http://cmph.sourceforge.net/) version 0.6 by Davi de Castro Reis and Fabiano Cupertino Botelho. I could have linked lua-gtk with the cmph library, but that would have resulted in an almost 50 kB larger lua-gtk. This is so because the cmph library supports more algorithms and includes the generation code too, whereas I only need the very much simpler lookup code at runtime.
|hash_search_fch (L, hi2, key, keylen, datalen)||Hash lookup function.|
|local mixh10h1h12 (b, p1, p2, i)||From fch.c.|
- hash_search_fch (L, hi2, key, keylen, datalen)
Hash lookup function. Returns a bucket number; any input string results in a valid bucket. Whether the key is in the hash table has to be determined later from the contents of the bucket.
- local mixh10h1h12 (b, p1, p2, i)
From fch.c. Note: the type of p1 and p2 was changed from float to unsigned int, because they can only contain integers anyway.