From: Matthew Fernandez Date: Mon, 17 Aug 2020 00:13:20 +0000 (-0700) Subject: disambiguate lib/gvc/*.c #includes X-Git-Tag: 2.46.0~20^2^2~90^2~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b39f244791a8f19f34e55216dabdd3e0538bda0c;p=graphviz disambiguate lib/gvc/*.c #includes Related to #1242 and #1785. --- diff --git a/lib/gvc/CMakeLists.txt b/lib/gvc/CMakeLists.txt index 7f71db9ab..156cceafd 100644 --- a/lib/gvc/CMakeLists.txt +++ b/lib/gvc/CMakeLists.txt @@ -1,17 +1,5 @@ add_definitions(-D_BLD_gvc=1 -DGVC_EXPORTS -DGVLIBDIR="${LIBRARY_INSTALL_DIR}/graphviz") -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${TOP_SOURCE_DIR} - ${GRAPHVIZ_LIB_DIR}/ast - ${GRAPHVIZ_LIB_DIR}/cdt - ${GRAPHVIZ_LIB_DIR}/cgraph - ${GRAPHVIZ_LIB_DIR}/common - ${GRAPHVIZ_LIB_DIR}/pathplan - ${LTDL_INCLUDE_DIRS} - ${RxSpencer_INCLUDE_DIRS} -) - add_library(gvc SHARED # Header files gvc.h @@ -48,6 +36,19 @@ add_library(gvc SHARED gvc.def ) +target_include_directories(gvc PRIVATE + ${GRAPHVIZ_LIB_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TOP_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/ast + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/pathplan + ${LTDL_INCLUDE_DIRS} + ${RxSpencer_INCLUDE_DIRS} +) + target_link_libraries(gvc cdt cgraph diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index f1de0c967..bf4541b16 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -7,6 +7,7 @@ pdfdir = $(pkgdatadir)/doc/pdf pkgconfigdir = $(libdir)/pkgconfig AM_CPPFLAGS = \ + -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/common \ -I$(top_srcdir)/lib/pathplan \ -I$(top_srcdir)/lib/cgraph \ diff --git a/lib/gvc/gvc.c b/lib/gvc/gvc.c index 4af9dda04..bc6607ca6 100644 --- a/lib/gvc/gvc.c +++ b/lib/gvc/gvc.c @@ -13,13 +13,13 @@ #include "config.h" -#include "gvc.h" -#include "const.h" -#include "gvcjob.h" -#include "gvcint.h" -#include "gvcproc.h" -#include "gvconfig.h" -#include "gvio.h" +#include +#include +#include +#include +#include +#include +#include #include GVC_t *gvContext(void) diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index d2e3325b7..78eecfa5b 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -13,7 +13,7 @@ #include "config.h" -#include "gvconfig.h" +#include #include #include @@ -49,14 +49,14 @@ static int glob (GVC_t * gvc, char*, int, int (*errfunc)(const char *, int), glo #include #endif -#include "memory.h" -#include "const.h" -#include "types.h" +#include +#include +#include -#include "gvplugin.h" -#include "gvcjob.h" -#include "gvcint.h" -#include "gvcproc.h" +#include +#include +#include +#include /* FIXME */ extern Dt_t * textfont_dict_open(GVC_t *gvc); diff --git a/lib/gvc/gvcontext.c b/lib/gvc/gvcontext.c index c29d8e2ef..cff05cdd6 100644 --- a/lib/gvc/gvcontext.c +++ b/lib/gvc/gvcontext.c @@ -24,12 +24,12 @@ #include #include "builddate.h" -#include "types.h" -#include "gvplugin.h" -#include "gvcjob.h" -#include "gvcint.h" -#include "gvcproc.h" -#include "gvc.h" +#include +#include +#include +#include +#include +#include /* from common/utils.c */ extern void *zmalloc(size_t); diff --git a/lib/gvc/gvdevice.c b/lib/gvc/gvdevice.c index c290e5cc2..0a9951186 100644 --- a/lib/gvc/gvdevice.c +++ b/lib/gvc/gvdevice.c @@ -46,14 +46,14 @@ static unsigned int dfallocated; static uint64_t crc; #endif /* HAVE_LIBZ */ -#include "const.h" -#include "memory.h" -#include "gvplugin_device.h" -#include "gvcjob.h" -#include "gvcint.h" -#include "gvcproc.h" -#include "logic.h" -#include "gvio.h" +#include +#include +#include +#include +#include +#include +#include +#include static const int PAGE_ALIGN = 4095; /* align to a 4K boundary (less one), typical for Linux, Mac OS X and Windows memory allocation */ diff --git a/lib/gvc/gvevent.c b/lib/gvc/gvevent.c index 1cb2dbc5b..f1a7ec62b 100644 --- a/lib/gvc/gvevent.c +++ b/lib/gvc/gvevent.c @@ -17,9 +17,9 @@ #include #include -#include "gvplugin_layout.h" -#include "gvcint.h" -#include "gvcproc.h" +#include +#include +#include extern char *strdup_and_subst_obj(char *str, void * n); extern void emit_graph(GVJ_t * job, graph_t * g); diff --git a/lib/gvc/gvjobs.c b/lib/gvc/gvjobs.c index ec722b002..f09b711f4 100644 --- a/lib/gvc/gvjobs.c +++ b/lib/gvc/gvjobs.c @@ -13,12 +13,12 @@ #include "config.h" -#include "memory.h" -#include "types.h" -#include "gvplugin.h" -#include "gvcjob.h" -#include "gvcint.h" -#include "gvcproc.h" +#include +#include +#include +#include +#include +#include static GVJ_t *output_filename_job; static GVJ_t *output_langname_job; diff --git a/lib/gvc/gvlayout.c b/lib/gvc/gvlayout.c index 07b4a6705..53baf446b 100644 --- a/lib/gvc/gvlayout.c +++ b/lib/gvc/gvlayout.c @@ -18,12 +18,12 @@ #include "config.h" -#include "const.h" -#include "gvplugin_layout.h" -#include "gvcint.h" -#include "cgraph.h" -#include "gvcproc.h" -#include "gvc.h" +#include +#include +#include +#include +#include +#include extern void graph_init(Agraph_t *g, boolean use_rankdir); extern void graph_cleanup(Agraph_t *g); diff --git a/lib/gvc/gvloadimage.c b/lib/gvc/gvloadimage.c index 1bb4e8316..ea119dde7 100644 --- a/lib/gvc/gvloadimage.c +++ b/lib/gvc/gvloadimage.c @@ -21,13 +21,13 @@ #include -#include "const.h" -#include "gvplugin_loadimage.h" -#include "gvcint.h" -#include "gvcproc.h" +#include +#include +#include +#include /* for agerr() */ -#include "cgraph.h" +#include static int gvloadimage_select(GVJ_t * job, char *str) { diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index 51b1f75a3..0fc60408f 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -26,17 +26,17 @@ #include #endif -#include -#include "memory.h" -#include "types.h" -#include "gvplugin.h" -#include "gvcjob.h" -#include "gvcint.h" -#include "gvcproc.h" -#include "gvio.h" - -#include "const.h" -#include "strcasecmp.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include #ifdef _WIN32 #define strdup(x) _strdup(x) diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index 8001cc0a2..9a47173c4 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -20,17 +20,17 @@ #include "config.h" #include -#include "memory.h" -#include "const.h" -#include "macros.h" -#include "colorprocs.h" -#include "gvplugin_render.h" -#include "cgraph.h" -#include "gvcint.h" -#include "geom.h" -#include "geomprocs.h" -#include "gvcproc.h" -#include "strcasecmp.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include extern int emit_once(char *str); extern shape_desc *find_user_shape(char *name); diff --git a/lib/gvc/gvtextlayout.c b/lib/gvc/gvtextlayout.c index 96a569987..4b46f2057 100644 --- a/lib/gvc/gvtextlayout.c +++ b/lib/gvc/gvtextlayout.c @@ -17,10 +17,10 @@ #include "config.h" -#include "const.h" -#include "gvplugin_textlayout.h" -#include "gvcint.h" -#include "gvcproc.h" +#include +#include +#include +#include int gvtextlayout_select(GVC_t * gvc) { diff --git a/lib/gvc/gvtool_tred.c b/lib/gvc/gvtool_tred.c index 763a79d9a..8931ba52d 100644 --- a/lib/gvc/gvtool_tred.c +++ b/lib/gvc/gvtool_tred.c @@ -24,8 +24,8 @@ #include "config.h" #include -#include "cgraph.h" -#include "gvc.h" +#include +#include typedef struct { Agrec_t h; diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index c793b4b2c..bf3267a99 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -29,14 +29,14 @@ #endif #include -#include "types.h" -#include "logic.h" -#include "memory.h" -#include "agxbuf.h" +#include +#include +#include +#include #define _BLD_gvc 1 -#include "utils.h" -#include "gvplugin_loadimage.h" +#include +#include extern char *Gvimagepath; extern char *HTTPServerEnVar;