r3885 - trunk/varnish-cache/lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Thu Mar 5 11:36:51 CET 2009


Author: phk
Date: 2009-03-05 11:36:51 +0100 (Thu, 05 Mar 2009)
New Revision: 3885

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_action.c
   trunk/varnish-cache/lib/libvcl/vcc_compile.h
   trunk/varnish-cache/lib/libvcl/vcc_parse.c
Log:
Remove "rate" variables.



Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_action.c	2009-03-05 10:30:56 UTC (rev 3884)
+++ trunk/varnish-cache/lib/libvcl/vcc_action.c	2009-03-05 10:36:51 UTC (rev 3885)
@@ -185,7 +185,6 @@
 	switch (vp->fmt) {
 	case INT:
 	case SIZE:
-	case RATE:
 	case TIME:
 	case RTIME:
 	case FLOAT:
@@ -207,8 +206,6 @@
 				vcc_RTimeVal(tl);
 			else if (vp->fmt == SIZE)
 				vcc_SizeVal(tl);
-			else if (vp->fmt == RATE)
-				vcc_RateVal(tl);
 			else if (vp->fmt == FLOAT)
 				Fb(tl, 0, "%g", vcc_DoubleVal(tl));
 			else if (vp->fmt == INT) {

Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.h	2009-03-05 10:30:56 UTC (rev 3884)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.h	2009-03-05 10:36:51 UTC (rev 3885)
@@ -100,7 +100,6 @@
 	INT,
 	FLOAT,
 	SIZE,
-	RATE,
 	TIME,
 	RTIME,
 	STRING,

Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c	2009-03-05 10:30:56 UTC (rev 3884)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c	2009-03-05 10:36:51 UTC (rev 3885)
@@ -121,23 +121,6 @@
 }
 
 /*--------------------------------------------------------------------
- * Recognize and convert units of rate as { space '/' time }
- */
-
-static double
-RateUnit(struct tokenlist *tl)
-{
-	double sc;
-
-	assert(tl->t->tok == ID);
-	sc = SizeUnit(tl);
-	Expect(tl, '/');
-	vcc_NextToken(tl);
-	sc /= TimeUnit(tl);
-	return (sc);
-}
-
-/*--------------------------------------------------------------------
  * Recognize and convert { CNUM } to unsigned value
  */
 
@@ -227,18 +210,6 @@
 	Fb(tl, 0, "(%g * %g)", v, sc);
 }
 
-void
-vcc_RateVal(struct tokenlist *tl)
-{
-	double v, sc;
-
-	v = vcc_DoubleVal(tl);
-	ERRCHK(tl);
-	ExpectErr(tl, ID);
-	sc = RateUnit(tl);
-	Fb(tl, 0, "(%g * %g)", v, sc);
-}
-
 /*--------------------------------------------------------------------*/
 
 static void



More information about the varnish-commit mailing list