From: erg Date: Fri, 16 Mar 2007 15:10:14 +0000 (+0000) Subject: Fix bug in gvpack. The new library architecture requires a gvc attached to X-Git-Tag: LAST_LIBGRAPH~32^2~5624 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d0ce77d7552025debf9817fda94c096a25c149b;p=graphviz Fix bug in gvpack. The new library architecture requires a gvc attached to a graph in order to do font lookup. --- diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 21bce0f91..10234dcc4 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -30,6 +30,7 @@ #endif #include +#include #include #include #include @@ -668,7 +669,7 @@ static Agraph_t *cloneGraph(Agraph_t ** gs, int cnt) * combined graph will be strict; other, the combined graph will * be non-strict. */ -static Agraph_t **readGraphs(int *cp) +static Agraph_t **readGraphs(int *cp, GVC_t* gvc) { Agraph_t *g; Agraph_t **gs = 0; @@ -682,6 +683,7 @@ static Agraph_t **readGraphs(int *cp) newIngraph(&ig, myFiles, agread); while ((g = nextGraph(&ig)) != 0) { + GD_gvc(g) = gvc; if (verbose) fprintf(stderr, "Reading graph %s\n", g->name); if (cnt >= sz) { @@ -766,10 +768,12 @@ int main(int argc, char *argv[]) int cnt; pack_info pinfo; box bb; + GVC_t * gvc; init(argc, argv); - gs = readGraphs(&cnt); + gvc = gvNEWcontext(Info, gvUsername()); + gs = readGraphs(&cnt, gvc); if (cnt == 0) exit(0);