static void dump_hierarchy(GList *l, char *prefix) { char *newprefix=g_alloca(sizeof(char)*(strlen(prefix)+2)); strcpy(newprefix, prefix); strcat(newprefix," "); while (l) { struct boundary *boundary=l->data; fprintf(stderr,"%s:%s (0x%x,0x%x)-(0x%x,0x%x)\n",prefix,osm_tag_name(boundary->ib),boundary->r.l.x,boundary->r.l.y,boundary->r.h.x,boundary->r.h.y); dump_hierarchy(boundary->children, newprefix); l=g_list_next(l); } }
static void dump_hierarchy(GList *l, char *prefix) { char *newprefix = g_alloca(sizeof(char) * (strlen(prefix) + 2)); strcpy(newprefix, prefix); strcat(newprefix, " "); while (l) { struct boundary *boundary = l->data; fprintf(stderr, "%s:childs:%d:%lld:%s\n", prefix, g_list_length(boundary->children), item_bin_get_relationid(boundary->ib), osm_tag_name(boundary->ib)); dump_hierarchy(boundary->children, newprefix); l = g_list_next(l); } }