KFEAT: A = gate * Abyss
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1633 c06c8d41-db1a-0410-9941-cceddc491573
AYYQVALBAAKFK5U52WGHWE2N7LCVZM3BGRADPVJQWOFLS2TXK6QAC UPJVSMMMHGRDUIJG4MZX6IBLQ4ODBF5Z3PF3RHDYTSAEOCVDZM5AC GRH4XPIYHDOXXF3R3QPMZTFHGLO2OJAZS4FLNBBXG3DHTQQM7RDQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC JDM27QE4HR52AYFSQE763BFF57ANOTF5MXKMO377PP5EXMN7SAOAC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC XPCGZBHHSL6MB3ORMUJI64BAERU6AZTIY6RK56BBW7SNB3IK24IAC V4WGXVERZ34B7CEINV4D3ZYEKKT2TUIUYTOX5FSOX6B26U3DPVLQC features_by_desc( text_pattern(s, true) );for (int i = 0, size = feats.size(); i < size; ++i)list.push_back( feature_spec(feats[i], weight) );
features_by_desc( glob_pattern(s, true) );if (!feats.empty())list.push_back( feature_spec(feats[0], weight) );
}////////////////////////////////////////////////////////////////////// Basic glob (always available)struct glob_info{std::string s;bool ignore_case;};void *compile_glob_pattern(const char *pattern, bool icase){// If we're using simple globs, we need to box the pattern with '*'std::string s = std::string("*") + pattern + "*";glob_info *gi = new glob_info;if (gi){gi->s = s;gi->ignore_case = icase;}return gi;}void free_compiled_glob_pattern(void *compiled_pattern){delete static_cast<glob_info *>( compiled_pattern );}bool glob_pattern_match(void *compiled_pattern, const char *text, int length){glob_info *gi = static_cast<glob_info *>( compiled_pattern );return glob_match(gi->s.c_str(), text, gi->ignore_case);
// If we're using simple globs, we need to box the pattern with '*'std::string s = std::string("*") + pattern + "*";glob_info *gi = new glob_info;if (gi){gi->s = s;gi->ignore_case = icase;}return gi;
return compile_glob_pattern(pattern, icase);