2 ** smatch.c -- match a switch (option)
4 ** This code is Copyright (c) 2002, by the authors of nmh. See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
13 smatch(char *string, struct swit *swp)
25 for (tp = swp; tp->sw; tp++) {
27 if (len < abs(tp->minchars))
28 continue; /* no match */
29 for (sp = string; *sp == *tcp++;) {
31 return (tp - swp); /* exact match */
35 continue; /* no match */
37 return (tp - swp); /* exact match */
39 if (firstone == UNKWNSW)