From: ellson Date: Wed, 20 Jul 2005 02:39:16 +0000 (+0000) Subject: - merge libdotneato into libgvc X-Git-Tag: LAST_LIBGRAPH~32^2~7406 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51401f001686d7f53ab465174fbe2570c232c551;p=graphviz - merge libdotneato into libgvc - make libcommon a convenience library and link into libgvc - convert demo to use libgvc --- diff --git a/lib/common/utils.c b/lib/common/utils.c index e906456bf..198732ca0 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -15,7 +15,7 @@ **********************************************************/ -#include "render.h" +#include "gvc.h" #include "agxbuf.h" #include "utils.h" #include "htmltable.h" diff --git a/lib/common/vtxgen.c b/lib/common/vtxgen.c index 4f5811bf4..734c2d12f 100644 --- a/lib/common/vtxgen.c +++ b/lib/common/vtxgen.c @@ -27,7 +27,7 @@ */ #define SUPPORT_WRITEDATE -#include "render.h" +#include "gvc.h" #ifdef SUPPORT_WRITEDATE #include #endif diff --git a/lib/dotgen/Makefile.am b/lib/dotgen/Makefile.am index 17652689e..b83bcaede 100644 --- a/lib/dotgen/Makefile.am +++ b/lib/dotgen/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ diff --git a/lib/dotgen/libdotgen.pc.in b/lib/dotgen/libdotgen.pc.in deleted file mode 100644 index bfe47f194..000000000 --- a/lib/dotgen/libdotgen.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@/@PACKAGE@ -includedir=@includedir@/@PACKAGE@ - -Name: libdotgen -Description: Directed layout library -Version: @VERSION@ -Libs: -L${libdir} -ldotgen -Cflags: -I${includedir} diff --git a/lib/fdpgen/Makefile.am b/lib/fdpgen/Makefile.am index 24acb68a5..8068153b6 100644 --- a/lib/fdpgen/Makefile.am +++ b/lib/fdpgen/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ diff --git a/lib/fdpgen/libfdpgen.pc.in b/lib/fdpgen/libfdpgen.pc.in deleted file mode 100644 index 947026c53..000000000 --- a/lib/fdpgen/libfdpgen.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@/@PACKAGE@ -includedir=@includedir@/@PACKAGE@ - -Name: libfdpgen -Description: Force Directed Placement layout library -Version: @VERSION@ -Libs: -L${libdir} -lfdpgen -Cflags: -I${includedir} diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index 01be4fe28..206f062a5 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in +pkgconfigdir = $(libdir)/pkgconfig + AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ @@ -10,12 +12,30 @@ AM_CPPFLAGS = \ LIBS = $(LIBLTDL) $(SOCKET_LIBS) -pkginclude_HEADERS = gvc.h gvcint.h gvplugin.h \ - gvplugin_render.h gvplugin_layout.h gvplugin_textlayout.h \ - gvplugin_device.h gvplugin_usershape.h +pkginclude_HEADERS = gvc.h gvcint.h gvplugin.h gvcproc.h gvplugin_render.h \ + gvplugin_layout.h gvplugin_textlayout.h gvplugin_device.h \ + gvplugin_usershape.h pkglib_LTLIBRARIES = libgvc.la +pkgconfig_DATA = libgvc.pc libgvc_la_SOURCES = gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \ - gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c gvusershape.c + gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c gvusershape.c \ + gvc.c + +if DISABLE_LTDL +libgvc_la_LIBADD = \ + $(top_builddir)/lib/common/libcommon.la \ + $(top_builddir)/lib/graph/libgraph.la \ + $(top_builddir)/lib/pathplan/libpathplan.la \ + $(top_builddir)/plugin/libplugins.la \ + @GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ +else +libgvc_la_LIBADD = \ + $(top_builddir)/lib/common/libcommon.la \ + $(top_builddir)/lib/graph/libgraph.la \ + $(top_builddir)/lib/pathplan/libpathplan.la \ + @GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ +endif + EXTRA_DIST = Makefile.old diff --git a/lib/gvc/gvc.c b/lib/gvc/gvc.c new file mode 100644 index 000000000..9c4a38218 --- /dev/null +++ b/lib/gvc/gvc.c @@ -0,0 +1,108 @@ +/* $Id$ $Revision$ */ +/* vim:set shiftwidth=4 ts=8: */ + +/********************************************************** +* This software is part of the graphviz package * +* http://www.graphviz.org/ * +* * +* Copyright (c) 1994-2004 AT&T Corp. * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Corp. * +* * +* Information and Software Systems Research * +* AT&T Research, Florham Park NJ * +**********************************************************/ + +#include "gvc.h" + +char *Info[] = { + "libgvc", /* Program */ + VERSION, /* Version */ + BUILDDATE /* Build Date */ +}; + +GVC_t *gvContext(void) +{ + GVC_t *gvc; + + aginit(); + agnodeattr(NULL, "label", NODENAME_ESC); + gvc = gvNEWcontext(Info, username()); + gvconfig(gvc); /* configure for available plugins and codegens */ + return gvc; +} + +int gvLayout(GVC_t *gvc, graph_t *g, char *engine) +{ + char buf[256]; + Agsym_t *a; + int rc; + + g = g->root; + if (GD_drawing(g)) { /* only cleanup once between layouts */ + gvlayout_cleanup(gvc, g); + GD_drawing(g) = NULL; + } + rc = gvlayout_select(gvc, engine); + if (rc == NO_SUPPORT) { + fprintf(stderr, "Layout type: \"%s\" not recognized. Use one of:%s\n", + engine, gvplugin_list(gvc, API_layout, engine)); + return -1; + } + + gvlayout_layout(gvc, g); + +/* set bb attribute for basic layout. + * doesn't yet include margins, scaling or page sizes because + * those depend on the renderer being used. */ + if (GD_drawing(g)->landscape) + sprintf(buf, "%d %d %d %d", + ROUND(GD_bb(g).LL.y), ROUND(GD_bb(g).LL.x), + ROUND(GD_bb(g).UR.y), ROUND(GD_bb(g).UR.x)); + else + sprintf(buf, "%d %d %d %d", + ROUND(GD_bb(g).LL.x), ROUND(GD_bb(g).LL.y), + ROUND(GD_bb(g).UR.x), ROUND(GD_bb(g).UR.y)); + if (!(a = agfindattr(g, "bb"))) { + a = agraphattr(g, "bb", ""); + } + agxset(g, a->index, buf); + + return 0; +} + +int gvRender(GVC_t *gvc, graph_t *g, char *format, FILE *out) +{ + int rc; + GVJ_t *job; + + g = g->root; + + /* create a job for the required format */ + rc = gvrender_output_langname_job(gvc, format); + if (rc == NO_SUPPORT) { + fprintf(stderr, "Renderer type: \"%s\" not recognized. Use one of:%s\n", + format, gvplugin_list(gvc, API_render, format)); + return -1; + } + + job = gvc->job; + job->output_lang = gvrender_select(job, job->output_langname); + if (!GD_drawing(g) && job->output_lang != CANONICAL_DOT) { + fprintf(stderr, "Layout was not done\n"); + return -1; + } + job->output_file = out; + + emit_jobs(gvc, g); + gvrender_delete_jobs(gvc); + + return 0; +} + + +void gvCleanup(GVC_t *gvc) +{ + gvFREEcontext(gvc); +} diff --git a/lib/gvc/gvc.h b/lib/gvc/gvc.h index 9a703bfba..f06e5ea39 100644 --- a/lib/gvc/gvc.h +++ b/lib/gvc/gvc.h @@ -2,133 +2,36 @@ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** -* This software is part of the graphviz package * -* http://www.graphviz.org/ * -* * -* Copyright (c) 1994-2004 AT&T Corp. * -* and is licensed under the * -* Common Public License, Version 1.0 * -* by AT&T Corp. * -* * -* Information and Software Systems Research * -* AT&T Research, Florham Park NJ * -**********************************************************/ - -/* This is the public header for the callers of libgvc */ - -#ifndef GVC_H -#define GVC_H - + * * This software is part of the graphviz package * + * * http://www.graphviz.org/ * + * * * + * * Copyright (c) 1994-2004 AT&T Corp. * + * * and is licensed under the * + * * Common Public License, Version 1.0 * + * * by AT&T Corp. * + * * * + * * Information and Software Systems Research * + * * AT&T Research, Florham Park NJ * + * **********************************************************/ + +#ifndef GVC_H +#define GVC_H + +#include "render.h" #include "gvplugin.h" #include "gvcint.h" +#include "gvcproc.h" #ifdef __cplusplus extern "C" { #endif -/* context */ - - extern GVC_t *gvNEWcontext(char **info, char *user); - extern void gvFREEcontext(GVC_t * gvc); - -/* configuration */ - - extern void gvconfig(GVC_t * gvc); - extern char *gvhostname(void); - -/* plugins */ - - extern boolean gvplugin_install(GVC_t * gvc, api_t api, - char *typestr, int quality, char *packagename, char *path, - gvplugin_installed_t * typeptr); - extern gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *type); - extern gvplugin_library_t *gvplugin_library_load(char *path); - extern const char *gvplugin_list(GVC_t * gvc, api_t api, char *str); - extern api_t gvplugin_api(char *str); - extern char * gvplugin_api_name(api_t api); - -/* job */ - - extern void gvrender_output_filename_job(GVC_t * gvc, char *name); - extern boolean gvrender_output_langname_job(GVC_t * gvc, char *name); - extern GVJ_t *gvrender_first_job(GVC_t * gvc); - extern GVJ_t *gvrender_next_job(GVC_t * gvc); - extern void gvrender_delete_jobs(GVC_t * gvc); - -/* emit */ - extern void gvemit_graph(GVC_t * gvc, graph_t * g); - -/* textlayout */ - - extern int gvtextlayout_select(GVC_t * gvc, char *textlayout); - extern double gvtextlayout_width(GVC_t *gvc, textline_t *textline, - char *fontname, double fontsize, char *fontpath); - -/* usershape */ - - extern int gvusershape_select(GVC_t * gvc, char *name); - extern void * gvusershape_getshape(GVC_t * gvc, char *usershape); - extern void gvusershape_freeshapes(GVC_t * gvc); - extern point gvusershape_size(GVC_t * gvc, char *usershape); - -/* device */ - - extern void gvdevice_initialize(GVC_t * gvc); - extern void gvdevice_finalize(GVC_t * gvc); - extern void gvdevice_begin_job(GVJ_t * job); - extern void gvdevice_end_job(GVJ_t * job); - -/* render */ - - extern void gvrender_begin_job(GVJ_t * job); - extern void gvrender_end_job(GVJ_t * job); - extern int gvrender_select(GVJ_t * job, char *lang); - extern int gvrender_features(GVJ_t * job); - extern void gvrender_begin_graph(GVJ_t * job, graph_t * g); - extern void gvrender_end_graph(GVJ_t * job); - extern void gvrender_begin_page(GVJ_t * job); - extern void gvrender_end_page(GVJ_t * job); - extern void gvrender_begin_layer(GVJ_t * job); - extern void gvrender_end_layer(GVJ_t * job); - extern void gvrender_begin_cluster(GVJ_t * job, graph_t * sg); - extern void gvrender_end_cluster(GVJ_t * job, graph_t *g); - extern void gvrender_begin_nodes(GVJ_t * job); - extern void gvrender_end_nodes(GVJ_t * job); - extern void gvrender_begin_edges(GVJ_t * job); - extern void gvrender_end_edges(GVJ_t * job); - extern void gvrender_begin_node(GVJ_t * job, node_t * n); - extern void gvrender_end_node(GVJ_t * job); - extern void gvrender_begin_edge(GVJ_t * job, edge_t * e); - extern void gvrender_end_edge(GVJ_t * job); - extern void gvrender_begin_context(GVJ_t * job); - extern void gvrender_end_context(GVJ_t * job); - extern void gvrender_begin_anchor(GVJ_t * job, char *href, - char *tooltip, char *target); - extern void gvrender_end_anchor(GVJ_t * job); - extern void gvrender_set_font(GVJ_t * job, char *fontname, - double fontsize); - extern void gvrender_textline(GVJ_t * job, pointf p, textline_t * str); - extern void gvrender_set_pencolor(GVJ_t * job, char *name); - extern void gvrender_set_fillcolor(GVJ_t * job, char *name); - extern void gvrender_set_style(GVJ_t * job, char **s); - extern void gvrender_ellipse(GVJ_t * job, point p, int rx, int ry, - int filled); - extern void gvrender_polygon(GVJ_t * job, point * A, int n, - int filled); - extern void gvrender_beziercurve(GVJ_t * job, pointf * AF, int n, - int arrow_at_start, int arrow_at_end, int); - extern void gvrender_polyline(GVJ_t * job, point * A, int n); - extern void gvrender_comment(GVJ_t * job, char *str); - extern void gvrender_user_shape(GVJ_t * job, char *name, point * A, - int sides, int filled); - -/* layout */ - - extern int gvlayout_select(GVC_t * gvc, char *str); - extern void gvlayout_layout(GVC_t * gvc, graph_t * g); - extern void gvlayout_cleanup(GVC_t * gvc, graph_t * g); +extern GVC_t *gvContext(void); +extern int gvLayout(GVC_t *gvc, graph_t *g, char *engine); +extern int gvRender(GVC_t *gvc, graph_t *g, char *format, FILE *out); +extern void gvCleanup(GVC_t *gvc); #ifdef __cplusplus } #endif -#endif /* GVC_H */ +#endif /* RENDER_H */ diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index 39fb4b57e..4983cc2a7 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -32,8 +32,10 @@ #include "types.h" #include "macros.h" #include "const.h" -#include "gvc.h" #include "graph.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #ifndef DISABLE_CODEGENS #ifdef QUARTZ_RENDER diff --git a/lib/gvc/gvcontext.c b/lib/gvc/gvcontext.c index 983293f8c..b4e22d6f4 100644 --- a/lib/gvc/gvcontext.c +++ b/lib/gvc/gvcontext.c @@ -32,7 +32,9 @@ #include "types.h" #include "macros.h" #include "graph.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" /* from common/utils.c */ extern void *zmalloc(size_t); diff --git a/lib/gvc/gvcproc.h b/lib/gvc/gvcproc.h new file mode 100644 index 000000000..f847fd16e --- /dev/null +++ b/lib/gvc/gvcproc.h @@ -0,0 +1,131 @@ +/* $Id$ $Revision$ */ +/* vim:set shiftwidth=4 ts=8: */ + +/********************************************************** +* This software is part of the graphviz package * +* http://www.graphviz.org/ * +* * +* Copyright (c) 1994-2004 AT&T Corp. * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Corp. * +* * +* Information and Software Systems Research * +* AT&T Research, Florham Park NJ * +**********************************************************/ + +/* This is the public header for the callers of libgvc */ + +#ifndef GVCPROC_H +#define GVCPROC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* context */ + + extern GVC_t *gvNEWcontext(char **info, char *user); + extern void gvFREEcontext(GVC_t * gvc); + +/* configuration */ + + extern void gvconfig(GVC_t * gvc); + extern char *gvhostname(void); + +/* plugins */ + + extern boolean gvplugin_install(GVC_t * gvc, api_t api, + char *typestr, int quality, char *packagename, char *path, + gvplugin_installed_t * typeptr); + extern gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *type); + extern gvplugin_library_t *gvplugin_library_load(char *path); + extern const char *gvplugin_list(GVC_t * gvc, api_t api, char *str); + extern api_t gvplugin_api(char *str); + extern char * gvplugin_api_name(api_t api); + +/* job */ + + extern void gvrender_output_filename_job(GVC_t * gvc, char *name); + extern boolean gvrender_output_langname_job(GVC_t * gvc, char *name); + extern GVJ_t *gvrender_first_job(GVC_t * gvc); + extern GVJ_t *gvrender_next_job(GVC_t * gvc); + extern void gvrender_delete_jobs(GVC_t * gvc); + +/* emit */ + extern void gvemit_graph(GVC_t * gvc, graph_t * g); + +/* textlayout */ + + extern int gvtextlayout_select(GVC_t * gvc, char *textlayout); + extern double gvtextlayout_width(GVC_t *gvc, textline_t *textline, + char *fontname, double fontsize, char *fontpath); + +/* usershape */ + + extern int gvusershape_select(GVC_t * gvc, char *name); + extern void * gvusershape_getshape(GVC_t * gvc, char *usershape); + extern void gvusershape_freeshapes(GVC_t * gvc); + extern point gvusershape_size(GVC_t * gvc, char *usershape); + +/* device */ + + extern void gvdevice_initialize(GVC_t * gvc); + extern void gvdevice_finalize(GVC_t * gvc); + extern void gvdevice_begin_job(GVJ_t * job); + extern void gvdevice_end_job(GVJ_t * job); + +/* render */ + + extern void gvrender_begin_job(GVJ_t * job); + extern void gvrender_end_job(GVJ_t * job); + extern int gvrender_select(GVJ_t * job, char *lang); + extern int gvrender_features(GVJ_t * job); + extern void gvrender_begin_graph(GVJ_t * job, graph_t * g); + extern void gvrender_end_graph(GVJ_t * job); + extern void gvrender_begin_page(GVJ_t * job); + extern void gvrender_end_page(GVJ_t * job); + extern void gvrender_begin_layer(GVJ_t * job); + extern void gvrender_end_layer(GVJ_t * job); + extern void gvrender_begin_cluster(GVJ_t * job, graph_t * sg); + extern void gvrender_end_cluster(GVJ_t * job, graph_t *g); + extern void gvrender_begin_nodes(GVJ_t * job); + extern void gvrender_end_nodes(GVJ_t * job); + extern void gvrender_begin_edges(GVJ_t * job); + extern void gvrender_end_edges(GVJ_t * job); + extern void gvrender_begin_node(GVJ_t * job, node_t * n); + extern void gvrender_end_node(GVJ_t * job); + extern void gvrender_begin_edge(GVJ_t * job, edge_t * e); + extern void gvrender_end_edge(GVJ_t * job); + extern void gvrender_begin_context(GVJ_t * job); + extern void gvrender_end_context(GVJ_t * job); + extern void gvrender_begin_anchor(GVJ_t * job, char *href, + char *tooltip, char *target); + extern void gvrender_end_anchor(GVJ_t * job); + extern void gvrender_set_font(GVJ_t * job, char *fontname, + double fontsize); + extern void gvrender_textline(GVJ_t * job, pointf p, textline_t * str); + extern void gvrender_set_pencolor(GVJ_t * job, char *name); + extern void gvrender_set_fillcolor(GVJ_t * job, char *name); + extern void gvrender_set_style(GVJ_t * job, char **s); + extern void gvrender_ellipse(GVJ_t * job, point p, int rx, int ry, + int filled); + extern void gvrender_polygon(GVJ_t * job, point * A, int n, + int filled); + extern void gvrender_beziercurve(GVJ_t * job, pointf * AF, int n, + int arrow_at_start, int arrow_at_end, int); + extern void gvrender_polyline(GVJ_t * job, point * A, int n); + extern void gvrender_comment(GVJ_t * job, char *str); + extern void gvrender_user_shape(GVJ_t * job, char *name, point * A, + int sides, int filled); + +/* layout */ + + extern int gvlayout_select(GVC_t * gvc, char *str); + extern void gvlayout_layout(GVC_t * gvc, graph_t * g); + extern void gvlayout_cleanup(GVC_t * gvc, graph_t * g); + +#ifdef __cplusplus +} +#endif +#endif /* GVCPROC_H */ diff --git a/lib/gvc/gvdevice.c b/lib/gvc/gvdevice.c index 6d7a60103..4f1dfb0fc 100644 --- a/lib/gvc/gvdevice.c +++ b/lib/gvc/gvdevice.c @@ -32,7 +32,9 @@ #include "macros.h" #include "gvplugin_device.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" int gvdevice_select(GVJ_t * job, char *str) { diff --git a/lib/gvc/gvevent.c b/lib/gvc/gvevent.c index 5113909dd..9dcd17afa 100644 --- a/lib/gvc/gvevent.c +++ b/lib/gvc/gvevent.c @@ -14,21 +14,10 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -/* -#include "const.h" -#include "types.h" -#include "macros.h" -*/ - #include "render.h" - -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #define PANFACTOR 10 #define ZOOMFACTOR 1.1 diff --git a/lib/gvc/gvjobs.c b/lib/gvc/gvjobs.c index c6d062f50..1be6f42e0 100644 --- a/lib/gvc/gvjobs.c +++ b/lib/gvc/gvjobs.c @@ -22,7 +22,9 @@ #include #include "types.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" /* from common/utils.c */ extern void *zmalloc(size_t); diff --git a/lib/gvc/gvlayout.c b/lib/gvc/gvlayout.c index e497d097b..f3a30d363 100644 --- a/lib/gvc/gvlayout.c +++ b/lib/gvc/gvlayout.c @@ -32,7 +32,9 @@ #include "cdt.h" #include "gvplugin_layout.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" extern void graph_init(graph_t *g, boolean use_rankdir); extern void graph_cleanup(graph_t *g); diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index a28e152f9..754b156c4 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -28,8 +28,10 @@ #include "types.h" #include "macros.h" -#include "gvc.h" #include "graph.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #ifndef DISABLE_LTDL static char *libdir = GVLIBDIR; diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index 6193c9bfc..2f3ee59d7 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -37,7 +37,9 @@ #include "cdt.h" #include "gvplugin_render.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" #ifndef DISABLE_CODEGENS extern codegen_t PS_CodeGen; diff --git a/lib/gvc/gvtextlayout.c b/lib/gvc/gvtextlayout.c index 6cf223d7e..0972a362d 100644 --- a/lib/gvc/gvtextlayout.c +++ b/lib/gvc/gvtextlayout.c @@ -29,7 +29,9 @@ #include "macros.h" #include "gvplugin_textlayout.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" int gvtextlayout_select(GVC_t * gvc, char *textlayout) { diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 33a4d675b..a967f4e9a 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -44,7 +44,9 @@ #include "graph.h" #include "gvplugin_usershape.h" -#include "gvc.h" +#include "gvplugin.h" +#include "gvcint.h" +#include "gvcproc.h" extern point gd_image_size(graph_t * g, char *shapeimagefile); extern point ps_image_size(graph_t * g, char *shapeimagefile); diff --git a/lib/gvc/libgvc.pc.in b/lib/gvc/libgvc.pc.in index ef65d8616..520042c40 100644 --- a/lib/gvc/libgvc.pc.in +++ b/lib/gvc/libgvc.pc.in @@ -2,9 +2,9 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@/@PACKAGE@ includedir=@includedir@/@PACKAGE@ - + Name: libgvc -Description: Graphviz context library for plugins +Description: The GraphVizContext library Version: @VERSION@ Libs: -L${libdir} -lgvc Cflags: -I${includedir} diff --git a/lib/neatogen/Makefile.am b/lib/neatogen/Makefile.am index 5ec36bb94..d27ae9d37 100644 --- a/lib/neatogen/Makefile.am +++ b/lib/neatogen/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ diff --git a/lib/neatogen/libneatogen.pc.in b/lib/neatogen/libneatogen.pc.in deleted file mode 100644 index 775ebdd4e..000000000 --- a/lib/neatogen/libneatogen.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@/@PACKAGE@ -includedir=@includedir@/@PACKAGE@ - -Name: libneatogen -Description: Undirected layout library -Version: @VERSION@ -Libs: -L${libdir} -lneatogen -Cflags: -I${includedir} diff --git a/lib/pack/Makefile.am b/lib/pack/Makefile.am index 925c27202..24ed9b1a9 100644 --- a/lib/pack/Makefile.am +++ b/lib/pack/Makefile.am @@ -1,7 +1,6 @@ ## Process this file with automake to produce Makefile.in pdfdir = $(pkgdatadir)/doc/pdf -pkgconfigdir = $(libdir)/pkgconfig AM_CPPFLAGS = -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ @@ -13,7 +12,6 @@ AM_CPPFLAGS = -I$(top_srcdir) \ pkginclude_HEADERS = pack.h pkglib_LTLIBRARIES = libpack.la -pkgconfig_DATA = libpack.pc man_MANS = pack.3 pdf_DATA = pack.pdf diff --git a/lib/pack/libpack.pc.in b/lib/pack/libpack.pc.in deleted file mode 100644 index b4d96c769..000000000 --- a/lib/pack/libpack.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@/@PACKAGE@ -includedir=@includedir@/@PACKAGE@ - -Name: libpack -Description: Graph layout packer library -Version: @VERSION@ -Libs: -L${libdir} -lcommon -lgvrender -lpack -lgraph -lcdt -Cflags: -I${includedir} diff --git a/lib/twopigen/Makefile.am b/lib/twopigen/Makefile.am index 35f284885..24a7492df 100644 --- a/lib/twopigen/Makefile.am +++ b/lib/twopigen/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -pkgconfigdir = $(libdir)/pkgconfig - AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ diff --git a/lib/twopigen/libtwopigen.pc.in b/lib/twopigen/libtwopigen.pc.in deleted file mode 100644 index 0b0d4235c..000000000 --- a/lib/twopigen/libtwopigen.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@/@PACKAGE@ -includedir=@includedir@/@PACKAGE@ - -Name: libtwopigen -Description: Circular layout library -Version: @VERSION@ -Libs: -L${libdir} -ltwopigen -Cflags: -I${includedir} diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am index 8dfb42ba8..f9dd1b266 100644 --- a/tclpkg/gv/Makefile.am +++ b/tclpkg/gv/Makefile.am @@ -10,20 +10,7 @@ AM_CPPFLAGS = \ LIBS = @LIBS@ -lc -if DISABLE_LTDL -BASELIBS = \ - $(top_builddir)/lib/graph/libgraph.la \ - $(top_builddir)/lib/common/libcommon.la \ - $(top_builddir)/lib/gvc/libgvc.la \ - $(top_builddir)/plugin/libplugins.la -else -BASELIBS = \ - $(top_builddir)/lib/graph/libgraph.la \ - $(top_builddir)/lib/common/libcommon.la \ - $(top_builddir)/lib/gvc/libgvc.la @LIBGEN_LIBS@ -endif - -noinst_HEADERS = gv.h +BASELIBS = $(top_builddir)/lib/gvc/libgvc.la pkglib_LTLIBRARIES = TESTS = diff --git a/tclpkg/gv/gv.cpp b/tclpkg/gv/gv.cpp index f190e1c9d..bf76b0df0 100644 --- a/tclpkg/gv/gv.cpp +++ b/tclpkg/gv/gv.cpp @@ -14,7 +14,7 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#include "gv.h" +#include "gvc.h" GVC_t *gvc; diff --git a/tclpkg/gv/gv.h b/tclpkg/gv/gv.h deleted file mode 100644 index d972ea1fd..000000000 --- a/tclpkg/gv/gv.h +++ /dev/null @@ -1,17 +0,0 @@ -/* $Id$ $Revision$ */ -/* vim:set shiftwidth=4 ts=8: */ - -/********************************************************** -* This software is part of the graphviz package * -* http://www.graphviz.org/ * -* * -* Copyright (c) 1994-2004 AT&T Corp. * -* and is licensed under the * -* Common Public License, Version 1.0 * -* by AT&T Corp. * -* * -* Information and Software Systems Research * -* AT&T Research, Florham Park NJ * -**********************************************************/ - -#include "render.h" diff --git a/tclpkg/gv/gv.i b/tclpkg/gv/gv.i index ccf7d78e0..cbb6d2129 100644 --- a/tclpkg/gv/gv.i +++ b/tclpkg/gv/gv.i @@ -16,7 +16,7 @@ %module gv %{ -#include "gv.h" +#include "gvc.h" %} /* new graph objects */ diff --git a/tclpkg/tcldot/Makefile.am b/tclpkg/tcldot/Makefile.am index 2cdc38c70..ac3bd5c4d 100644 --- a/tclpkg/tcldot/Makefile.am +++ b/tclpkg/tcldot/Makefile.am @@ -31,22 +31,10 @@ html_DATA = $(html) endif libtcldot_la_SOURCES = tcldot.c tkgen.c $(top_srcdir)/tclpkg/gdtclft/gdtclft.c -if DISABLE_LTDL libtcldot_la_LIBADD = \ $(top_builddir)/tclpkg/tclhandle/libtclhandle.la \ $(top_builddir)/tclpkg/tclstubs/libtclstubs.la \ - $(top_builddir)/lib/graph/libgraph.la \ - $(top_builddir)/lib/common/libcommon.la \ - $(top_builddir)/lib/gvc/libgvc.la \ - $(top_builddir)/plugin/libplugins.la -else -libtcldot_la_LIBADD = \ - $(top_builddir)/tclpkg/tclhandle/libtclhandle.la \ - $(top_builddir)/tclpkg/tclstubs/libtclstubs.la \ - $(top_builddir)/lib/graph/libgraph.la \ - $(top_builddir)/lib/common/libcommon.la \ - $(top_builddir)/lib/gvc/libgvc.la @LIBGEN_LIBS@ -endif + $(top_builddir)/lib/gvc/libgvc.la if WITH_TCL all-local: pkgIndex.tcl diff --git a/tclpkg/tcldot/tcldot.c b/tclpkg/tcldot/tcldot.c index bf5c8d6bd..568fcd280 100644 --- a/tclpkg/tcldot/tcldot.c +++ b/tclpkg/tcldot/tcldot.c @@ -15,10 +15,6 @@ **********************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - /* avoid compiler warnings with template changes in Tcl8.4 */ /* specifically just the change to Tcl_CmdProc */ #define USE_NON_CONST diff --git a/tclpkg/tcldot/tcldot.h b/tclpkg/tcldot/tcldot.h index 5572673de..34e5eef1b 100644 --- a/tclpkg/tcldot/tcldot.h +++ b/tclpkg/tcldot/tcldot.h @@ -18,9 +18,9 @@ extern "C" { #endif +#include "gvc.h" #include "tcl.h" #include "tclhandle.h" -#include "render.h" typedef struct tkgendata_s { Tcl_Interp *interp; diff --git a/tclpkg/tcldot/tkgen.c b/tclpkg/tcldot/tkgen.c index 24e236027..00c3836e2 100644 --- a/tclpkg/tcldot/tkgen.c +++ b/tclpkg/tcldot/tkgen.c @@ -19,10 +19,6 @@ * tkgen.c generate canvas commands to display a graph */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "tcldot.h" #ifdef DMALLOC