From 06121abb05bf252bac32abd197489c1df1f24da0 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 14 Nov 2008 09:49:28 +0000 Subject: [PATCH] Retire VRT_re_test() git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3393 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vrt_re.c | 19 ------------------- varnish-cache/include/vrt.h | 1 - 2 files changed, 20 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_vrt_re.c b/varnish-cache/bin/varnishd/cache_vrt_re.c index fcaef593..f505d0a8 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_re.c +++ b/varnish-cache/bin/varnishd/cache_vrt_re.c @@ -84,25 +84,6 @@ VRT_re_match(const char *s, void *re) return (0); } -int -VRT_re_test(struct vsb *sb, const char *re, int sub) -{ - int i; - regex_t t; - char buf[BUFSIZ]; - - memset(&t, 0, sizeof t); - i = regcomp(&t, re, REG_EXTENDED | (sub ? 0 : REG_NOSUB)); - if (i == 0) { - regfree(&t); - return (0); - } - (void)regerror(i, &t, buf, sizeof buf); - vsb_printf(sb, "Regexp compilation error:\n\n%s\n\n", buf); - regfree(&t); - return (1); -} - const char * VRT_regsub(const struct sess *sp, int all, const char *str, void *re, const char *sub) diff --git a/varnish-cache/include/vrt.h b/varnish-cache/include/vrt.h index 4d675eb9..051d6148 100644 --- a/varnish-cache/include/vrt.h +++ b/varnish-cache/include/vrt.h @@ -136,7 +136,6 @@ void VRT_acl_log(const struct sess *, const char *msg); void VRT_re_init(void **, const char *, int sub); void VRT_re_fini(void *); int VRT_re_match(const char *, void *re); -int VRT_re_test(struct vsb *, const char *, int sub); const char *VRT_regsub(const struct sess *sp, int all, const char *, void *, const char *); -- 2.39.5