Commit 4d37a9f2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove "rate" variables.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3885 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8a27e663
...@@ -185,7 +185,6 @@ parse_set(struct tokenlist *tl) ...@@ -185,7 +185,6 @@ parse_set(struct tokenlist *tl)
switch (vp->fmt) { switch (vp->fmt) {
case INT: case INT:
case SIZE: case SIZE:
case RATE:
case TIME: case TIME:
case RTIME: case RTIME:
case FLOAT: case FLOAT:
...@@ -207,8 +206,6 @@ parse_set(struct tokenlist *tl) ...@@ -207,8 +206,6 @@ parse_set(struct tokenlist *tl)
vcc_RTimeVal(tl); vcc_RTimeVal(tl);
else if (vp->fmt == SIZE) else if (vp->fmt == SIZE)
vcc_SizeVal(tl); vcc_SizeVal(tl);
else if (vp->fmt == RATE)
vcc_RateVal(tl);
else if (vp->fmt == FLOAT) else if (vp->fmt == FLOAT)
Fb(tl, 0, "%g", vcc_DoubleVal(tl)); Fb(tl, 0, "%g", vcc_DoubleVal(tl));
else if (vp->fmt == INT) { else if (vp->fmt == INT) {
......
...@@ -100,7 +100,6 @@ enum var_type { ...@@ -100,7 +100,6 @@ enum var_type {
INT, INT,
FLOAT, FLOAT,
SIZE, SIZE,
RATE,
TIME, TIME,
RTIME, RTIME,
STRING, STRING,
......
...@@ -120,23 +120,6 @@ SizeUnit(struct tokenlist *tl) ...@@ -120,23 +120,6 @@ SizeUnit(struct tokenlist *tl)
return (sc); return (sc);
} }
/*--------------------------------------------------------------------
* 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 * Recognize and convert { CNUM } to unsigned value
*/ */
...@@ -227,18 +210,6 @@ vcc_SizeVal(struct tokenlist *tl) ...@@ -227,18 +210,6 @@ vcc_SizeVal(struct tokenlist *tl)
Fb(tl, 0, "(%g * %g)", v, sc); 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 static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment