[master] 1cf3f7f Fix an indentation problem in the produced C source.
Poul-Henning Kamp
phk at varnish-cache.org
Fri Oct 19 10:06:28 CEST 2012
commit 1cf3f7fe8c202fd0a3a05f5da6c9dbfa2cc31e9a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Oct 19 08:06:07 2012 +0000
Fix an indentation problem in the produced C source.
diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c
index ecf0069..4b3d69b 100644
--- a/lib/libvcl/vcc_action.c
+++ b/lib/libvcl/vcc_action.c
@@ -120,7 +120,8 @@ parse_set(struct vcc *tl)
vp = vcc_FindVar(tl, tl->t, 1, "cannot be set");
ERRCHK(tl);
assert(vp != NULL);
- Fb(tl, 1, "%s", vp->lname);
+ Fb(tl, 1, "%s\n", vp->lname);
+ tl->indent += INDENT;
vcc_NextToken(tl);
fmt = vp->fmt;
for (ap = arith; ap->type != VOID; ap++) {
@@ -129,7 +130,7 @@ parse_set(struct vcc *tl)
if (ap->oper != tl->t->tok)
continue;
if (ap->oper != '=')
- Fb(tl, 0, "%s %c ", vp->rname, *tl->t->b);
+ Fb(tl, 1, "%s %c ", vp->rname, *tl->t->b);
vcc_NextToken(tl);
fmt = ap->want;
break;
@@ -141,6 +142,7 @@ parse_set(struct vcc *tl)
} else {
vcc_Expr(tl, fmt);
}
+ tl->indent -= INDENT;
Fb(tl, 1, ");\n");
}
More information about the varnish-commit
mailing list