]> mj.ucw.cz Git - libucw.git/blobdiff - lib/ctmatch.c
Removed an old FIXME.
[libucw.git] / lib / ctmatch.c
index 7a7d9674f5aa2120c77c04ba54bdada4f2425ccf..597990703f09bafbd065695c24f37af97ff6e5d4 100644 (file)
@@ -1,13 +1,14 @@
 /*
- *     Sherlock Library -- Content-Type Pattern Matching
+ *     UCW Library -- Content-Type Pattern Matching
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
-#include <stdio.h>
-
-#include "lib.h"
-#include "string.h"
+#include "lib/lib.h"
+#include "lib/chartype.h"
 
 int
 match_ct_patt(byte *p, byte *t)
@@ -28,10 +29,10 @@ match_ct_patt(byte *p, byte *t)
          return 0;
       p++;
     }
-  if (*t != '/')
+  if (*t++ != '/')
     return 0;
 
-  if (*p == '*' && p[1] == '/')                /* "*" on the right-hand side */
+  if (*p == '*' && !p[1])              /* "*" on the right-hand side */
     return 1;
   while (*p)
     if (Cupcase(*p++) != Cupcase(*t++))