Commit 1425d2ae authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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

parent 64e2ba27
...@@ -573,7 +573,7 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how) ...@@ -573,7 +573,7 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
break; break;
case '\n': case '\n':
if (how & VSB_QUOTE_CSTR) { 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)) { } else if (how & (VSB_QUOTE_NONL|VSB_QUOTE_UNSAFE)) {
(void)VSB_printf(s, "\n"); (void)VSB_printf(s, "\n");
nl = 1; nl = 1;
......
...@@ -233,9 +233,8 @@ EmitCoordinates(const struct vcc *tl, struct vsb *vsb) ...@@ -233,9 +233,8 @@ EmitCoordinates(const struct vcc *tl, struct vsb *vsb)
VTAILQ_FOREACH(sp, &tl->sources, list) { VTAILQ_FOREACH(sp, &tl->sources, list) {
VSB_printf(vsb, " /* "); VSB_printf(vsb, " /* ");
VSB_quote(vsb, sp->name, -1, VSB_QUOTE_CSTR); VSB_quote(vsb, sp->name, -1, VSB_QUOTE_CSTR);
VSB_printf(vsb, "*/\n"); VSB_printf(vsb, " */\n");
VSB_printf(vsb, "\t"); VSB_quote_pfx(vsb, "\t", sp->b, sp->e - sp->b, VSB_QUOTE_CSTR);
VSB_quote(vsb, sp->b, sp->e - sp->b, VSB_QUOTE_CSTR);
VSB_printf(vsb, ",\n"); VSB_printf(vsb, ",\n");
} }
VSB_printf(vsb, "};\n\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