From: Martin Mares Date: Sun, 13 Apr 1997 18:13:17 +0000 (+0000) Subject: Daily commit. X-Git-Tag: holmes-import~1703 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5c0bbefcd53a333f02e4cca525ff3d5f3805121e;p=libucw.git Daily commit. --- diff --git a/lib/ctmatch.c b/lib/ctmatch.c index 7a7d9674..ffa1385c 100644 --- a/lib/ctmatch.c +++ b/lib/ctmatch.c @@ -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++)) diff --git a/lib/lib.h b/lib/lib.h index e58e52a4..c4698ec0 100644 --- 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