added debug output to main application
authorMichael Göhler <somebody.here@gmx.de>
Sun, 17 Aug 2014 00:23:01 +0000 (02:23 +0200)
committerMichael Göhler <somebody.here@gmx.de>
Sun, 17 Aug 2014 00:23:01 +0000 (02:23 +0200)
tmp.c

diff --git a/tmp.c b/tmp.c
index bcdfeed..b908834 100644 (file)
--- a/tmp.c
+++ b/tmp.c
@@ -25,5 +25,21 @@ int main(int argc, char *argv[]) {
     }
 
     doc = markdown_load(input);
+
+    // test line/page load
+    int cp = 0, cl = 0;
+    page_t *page = doc->page;
+    line_t *line;
+    while(page) {
+        cp++;
+        line = page->line;
+        cl = 0;
+        while(line) {
+            cl++;
+            line = line->next;
+        }
+        printf("page %i: %i lines\n", cp, cl);
+        page = page->next;
+    }
 }