Index: report.c =================================================================== --- report.c (revision 37974) +++ report.c (revision 37975) @@ -58,6 +58,7 @@ #include #include "report_conf.h" #include +#include #include "layer.h" #include "layer_ui.h" #include "obj_term.h" @@ -80,7 +81,17 @@ #define USER_UNITMASK (rnd_conf.editor.grid_unit->allow) +static void r_print_obj(FILE *f, void *obj) +{ + fprintf(f, "\n", obj); +} +static void r_dump_tree(rnd_rtree_t *root, int unused) +{ + rnd_rtree_dump_text(stdout, root, r_print_obj); +} + + typedef struct rdialog_ctx_s { RND_DAD_DECL_NOINIT(dlg) } rdialog_ctx_t; @@ -194,7 +205,7 @@ #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(PCB->Data->padstack_tree, 0); + r_dump_tree(PCB->Data->padstack_tree, 0); #endif proto = pcb_pstk_get_proto(ps); @@ -212,7 +223,7 @@ { #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(line->parent.layer->line_tree, 0); + r_dump_tree(line->parent.layer->line_tree, 0); #endif rnd_append_printf(dst, "%m+LINE ID# %ld; Flags:%s\n" "FirstPoint(X,Y) = %$mD, ID = %ld.\n" @@ -235,7 +246,7 @@ char *anchor1 = "n/a", *anchor2 = "n/a"; #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(PCB->Data->rat_tree, 0); + r_dump_tree(PCB->Data->rat_tree, 0); #endif rnd_append_printf(dst, "%m+RAT-LINE ID# %ld; Flags:%s\n" "FirstPoint(X,Y) = %$mD; ID = %ld; " @@ -260,7 +271,7 @@ rnd_box_t box; #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(arc->parent.layer->arc_tree, 0); + r_dump_tree(arc->parent.layer->arc_tree, 0); #endif pcb_arc_get_end(arc, 0, &box.X1, &box.Y1); pcb_arc_get_end(arc, 1, &box.X2, &box.Y2); @@ -291,7 +302,7 @@ #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(poly->parent.layer->polygon_tree, 0); + r_dump_tree(poly->parent.layer->polygon_tree, 0); #endif aunit = rnd_conf.editor.grid_unit->suffix; @@ -328,7 +339,7 @@ { #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(PCB->Data->subc_tree, 0); + r_dump_tree(PCB->Data->subc_tree, 0); #endif rnd_append_printf(dst, "%m+SUBCIRCUIT ID# %ld; Flags:%s\n" "BoundingBox %$mD %$mD.\n" @@ -347,7 +358,7 @@ { #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(text->parent.layer->text_tree, 0); + r_dump_tree(text->parent.layer->text_tree, 0); #endif rnd_append_printf(dst, "%m+TEXT ID# %ld; Flags:%s\n" @@ -365,7 +376,7 @@ { #ifndef NDEBUG if (rnd_gui->shift_is_pressed(rnd_gui)) - rnd_r_dump_tree(gfx->parent.layer->gfx_tree, 0); + r_dump_tree(gfx->parent.layer->gfx_tree, 0); #endif rnd_append_printf(dst, "%m+GFX ID# %ld; Flags:%s\n"