Commit f3c0d915 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Dridi Boukelmoune

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

parent f5420f4e
......@@ -574,7 +574,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;
......
......@@ -234,9 +234,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");
......
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