3 * smatch.c -- match a switch (option)
12 smatch(char *string, struct swit *swp)
24 for (tp = swp; tp->sw; tp++) {
26 if (len < abs(tp->minchars))
27 continue; /* no match */
28 for (sp = string; *sp == *tcp++;) {
30 return (tp - swp); /* exact match */
34 continue; /* no match */
36 return (tp - swp); /* exact match */
38 if (firstone == UNKWNSW)