]> git.marmaro.de Git - mmh/blobdiff - sbr/print_sw.c
Removed isprefix() and replaced it with strncmp().
[mmh] / sbr / print_sw.c
index 7924fbc7b190d61a3e75591bb6e81a51a195067f..3a70c5455859a58b327ffdab872f6a250fe496e2 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)) {