9 date 92.12.15.00.20.22; author jromine; state Exp;
14 date 92.05.19.20.58.04; author jromine; state Exp;
19 date 90.04.05.15.32.17; author sources; state Exp;
24 date 90.04.05.14.49.48; author sources; state Exp;
29 date 90.02.09.09.33.31; author sources; state Exp;
43 @/* smatch.c - match a switch */
45 static char ident[] = "@@(#)$Id: smatch.c,v 1.4 1992/05/19 20:58:04 jromine Exp jromine $";
51 #define abs(i) (i < 0 ? -i : i)
55 register char *string;
56 register struct swit *swp;
69 for (stringlen = strlen (string), tp = swp; tcp = tp -> sw; tp++) {
70 if (stringlen < abs (tp -> minchars))
71 continue; /* no match */
72 for (sp = string; *sp == *tcp++;) {
74 return (tp - swp);/* exact match */
78 continue; /* no match */
80 return (tp - swp);/* exact match */
82 if (firstone == UNKWNSW)
100 static char ident[] = "@@(#)$Id: smatch.c,v 1.3 1990/04/05 15:32:17 sources Exp jromine $";
112 static char ident[] = "@@(#)$Id:$";
129 static char ident[] = "$Id:";