From: erg Date: Tue, 29 Jun 2010 16:34:25 +0000 (+0000) Subject: Fix gvpack.c to make it compatible with cgraph X-Git-Tag: LAST_LIBGRAPH~32^2~1298 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9f1e959d8ef9e0c4f50e4bdba8e3c142f0b5882;p=graphviz Fix gvpack.c to make it compatible with cgraph --- diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index fae65a3d7..c9ccb02d7 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -276,6 +276,10 @@ static void init_node_edge(Agraph_t * g) } } +#ifndef WITH_CGRAPH +#define agnameof(g) ((g)->name) +#endif + /* init_graph: * Initialize attributes. We always do the minimum required by * libcommon. If fill is true, we use init_nop (neato -n) to @@ -305,10 +309,10 @@ static void init_graph(Agraph_t * g, boolean fill, GVC_t* gvc) if (ret) { if (ret < 0) fprintf(stderr, "Error loading layout info from graph %s\n", - g->name); + agnameof(g)); else if (ret > 0) fprintf(stderr, "gvpack does not support backgrounds as found in graph %s\n", - g->name); + agnameof(g)); exit(1); } }