r3609 - in branches/2.0/varnish-cache: bin/varnishd include lib/libvcl

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Feb 5 12:14:28 CET 2009


Author: tfheen
Date: 2009-02-05 12:14:28 +0100 (Thu, 05 Feb 2009)
New Revision: 3609

Modified:
   branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c
   branches/2.0/varnish-cache/include/vrt.h
   branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
Log:
Merge r3393: Retire VRT_re_test()



Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c	2009-02-05 11:10:59 UTC (rev 3608)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c	2009-02-05 11:14:28 UTC (rev 3609)
@@ -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: branches/2.0/varnish-cache/include/vrt.h
===================================================================
--- branches/2.0/varnish-cache/include/vrt.h	2009-02-05 11:10:59 UTC (rev 3608)
+++ branches/2.0/varnish-cache/include/vrt.h	2009-02-05 11:14:28 UTC (rev 3609)
@@ -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 *);
 

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-02-05 11:10:59 UTC (rev 3608)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-02-05 11:14:28 UTC (rev 3609)
@@ -271,7 +271,6 @@
 	vsb_cat(sb, "g);\n\n/* Regexp related */\nvoid VRT_re_init(void **,");
 	vsb_cat(sb, " const char *, int sub);\nvoid VRT_re_fini(void *);\n");
 	vsb_cat(sb, "int VRT_re_match(const char *, void *re);\n");
-	vsb_cat(sb, "int VRT_re_test(struct vsb *, const char *, int sub);\n");
 	vsb_cat(sb, "const char *VRT_regsub(const struct sess *sp, int all,");
 	vsb_cat(sb, " const char *,\n    void *, const char *);\n");
 	vsb_cat(sb, "\nvoid VRT_panic(struct sess *sp,  const char *, ...);");



More information about the varnish-commit mailing list