From 5c0bbefcd53a333f02e4cca525ff3d5f3805121e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 13 Apr 1997 18:13:17 +0000 Subject: [PATCH] Daily commit. --- lib/ctmatch.c | 4 ++-- lib/lib.h | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) 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 -- 2.39.2