Untitled
public text v1 · immutablechar *constmap(cm,s,len)
struct constmap *cm;
char *s;
int len;
{
constmap_hash h;
int pos;
h = hash(s,len);
pos = cm->first[h & cm->mask];
while (pos != -1) {
if (h == cm->hash[pos])
if (len == cm->inputlen[pos])
if (!case_diffb(cm->input[pos],len,s))
return cm->input[pos] + cm->inputlen[pos] + 1;
pos = cm->next[pos];
}
return 0;
}