From: phk Date: Sat, 31 Mar 2007 18:20:33 +0000 (+0000) Subject: Fix typo, so we correctly recognize '-=' as T_DECR token. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fedef1318e2ba85da7961dd0a4bbf65a4d0cc34d;p=varnish Fix typo, so we correctly recognize '-=' as T_DECR token. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1293 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvcl/vcc_fixed_token.c b/varnish-cache/lib/libvcl/vcc_fixed_token.c index 131a67d7..dc8bdf41 100644 --- a/varnish-cache/lib/libvcl/vcc_fixed_token.c +++ b/varnish-cache/lib/libvcl/vcc_fixed_token.c @@ -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] = "/="; diff --git a/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl b/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl index 1a341d0b..d9627448 100755 --- a/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl +++ b/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl @@ -93,7 +93,7 @@ set magic { {">>" SHR} {"<<" SHL} {"+=" INCR} - {"/=" DECR} + {"-=" DECR} {"*=" MUL} {"/=" DIV} }