]> mj.ucw.cz Git - paperjam.git/blobdiff - paperjam.cc
Modulo works
[paperjam.git] / paperjam.cc
index f388734bcd9583100f81c7beb9a19a1d738a0c22..0a95acf26abd49b8c06ba2b110bf8703611005af 100644 (file)
@@ -49,28 +49,26 @@ void in_page::render(page_out *out, pdf_matrix xform)
   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);
     }