示例#1
0
文件: boundaries.c 项目: greg42/navit
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);
	}
}
示例#2
0
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);
	}
}