From 0be435b35cb94636f192cc75314ade22115f8edb Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 18 Oct 2005 18:28:35 +0000 Subject: [PATCH] fix mechanism for specifying builtins --- cmd/dot/Makefile.am | 28 ++++++---------------------- cmd/tools/Makefile.am | 8 ++------ dot.demo/Makefile | 27 +++++---------------------- lib/common/args.c | 5 ++++- lib/common/arrows.c | 5 ++++- lib/common/colxlate.c | 5 ++++- lib/common/diagen.c | 5 ++++- lib/common/emit.c | 6 ++++-- lib/common/figgen.c | 6 ++++-- lib/common/fontmetrics.c | 5 ++++- lib/common/gdgen.c | 5 ++++- lib/common/gdtextsize.c | 5 ++++- lib/common/gdusershape.c | 5 ++++- lib/common/globals.c | 5 ++++- lib/common/hpglgen.c | 5 ++++- lib/common/htmllex.c | 5 ++++- lib/common/htmlparse.y | 5 ++++- lib/common/htmltable.c | 5 ++++- lib/common/htmltable.h | 5 ++++- lib/common/input.c | 6 ++++-- lib/common/labels.c | 5 ++++- lib/common/mapgen.c | 5 ++++- lib/common/mifgen.c | 5 ++++- lib/common/mpgen.c | 5 ++++- lib/common/ns.c | 5 ++++- lib/common/output.c | 5 ++++- lib/common/picgen.c | 5 ++++- lib/common/postproc.c | 5 ++++- lib/common/psgen.c | 5 ++++- lib/common/psusershape.c | 5 ++++- lib/common/routespl.c | 5 ++++- lib/common/shapes.c | 5 ++++- lib/common/splines.c | 5 ++++- lib/common/svggen.c | 5 ++++- lib/common/svgusershape.c | 5 ++++- lib/common/utils.c | 5 ++++- lib/common/vrmlgen.c | 5 ++++- lib/common/vtxgen.c | 5 ++++- lib/common/xdgen.c | 5 ++++- lib/gvc/gvc.c | 5 ++++- lib/gvc/gvc.h | 5 +++++ lib/gvc/gvconfig.c | 10 +--------- lib/gvc/gvplugin.h | 8 +++++++- tclpkg/gv/Makefile.am | 8 ++------ tclpkg/gv/gv.cpp | 1 + 45 files changed, 177 insertions(+), 106 deletions(-) diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index 1e0c46895..d1a67e624 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -11,23 +11,19 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/gvc \ -I$(top_srcdir)/lib/pathplan \ -I$(top_srcdir)/lib/graph \ - -I$(top_srcdir)/lib/cdt + -I$(top_srcdir)/lib/cdt \ + -DBUILTINS if ENABLE_STATIC -bin_PROGRAMS = dot dot_static +bin_PROGRAMS = dot_static else bin_PROGRAMS = dot endif man_MANS = dot.1 pdf_DATA = dot.pdf -dot_SOURCES = dot.c -dot_LDFLAGS = -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library' -dot_LDADD = \ - $(top_builddir)/lib/plugin/libgvplugin_dot_layout.la \ - $(top_builddir)/lib/plugin/libgvplugin_neato_layout.la \ - $(top_builddir)/lib/plugin/libgvplugin_usershape_gd.la \ - $(top_builddir)/lib/gvc/libgvc.la +dot_SOURCES = dot.c dot_builtins.c +dot_LDADD = $(top_builddir)/lib/gvc/libgvc.la install-data-hook: (cd $(DESTDIR)$(man1dir); for i in $(linkedman); do rm -f $$i; $(LN_S) dot.1 $$i; done;) @@ -47,19 +43,7 @@ uninstall-hook: dot.pdf: $(top_srcdir)/cmd/dot/dot.1 groff -Tps -man $(top_srcdir)/cmd/dot/dot.1 | ps2pdf - - >$@ -dot_static_SOURCES = $(dot_SOURCES) -dot_static_DEPENDENCIES = \ - $(top_builddir)/lib/plugin/.libs/libgvplugin_dot_layout.a \ - $(top_builddir)/lib/plugin/.libs/libgvplugin_neato_layout.a \ - $(top_builddir)/lib/plugin/.libs/libgvplugin_usershape_gd.a \ - $(top_builddir)/lib/gvc/.libs/libgvc.a \ - $(top_builddir)/lib/pathplan/.libs/libpathplan.a \ - $(top_builddir)/lib/pack/.libs/libpack.a \ - $(top_builddir)/lib/graph/.libs/libgraph.a \ - $(top_builddir)/lib/cdt/.libs/libcdt.a \ - $(top_builddir)/lib/gd/.libs/libgvgd.a -dot_static_LDFLAGS = -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library' - +dot_static_SOURCES = dot.c dot_static_builtins.c dot_static_LDADD = \ $(top_builddir)/lib/plugin/.libs/libgvplugin_dot_layout.a \ $(top_builddir)/lib/plugin/.libs/libgvplugin_neato_layout.a \ diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am index 5707e9b78..430ba8de0 100644 --- a/cmd/tools/Makefile.am +++ b/cmd/tools/Makefile.am @@ -10,7 +10,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/neatogen \ -I$(top_srcdir)/lib/gvc \ -I$(top_srcdir)/lib/common \ - -I$(top_srcdir)/lib/ingraphs @EXPAT_INCLUDES@ + -I$(top_srcdir)/lib/ingraphs @EXPAT_INCLUDES@ -DBUILTINS pdfdir = $(pkgdatadir)/doc/pdf @@ -95,15 +95,11 @@ gc_LDADD = \ $(top_builddir)/lib/ingraphs/libingraphs.la \ $(top_builddir)/lib/graph/libgraph.la -gvpack_SOURCES = gvpack.c - -gvpack_LDFLAGS = -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library' +gvpack_SOURCES = gvpack.c gvpack_builtins.c gvpack_LDADD = \ - $(top_builddir)/lib/common/libcommon.la \ $(top_builddir)/lib/gvc/libgvc.la \ $(top_builddir)/lib/ingraphs/libingraphs.la \ - $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/plugin/libgvplugin_neato_layout.la dijkstra_SOURCES = dijkstra.c diff --git a/dot.demo/Makefile b/dot.demo/Makefile index 3ac3f3d98..e6e69eb46 100644 --- a/dot.demo/Makefile +++ b/dot.demo/Makefile @@ -1,28 +1,11 @@ -COMPILE=libtool --tag=CC --mode=compile ${CC} -c -LINK=libtool --tag=CC --mode=link ${CC} - CFLAGS=`pkg-config libgvc --cflags` -Wall -g -O2 -LDFLAGS=`pkg-config libgvc --libs` -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library' +LDFLAGS=`pkg-config libgvc --libs` all: dot demo simple -dot: dot.lo - ${LINK} ${LDFLAGS} -o $@ dot.lo - -dot.lo: dot.c - ${COMPILE} ${CFLAGS} -o $@ dot.c - -demo: demo.lo - ${LINK} ${LDFLAGS} -o $@ demo.lo - -demo.lo: demo.c - ${COMPILE} ${CFLAGS} -o $@ demo.c - -simple: simple.lo - ${LINK} ${LDFLAGS} -o $@ simple.lo - -simple.lo: simple.c - ${COMPILE} ${CFLAGS} -o $@ simple.c +dot: dot.o +demo: demo.o +simple: simple.o clean: - rm -rf *.o *.lo .libs dot demo simple *.png + rm -rf *.o dot demo simple *.png diff --git a/lib/common/args.c b/lib/common/args.c index 5d389e99a..d4b92760b 100644 --- a/lib/common/args.c +++ b/lib/common/args.c @@ -27,7 +27,10 @@ #include "config.h" #endif -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "tlayout.h" /* Default layout values, possibly set via command line; -1 indicates unset */ diff --git a/lib/common/arrows.c b/lib/common/arrows.c index dcf786eab..909d30ad7 100644 --- a/lib/common/arrows.c +++ b/lib/common/arrows.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #define EPSILON .0001 diff --git a/lib/common/colxlate.c b/lib/common/colxlate.c index 2be789568..ad0ea4776 100644 --- a/lib/common/colxlate.c +++ b/lib/common/colxlate.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "colortbl.h" #include diff --git a/lib/common/diagen.c b/lib/common/diagen.c index 5fc454490..f2cd74cc7 100644 --- a/lib/common/diagen.c +++ b/lib/common/diagen.c @@ -17,7 +17,10 @@ #include -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "utils.h" #ifdef HAVE_LIBZ diff --git a/lib/common/emit.c b/lib/common/emit.c index cf5976a41..6628d155f 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -19,8 +19,10 @@ */ #include - -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "agxbuf.h" static char *defaultlinestyle[3] = { "solid\0", "setlinewidth\0001\0", 0 }; diff --git a/lib/common/figgen.c b/lib/common/figgen.c index e01cdd66d..b846ab92c 100644 --- a/lib/common/figgen.c +++ b/lib/common/figgen.c @@ -14,8 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ - -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "utils.h" #include diff --git a/lib/common/fontmetrics.c b/lib/common/fontmetrics.c index 287bf044b..9a3da14cd 100644 --- a/lib/common/fontmetrics.c +++ b/lib/common/fontmetrics.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "utils.h" //#ifdef HAVE_CAIRO diff --git a/lib/common/gdgen.c b/lib/common/gdgen.c index d01186f14..a6cb5964a 100644 --- a/lib/common/gdgen.c +++ b/lib/common/gdgen.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "gd.h" #include "utils.h" #include diff --git a/lib/common/gdtextsize.c b/lib/common/gdtextsize.c index 9c3a1c664..2b976379d 100644 --- a/lib/common/gdtextsize.c +++ b/lib/common/gdtextsize.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "gd.h" /* sometimes fonts are stored under a different name */ diff --git a/lib/common/gdusershape.c b/lib/common/gdusershape.c index 6f6b5e098..015cc6821 100644 --- a/lib/common/gdusershape.c +++ b/lib/common/gdusershape.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "gd.h" static Dict_t *ImageDict; diff --git a/lib/common/globals.c b/lib/common/globals.c index b00b4e549..67167778d 100644 --- a/lib/common/globals.c +++ b/lib/common/globals.c @@ -16,4 +16,7 @@ #define EXTERN -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" diff --git a/lib/common/hpglgen.c b/lib/common/hpglgen.c index 354ef28ea..d69650fb0 100644 --- a/lib/common/hpglgen.c +++ b/lib/common/hpglgen.c @@ -19,7 +19,10 @@ * Use encoded form for polyline and polygon */ #include -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #define SOLID 0 #define DOTTED 1 diff --git a/lib/common/htmllex.c b/lib/common/htmllex.c index 594e13c94..eaeadf9a6 100644 --- a/lib/common/htmllex.c +++ b/lib/common/htmllex.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" #include "htmlparse.h" #include "htmllex.h" diff --git a/lib/common/htmlparse.y b/lib/common/htmlparse.y index fb681db3e..8b8bd4153 100644 --- a/lib/common/htmlparse.y +++ b/lib/common/htmlparse.y @@ -16,7 +16,10 @@ %{ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" #include "htmllex.h" diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 190c5b18b..cbe427e00 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -33,7 +33,10 @@ * e.g., CELLGRID=n, which sets CELLBORDER=0 and has the border drawing * handled correctly by the table. */ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" #include "agxbuf.h" #include "pointset.h" diff --git a/lib/common/htmltable.h b/lib/common/htmltable.h index c968be74a..3a8499b59 100644 --- a/lib/common/htmltable.h +++ b/lib/common/htmltable.h @@ -21,7 +21,10 @@ extern "C" { #ifndef TABLE_H #define TABLE_H -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #define FIXED_FLAG 1 #define HALIGN_RIGHT (1 << 1) diff --git a/lib/common/input.c b/lib/common/input.c index c4275eb5d..02360a628 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -15,8 +15,10 @@ **********************************************************/ #include - -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" char *Gvfilepath; diff --git a/lib/common/labels.c b/lib/common/labels.c index 90a84b5de..d77c03dea 100644 --- a/lib/common/labels.c +++ b/lib/common/labels.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" #include diff --git a/lib/common/mapgen.c b/lib/common/mapgen.c index 2dcb688e4..764d2962f 100644 --- a/lib/common/mapgen.c +++ b/lib/common/mapgen.c @@ -17,7 +17,10 @@ #define NEWANCHORS 0 -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" diff --git a/lib/common/mifgen.c b/lib/common/mifgen.c index 1cdef1e78..36f94975e 100644 --- a/lib/common/mifgen.c +++ b/lib/common/mifgen.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "utils.h" diff --git a/lib/common/mpgen.c b/lib/common/mpgen.c index f704ab778..0cdf04ef3 100644 --- a/lib/common/mpgen.c +++ b/lib/common/mpgen.c @@ -17,7 +17,10 @@ /* mpgen.c 1999-Feb-23 Jim Hefferon jim@joshua.smcvt.edu * Adapted from psgen.c. See 1st_read.mp. */ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #ifndef MSWIN32 #include #endif diff --git a/lib/common/ns.c b/lib/common/ns.c index e22cf0133..df2597fc3 100644 --- a/lib/common/ns.c +++ b/lib/common/ns.c @@ -19,7 +19,10 @@ * Network Simplex Algorithm for Ranking Nodes of a DAG */ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" static int init_graph(graph_t *); static void dfs_cutval(node_t * v, edge_t * par); diff --git a/lib/common/output.c b/lib/common/output.c index ee78207bf..3bbf883c0 100644 --- a/lib/common/output.c +++ b/lib/common/output.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "agxbuf.h" static int e_arrows; /* graph has edges with end arrows */ diff --git a/lib/common/picgen.c b/lib/common/picgen.c index 18216c822..6f1490785 100644 --- a/lib/common/picgen.c +++ b/lib/common/picgen.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #define PIC_COORDS_PER_LINE (16) /* to avoid stdio BUF overflow */ diff --git a/lib/common/postproc.c b/lib/common/postproc.c index 4154081de..4df06af9c 100644 --- a/lib/common/postproc.c +++ b/lib/common/postproc.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" static int Rankdir; diff --git a/lib/common/psgen.c b/lib/common/psgen.c index 583f69458..aedde1419 100644 --- a/lib/common/psgen.c +++ b/lib/common/psgen.c @@ -21,7 +21,10 @@ */ #define PDFMAX 3240 /* Maximum size of Distiller's PDF canvas */ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "ps.h" #include "utils.h" #include "agxbuf.h" diff --git a/lib/common/psusershape.c b/lib/common/psusershape.c index 7043a0240..9c32208d9 100644 --- a/lib/common/psusershape.c +++ b/lib/common/psusershape.c @@ -21,7 +21,10 @@ #include #include -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" static int N_EPSF_files; static Dict_t *EPSF_contents; diff --git a/lib/common/routespl.c b/lib/common/routespl.c index ac6c5ed6c..701e2c924 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "pathplan.h" #ifdef UNUSED diff --git a/lib/common/shapes.c b/lib/common/shapes.c index e2f68ccb2..3be317abd 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -17,7 +17,10 @@ /* for sincos */ #define _GNU_SOURCE 1 -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "htmltable.h" #include diff --git a/lib/common/splines.c b/lib/common/splines.c index f86098c63..bb6e613b9 100644 --- a/lib/common/splines.c +++ b/lib/common/splines.c @@ -19,7 +19,10 @@ * an edge, starting from a list of control points. */ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" static int debugleveln(edge_t* e, int i) { diff --git a/lib/common/svggen.c b/lib/common/svggen.c index 2a5c82841..c7ee9892c 100644 --- a/lib/common/svggen.c +++ b/lib/common/svggen.c @@ -44,7 +44,10 @@ Stephen North north@research.att.com */ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "utils.h" #ifdef HAVE_LIBZ #include "zlib.h" diff --git a/lib/common/svgusershape.c b/lib/common/svgusershape.c index b3a1d1dc4..cb05a5ea4 100644 --- a/lib/common/svgusershape.c +++ b/lib/common/svgusershape.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" point svg_image_size(graph_t * g, char *shapeimagefile) { diff --git a/lib/common/utils.c b/lib/common/utils.c index 6ed0a3e44..b339cf8d0 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "agxbuf.h" #include "utils.h" #include "htmltable.h" diff --git a/lib/common/vrmlgen.c b/lib/common/vrmlgen.c index f6ddec96b..493d849ce 100644 --- a/lib/common/vrmlgen.c +++ b/lib/common/vrmlgen.c @@ -15,7 +15,10 @@ **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "gd.h" #include "utils.h" #include "pathutil.h" diff --git a/lib/common/vtxgen.c b/lib/common/vtxgen.c index 734c2d12f..dba63a640 100644 --- a/lib/common/vtxgen.c +++ b/lib/common/vtxgen.c @@ -27,7 +27,10 @@ */ #define SUPPORT_WRITEDATE -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #ifdef SUPPORT_WRITEDATE #include #endif diff --git a/lib/common/xdgen.c b/lib/common/xdgen.c index 747dd3bbe..ddbc3c99b 100644 --- a/lib/common/xdgen.c +++ b/lib/common/xdgen.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #include "agxbuf.h" int xdemitState; diff --git a/lib/gvc/gvc.c b/lib/gvc/gvc.c index 26615b8b6..376aede18 100644 --- a/lib/gvc/gvc.c +++ b/lib/gvc/gvc.c @@ -14,7 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gvc.h" +#include "render.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" char *LibInfo[] = { "libgvc", /* Program */ diff --git a/lib/gvc/gvc.h b/lib/gvc/gvc.h index b2d246f26..2f40b7e4a 100644 --- a/lib/gvc/gvc.h +++ b/lib/gvc/gvc.h @@ -76,6 +76,11 @@ extern int gvFreeLayout(GVC_t *gvc, graph_t *g); /* Clean up graphviz context */ extern int gvFreeContext(GVC_t *gvc); +#ifndef BUILTINS +const lt_symlist_t lt_preloaded_symbols[] = {{0,0,},}; +#define BUILTINS +#endif + #ifdef __cplusplus } #endif diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index 33c99e902..dc67d8047 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -200,17 +200,9 @@ static void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplug } } -struct lt_symlist -{ - const char *name; - void* address; -}; - -extern const struct lt_symlist lt_preloaded_symbols[]; - static void gvconfig_plugin_install_builtins(GVC_t * gvc) { - const struct lt_symlist *s; + const lt_symlist_t *s; const char *name; s = lt_preloaded_symbols; diff --git a/lib/gvc/gvplugin.h b/lib/gvc/gvplugin.h index e75e181a5..70ecb7187 100644 --- a/lib/gvc/gvplugin.h +++ b/lib/gvc/gvplugin.h @@ -74,7 +74,13 @@ extern "C" { gvplugin_api_t *apis; } gvplugin_library_t; - extern gvplugin_library_t *builtins[]; + + typedef struct { + const char *name; + void* address; + } lt_symlist_t; + + extern const lt_symlist_t lt_preloaded_symbols[]; #ifdef __cplusplus } diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am index b8aa928b8..c114dbf98 100644 --- a/tclpkg/gv/Makefile.am +++ b/tclpkg/gv/Makefile.am @@ -10,12 +10,8 @@ AM_CPPFLAGS = \ LIBS = @LIBS@ -lc -BASESOURCES = gv.cpp builtins.c -BASELIBS = \ - $(top_builddir)/lib/plugin/libgvplugin_dot_layout.la \ - $(top_builddir)/lib/plugin/libgvplugin_neato_layout.la \ - $(top_builddir)/lib/plugin/libgvplugin_usershape_gd.la \ - $(top_builddir)/lib/gvc/libgvc.la +BASESOURCES = gv.cpp +BASELIBS = $(top_builddir)/lib/gvc/libgvc.la #CSHARP_hdr = gv.cs gvPINVOKE.cs SWIGTYPE_p_Agraph_t.cs SWIGTYPE_p_Agnode_t.cs SWIGTYPE_p_Agedge_t.cs diff --git a/tclpkg/gv/gv.cpp b/tclpkg/gv/gv.cpp index 516a0ff51..8773ef723 100644 --- a/tclpkg/gv/gv.cpp +++ b/tclpkg/gv/gv.cpp @@ -14,6 +14,7 @@ * AT&T Research, Florham Park NJ * **********************************************************/ +#define BUILTINS #include "gvc.h" GVC_t *gvc; -- 2.40.0