Permalink
Browse files

VSB_quote(QUOTE_CSTR) should not indent with "\t" unless asked.

  • Loading branch information...
bsdphk committed Jan 9, 2019
1 parent 64e2ba2 commit 1425d2ae3cfff0a7ca8dd4b3696118ebf474b0d3
Showing with 3 additions and 4 deletions.
  1. +1 −1 lib/libvarnish/vsb.c
  2. +2 −3 lib/libvcc/vcc_compile.c
@@ -573,7 +573,7 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
break;
case '\n':
if (how & VSB_QUOTE_CSTR) {
(void)VSB_printf(s, "\\n\"\n%s\t\"", pfx);
(void)VSB_printf(s, "\\n\"\n%s\"", pfx);
} else if (how & (VSB_QUOTE_NONL|VSB_QUOTE_UNSAFE)) {
(void)VSB_printf(s, "\n");
nl = 1;
@@ -233,9 +233,8 @@ EmitCoordinates(const struct vcc *tl, struct vsb *vsb)
VTAILQ_FOREACH(sp, &tl->sources, list) {
VSB_printf(vsb, " /* ");
VSB_quote(vsb, sp->name, -1, VSB_QUOTE_CSTR);
VSB_printf(vsb, "*/\n");
VSB_printf(vsb, "\t");
VSB_quote(vsb, sp->b, sp->e - sp->b, VSB_QUOTE_CSTR);
VSB_printf(vsb, " */\n");
VSB_quote_pfx(vsb, "\t", sp->b, sp->e - sp->b, VSB_QUOTE_CSTR);
VSB_printf(vsb, ",\n");
}
VSB_printf(vsb, "};\n\n");

0 comments on commit 1425d2a

Please sign in to comment.