Removed isprefix() and replaced it with strncmp().
[mmh] / sbr / print_sw.c
index 7924fbc..3a70c54 100644 (file)
@@ -20,7 +20,8 @@ print_sw(char *substr, struct swit *swp, char *prefix, FILE *fp)
        len = strlen(substr);
        for (; swp->sw; swp++) {
                /* null matches all strings */
-               if (!*substr || (isprefix(substr, swp->sw) && len >= swp->minchars)) {
+               if (!*substr || (strncmp(swp->sw, substr, len)==0 &&
+                               len >= swp->minchars)) {
                        optno = 0;
                        /* next switch */
                        if ((sp = (&swp[1])->sw)) {