From 9d0ce77d7552025debf9817fda94c096a25c149b Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 16 Mar 2007 15:10:14 +0000 Subject: [PATCH] Fix bug in gvpack. The new library architecture requires a gvc attached to a graph in order to do font lookup. --- cmd/tools/gvpack.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 2.40.0