aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/aho-corasick/acism.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/aho-corasick/acism.c')
-rw-r--r--contrib/aho-corasick/acism.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/aho-corasick/acism.c b/contrib/aho-corasick/acism.c
index a4c678154..64e1eb956 100644
--- a/contrib/aho-corasick/acism.c
+++ b/contrib/aho-corasick/acism.c
@@ -24,15 +24,17 @@
int
acism_lookup(ac_trie_t const *psp, const char *text, size_t len,
- ACISM_ACTION *cb, void *context, int *statep)
+ ACISM_ACTION *cb, void *context, int *statep, bool caseless)
{
ac_trie_t const ps = *psp;
char const *cp = text, *endp = cp + len;
+ uint8_t s;
STATE state = *statep;
int ret = 0;
while (cp < endp) {
- _SYMBOL sym = ps.symv[(uint8_t)*cp++];
+ s = caseless ? g_ascii_tolower (*cp++) : *cp++;
+ _SYMBOL sym = ps.symv[s];
if (!sym) {
// Input byte is not in any pattern string.
state = ROOT;