r3393 - in trunk/varnish-cache: bin/varnishd include

phk at projects.linpro.no phk at projects.linpro.no
Fri Nov 14 10:49:28 CET 2008


Author: phk
Date: 2008-11-14 10:49:28 +0100 (Fri, 14 Nov 2008)
New Revision: 3393

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vrt_re.c
   trunk/varnish-cache/include/vrt.h
Log:
Retire VRT_re_test()



Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c	2008-11-14 09:48:57 UTC (rev 3392)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c	2008-11-14 09:49:28 UTC (rev 3393)
@@ -84,25 +84,6 @@
 	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)

Modified: trunk/varnish-cache/include/vrt.h
===================================================================
--- trunk/varnish-cache/include/vrt.h	2008-11-14 09:48:57 UTC (rev 3392)
+++ trunk/varnish-cache/include/vrt.h	2008-11-14 09:49:28 UTC (rev 3393)
@@ -136,7 +136,6 @@
 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 *);
 



More information about the varnish-commit mailing list