]> err.no Git - varnish/commitdiff
Fix typo, so we correctly recognize '-=' as T_DECR token.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 31 Mar 2007 18:20:33 +0000 (18:20 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 31 Mar 2007 18:20:33 +0000 (18:20 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1293 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvcl/vcc_fixed_token.c
varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl

index 131a67d7abc161345fe2dbfb0ae807bfc4911f27..dc8bdf41541c7bd6ac7e9854773a7b722e26159f 100644 (file)
@@ -85,6 +85,10 @@ vcl_fixed_token(const char *p, const char **q)
                }
                return (0);
        case '-':
+               if (p[0] == '-' && p[1] == '=') {
+                       *q = p + 2;
+                       return (T_DECR);
+               }
                if (p[0] == '-' && p[1] == '-') {
                        *q = p + 2;
                        return (T_DEC);
@@ -101,10 +105,6 @@ vcl_fixed_token(const char *p, const char **q)
                }
                return (0);
        case '/':
-               if (p[0] == '/' && p[1] == '=') {
-                       *q = p + 2;
-                       return (T_DECR);
-               }
                if (p[0] == '/' && p[1] == '=') {
                        *q = p + 2;
                        return (T_DIV);
@@ -391,7 +391,7 @@ vcl_init_tnames(void)
        vcl_tnames[T_CAND] = "&&";
        vcl_tnames[T_COR] = "||";
        vcl_tnames[T_DEC] = "--";
-       vcl_tnames[T_DECR] = "/=";
+       vcl_tnames[T_DECR] = "-=";
        vcl_tnames[T_DELIVER] = "deliver";
        vcl_tnames[T_DISCARD] = "discard";
        vcl_tnames[T_DIV] = "/=";
index 1a341d0baba680ccf459b681263f29f919ed40a7..d96274480e6581830a5ac8c2c4f8d7891aeace02 100755 (executable)
@@ -93,7 +93,7 @@ set magic {
        {">>"   SHR}
        {"<<"   SHL}
        {"+="   INCR}
-       {"/="   DECR}
+       {"-="   DECR}
        {"*="   MUL}
        {"/="   DIV}
 }