TOLOWER
table[TOLOWER(*patend)] = 1;
|| TOLOWER(*s) == cc
&& TOLOWER(*q) != *p
define TOLOWER(ch) tolower(ch)
*p = TOLOWER(*p);