out->contents += "q " + m.to_string() + " cm " + xobj_res + " Do Q";
}
-static int run_indent;
-
static void debug_pages(vector<page *> &pages)
{
if (!debug_mode)
return;
for (auto pg: pages)
- debug("%*sPage #%d: w=%.3f h=%.3f", run_indent, "", pg->index, pg->width, pg->height);
+ debug("Page #%d: w=%.3f h=%.3f", pg->index, pg->width, pg->height);
}
vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages)
{
- debug("%*s# Input", run_indent, "");
+ debug("# Input");
debug_pages(pages);
for (auto c: cmds)
{
- debug("%*s# Executing %s", run_indent, "", c->def->name);
- run_indent += 4;
+ debug("# Executing %s", c->def->name);
+ debug_indent += 4;
pages = c->exec->process(pages);
- run_indent -= 4;
+ debug_indent -= 4;
debug_pages(pages);
}