]> mj.ucw.cz Git - libucw.git/commitdiff
Daily commit.
authorMartin Mares <mj@ucw.cz>
Sun, 13 Apr 1997 18:13:17 +0000 (18:13 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 13 Apr 1997 18:13:17 +0000 (18:13 +0000)
lib/ctmatch.c
lib/lib.h

index 7a7d9674f5aa2120c77c04ba54bdada4f2425ccf..ffa1385cdd878e54c81adecc41517ebad06c4467 100644 (file)
@@ -28,10 +28,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++))
index e58e52a4c3dcad204a9876a324d1bf06c9dde6f3..c4698ec0b5137883f8160a30ee02c2eb9049e6de 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -58,10 +58,16 @@ void initlog(byte *);
 void *xmalloc(uns);
 byte *stralloc(byte *);
 
-/* Content-Type pattern matching */
+/* Content-Type pattern matching and filters */
+
+struct ct_filter;
 
 int match_ct_patt(byte *, byte *);
 
+struct ct_filter *new_ct_filter(void);
+byte *add_ct_filter(struct ct_filter *, byte *);
+int match_ct_filter(struct ct_filter *, byte *);
+
 /* Binary log */
 
 #ifdef HAVE_FFS