Lines Matching refs:matchstate
55 static State_t matchstate;
66 for (i = matchstate.size; i--;)
67 if (matchstate.cache[i] && matchstate.cache[i]->keep)
69 matchstate.cache[i]->keep = 0;
70 regfree(&matchstate.cache[i]->re);
97 if (reflags > matchstate.size)
99 if (matchstate.cache = newof(matchstate.cache, Cache_t*, reflags, 0))
100 matchstate.size = reflags;
103 matchstate.size = 0;
111 if (!matchstate.cache)
113 if (!(matchstate.cache = newof(0, Cache_t*, CACHE, 0)))
115 matchstate.size = CACHE;
124 if ((s = setlocale(LC_CTYPE, NiL)) != matchstate.locale)
126 matchstate.locale = s;
140 for (i = matchstate.size; i--;)
141 if (!matchstate.cache[i])
143 else if (!matchstate.cache[i]->keep)
145 else if (*(Key_t*)matchstate.cache[i]->pattern == key && !strcmp(matchstate.cache[i]->pattern, pattern) && matchstate.cache[i]->reflags == reflags)
147 else if (!matchstate.cache[old] || matchstate.cache[old]->serial > matchstate.cache[i]->serial)
158 if (!(cp = matchstate.cache[unused]) && !(cp = matchstate.cache[unused] = newof(0, Cache_t, 1, 0)))
193 cp = matchstate.cache[i];
194 cp->serial = ++matchstate.serial;