]> granicus.if.org Git - graphviz/commitdiff
disambiguate lib/common/*.c #includes
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Aug 2020 19:42:14 +0000 (12:42 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Sep 2020 02:26:50 +0000 (19:26 -0700)
Related to #1242 and #1785.

35 files changed:
lib/common/CMakeLists.txt
lib/common/Makefile.am
lib/common/args.c
lib/common/arrows.c
lib/common/colxlate.c
lib/common/diagen.c
lib/common/ellipse.c
lib/common/emit.c
lib/common/geom.c
lib/common/globals.c
lib/common/hpglgen.c
lib/common/htmllex.c
lib/common/htmlparse.y
lib/common/htmltable.c
lib/common/input.c
lib/common/intset.c
lib/common/labels.c
lib/common/memory.c
lib/common/mifgen.c
lib/common/mpgen.c
lib/common/ns.c
lib/common/output.c
lib/common/picgen.c
lib/common/pointset.c
lib/common/postproc.c
lib/common/psusershape.c
lib/common/routespl.c
lib/common/shapes.c
lib/common/splines.c
lib/common/taper.c
lib/common/textspan.c
lib/common/timing.c
lib/common/utils.c
lib/common/vtxgen.c
lib/gvc.vcxproj

index fa9b302d2640fe76af2f44ff5c68ff3f7fbab6b3..5fee446c0f2432535b5c491be7666e97e421b32b 100644 (file)
@@ -15,24 +15,6 @@ add_custom_command(
 
 add_definitions(-DGVC_EXPORTS -D_BLD_gvc=1)
 
-include_directories(
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    ${CMAKE_CURRENT_BINARY_DIR}
-    ${TOP_SOURCE_DIR}
-    ${GRAPHVIZ_LIB_DIR}/cdt
-    ${GRAPHVIZ_LIB_DIR}/cgraph
-    ${GRAPHVIZ_LIB_DIR}/gvc
-    ${GRAPHVIZ_LIB_DIR}/label
-    ${GRAPHVIZ_LIB_DIR}/pack
-    ${GRAPHVIZ_LIB_DIR}/pathplan
-    ${GRAPHVIZ_LIB_DIR}/fdpgen
-    ${GRAPHVIZ_LIB_DIR}/xdot
-)
-
-if (WIN32)
-    include_directories(${WINDOWS_DEPENDENCY_DIR}/include)
-endif()
-
 # Generate colortbl.h from sources
 add_custom_command(
     OUTPUT svgcolor_lib
@@ -135,6 +117,24 @@ add_library(common STATIC
     ${BISON_HTMLparse_OUTPUTS}
 )
 
+target_include_directories(common PRIVATE
+    ${GRAPHVIZ_LIB_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}
+    ${CMAKE_CURRENT_BINARY_DIR}
+    ${GRAPHVIZ_LIB_DIR}/cdt
+    ${GRAPHVIZ_LIB_DIR}/cgraph
+    ${GRAPHVIZ_LIB_DIR}/gvc
+    ${GRAPHVIZ_LIB_DIR}/label
+    ${GRAPHVIZ_LIB_DIR}/pack
+    ${GRAPHVIZ_LIB_DIR}/pathplan
+    ${GRAPHVIZ_LIB_DIR}/fdpgen
+    ${GRAPHVIZ_LIB_DIR}/xdot
+)
+
+if (WIN32)
+    target_include_directories(common PRIVATE ${WINDOWS_DEPENDENCY_DIR}/include)
+endif()
+
 # From https://gitlab.com/graphviz/graphviz/-/issues/1613 @mdwies 20093010
 if(APPLE)
     target_compile_options(common PRIVATE "-fno-common")
index fdc8f42c65059a99c4b819799697490b19148785..2e2049c9a4c81bbb36e1c61e68b25283cf5e9508 100644 (file)
@@ -2,6 +2,7 @@
 ## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = \
+       -I$(top_srcdir)/lib \
         -I$(top_srcdir)/libltdl \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/pack \
index 902656f9cbc368b067e61866a505a718d41fab2e..716bd5115ed953aaeefddbaa2d1d94d244cccfd9 100644 (file)
  */
 
 #include <ctype.h>
-#include "render.h"
-#include "tlayout.h"
-#include "gvc.h"
-#include "fdp.h"
+#include <common/render.h>
+#include <fdpgen/tlayout.h>
+#include <gvc/gvc.h>
+#include <fdpgen/fdp.h>
 
 /* neato_extra_args:
  * Handle special neato arguments.
index 8e59496ec361b2ecdbef96f0849311d7fbe1476a..1bc16c23176feada6b595d483804786f50f69ff6 100644 (file)
@@ -12,7 +12,7 @@
  *************************************************************************/
 
 
-#include "render.h"
+#include <common/render.h>
 
 #define EPSILON .0001
 
index a773677b4b868b5aeb460ac18c6d32f2e01a5f56..74e7169a193afcd4aba7ec84791c485cf507950e 100644 (file)
 #include <string.h>
 #include <ctype.h>
 
-#include "arith.h"
-#include "color.h"
-#include "colorprocs.h"
+#include <common/arith.h>
+#include <common/color.h>
+#include <common/colorprocs.h>
 #include "colortbl.h"
-#include "memory.h"
-#include "strcasecmp.h"
+#include <common/memory.h>
+#include <cgraph/strcasecmp.h>
 
 static char* colorscheme;
 
index 15d563b4c09fd333381942caebecbd9b2d12aec9..f7da76a952e8a0d69f36f99cde70afc5d27e1723 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "config.h"
 
-#include "render.h"
+#include <common/render.h>
 
 #include <stdarg.h>
 #ifdef HAVE_UNISTD_H
index 538e7ff94c7f7694aa14adea6c058bd00942e7a8..4362990ce1c26f0b6f204b3f884ff4dcb1d6b18e 100644 (file)
@@ -77,8 +77,8 @@ typedef struct Ppoly_t {
 
 typedef Ppoly_t Ppolyline_t;
 #else
-#include "render.h"
-#include "pathplan.h"
+#include <common/render.h>
+#include <pathplan/pathplan.h>
 #endif
 
 #define TWOPI (2*M_PI)
index 29d9a19be0756dc7816f4f9a867667ff320cbc8c..8ae88d51e181ccc2813dee9c2a052138c4346682 100644 (file)
 #include <string.h>
 #include <ctype.h>
 #include <locale.h>
-#include "render.h"
-#include "agxbuf.h"
-#include "htmltable.h"
-#include "gvc.h"
-#include "cdt.h"
-#include "xdot.h"
+#include <common/render.h>
+#include <cgraph/agxbuf.h>
+#include <common/htmltable.h>
+#include <gvc/gvc.h>
+#include <cdt/cdt.h>
+#include <xdot/xdot.h>
 
 #ifdef _WIN32
 #define strtok_r strtok_s
index 46f6dfccabb09df627bd86c9e18c32154385d2e5..40dccd4591ae08e0b022584d8f254e035523b0b5 100644 (file)
@@ -16,8 +16,8 @@
 
 #include "config.h"
 
-#include "geom.h"
-#include "geomprocs.h"
+#include <common/geom.h>
+#include <common/geomprocs.h>
 #ifdef _WIN32
 #define inline 
 #endif
index 47067fc458eb982d1e2367e30a24ebe231b1f721..ccfbae0d089d5e5a51b5e08017c042ad783c3765 100644 (file)
@@ -14,9 +14,9 @@
 #include "config.h"
 
 #define EXTERN
-#include "types.h"
-#include "globals.h"
-#include "fdp.h"
+#include <common/types.h>
+#include <common/globals.h>
+#include <fdpgen/fdp.h>
 
 /* Default layout values, possibly set via command line; -1 indicates unset */
 static fdpParms_t fdpParms = {
index da9667850136d27c317d0952c6f2c6701850e08a..746220e677228fe00c05a0c7a9732c25fa2c2f16 100644 (file)
@@ -16,7 +16,7 @@
  *  Use encoded form for polyline and polygon
  */
 #include <ctype.h>
-#include "render.h"
+#include <common/render.h>
 
 #define SOLID  0
 #define DOTTED 1
index 2ad4c558ae819f91da7e012ed9e68f02821f74b2..a4c865913994155d0d597c88549a8eeba691c0d2 100644 (file)
  *************************************************************************/
 
 
-#include "render.h"
-#include "htmltable.h"
+#include <common/render.h>
+#include <common/htmltable.h>
 #include "htmlparse.h"
-#include "htmllex.h"
-#include "cdt.h"
+#include <common/htmllex.h>
+#include <cdt/cdt.h>
 #include <ctype.h>
-#include "strcasecmp.h"
+#include <cgraph/strcasecmp.h>
 
 #ifdef HAVE_EXPAT
 #include <expat.h>
index ef11e382d9f9d7b4fb64911e017f2f706a932c2e..6e92deeb7e053af7d2a7469a976a9290d234f701 100644 (file)
@@ -13,9 +13,9 @@
 
 %{
 
-#include "render.h"
-#include "htmltable.h"
-#include "htmllex.h"
+#include <common/render.h>
+#include <common/htmltable.h>
+#include <common/htmllex.h>
 
 extern int yyparse(void);
 
index 6775abb2a1def98a5309c05013c31c8bd2777a8b..39750dac99ca7e093b07590f6dc87694114977c5 100644 (file)
  */
 
 #include <assert.h>
-#include "render.h"
-#include "htmltable.h"
-#include "agxbuf.h"
-#include "pointset.h"
-#include "intset.h"
-#include "cdt.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <common/htmltable.h>
+#include <cgraph/agxbuf.h>
+#include <common/pointset.h>
+#include <common/intset.h>
+#include <cdt/cdt.h>
+#include <cgraph/strcasecmp.h>
 
 #define DEFAULT_BORDER    1
 #define DEFAULT_CELLPADDING  2
index a2eb4e1f654a9201ab79e82c25af7180bf462d82..6b91cb58dd3d2fa68999d202a46886beeeb5f381 100644 (file)
  *************************************************************************/
 
 #include <ctype.h>
-#include "render.h"
-#include "htmltable.h"
-#include "gvc.h"
-#include "xdot.h"
-#include "agxbuf.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <common/htmltable.h>
+#include <gvc/gvc.h>
+#include <xdot/xdot.h>
+#include <cgraph/agxbuf.h>
+#include <cgraph/strcasecmp.h>
 
 static char *usageFmt =
     "Usage: %s [-Vv?] [-(GNE)name=val] [-(KTlso)<val>] <dot files>\n";
index edd3e3fbbf38da0c38bb36b09f81ce8a7af1c47b..138e0272d4d2aa524da19dd7438bc467d6c23ff9 100644 (file)
@@ -14,8 +14,8 @@
 #include "config.h"
 
 #include <stddef.h>
-#include <intset.h>
-#include <memory.h>
+#include <common/intset.h>
+#include <common/memory.h>
 
 static void*
 mkIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc)
index 9be55d809ae3fc7ff8661aae1a94e6e7f4b1e584..e2d666ea3a354ce3dd08995f271b3c24b2d9926e 100644 (file)
@@ -11,9 +11,9 @@
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include "agxbuf.h"
-#include "render.h"
-#include "htmltable.h"
+#include <cgraph/agxbuf.h>
+#include <common/render.h>
+#include <common/htmltable.h>
 #include <limits.h>
 
 static char *strdup_and_subst_obj0 (char *str, void *obj, int escBackslash);
index 53bb083af429b35c2d1e2c02ff64688fd2af0798..1c31af2c8a64f2e6713e3a2fd8e8c15e39922b51 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "memory.h"
+#include <common/memory.h>
 
 void *zmalloc(size_t nbytes)
 {
index de017118477735df0426d7bf02c01f6d9f500db9..c82c4bd3b26402030edb428f0777f50e1853763d 100644 (file)
@@ -12,8 +12,8 @@
  *************************************************************************/
 
 
-#include "render.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <cgraph/strcasecmp.h>
 
 #define        NONE    0
 #define        NODE    1
index cf8d26a5709164bfffef9ef59617786e401c98e8..189fd45c3cbf66de1468d50411e2cb4c974a1d9c 100644 (file)
@@ -14,7 +14,7 @@
 /* mpgen.c 1999-Feb-23 Jim Hefferon jim@joshua.smcvt.edu 
  *  Adapted from psgen.c.  See 1st_read.mp.
  */
-#include "render.h"
+#include <common/render.h>
 #ifndef _WIN32
 #include <unistd.h>
 #endif
index 4869272f73296a60c4b22917d2db0ae4d885fd8b..a0de10ab7786703241a9674717307c82fe9913fc 100644 (file)
@@ -16,7 +16,7 @@
  * Network Simplex Algorithm for Ranking Nodes of a DAG
  */
 
-#include "render.h"
+#include <common/render.h>
 #include <setjmp.h>
 
 static int init_graph(graph_t *);
index c4d32b83d54b1b81c7f9f766b8e2976fa40e3431..9d9e6769b2894cedd73ed6f0594fa46f293e2ee0 100644 (file)
@@ -11,8 +11,8 @@
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include "render.h"
-#include "agxbuf.h"
+#include <common/render.h>
+#include <cgraph/agxbuf.h>
 #include <stdarg.h>
 #include <string.h>
 
index c963fdc402cedd4e026c1c22da4d415c4e6e9c3e..e0dd695b92c31794d1a9c10330d38ccefad55c8c 100644 (file)
@@ -12,7 +12,7 @@
  *************************************************************************/
 
 
-#include "render.h"
+#include <common/render.h>
 
 #define PIC_COORDS_PER_LINE (16)       /* to avoid stdio BUF overflow */
 
index 257d189d25ccc862c2ac0268a742dfda705c1db2..949e3557d165062c7ad83e2e8dbecd8636241917 100644 (file)
@@ -12,8 +12,8 @@
  *************************************************************************/
 
 
-#include "render.h"
-#include "pointset.h"
+#include <common/render.h>
+#include <common/pointset.h>
 
 typedef struct {
     Dtlink_t link;
index 104ab458ed96f673e2b38ffa88a507ee833783e7..9aefb1c2fdddcd6f6aa35f8628074930e9a0692a 100644 (file)
@@ -12,8 +12,8 @@
  *************************************************************************/
 
 
-#include "render.h"
-#include "xlabels.h"
+#include <common/render.h>
+#include <label/xlabels.h>
 
 static int Rankdir;
 static boolean Flip;
index d33bca46ff96b3ff41bff2c2d74dc3974de6246c..6be0f84a3a40efa4e18465e090f228420c92944e 100644 (file)
@@ -17,9 +17,9 @@
 
 #include <sys/stat.h>
 
-#include "render.h"
-#include "gvio.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <gvc/gvio.h>
+#include <cgraph/strcasecmp.h>
 
 static int N_EPSF_files;
 static Dict_t *EPSF_contents;
index 44b733c319ffdc967498a130f7073ae216a245db..390059c6a922ed6bcefe91f3fa6fd5f6ce3d9c72 100644 (file)
@@ -13,9 +13,9 @@
 
 #include "config.h"
 
-#include "render.h"
+#include <common/render.h>
 #include <math.h>
-#include "pathplan.h"
+#include <pathplan/pathplan.h>
 #include <setjmp.h>
 #include <stdlib.h>
 
index 9dca9ba6e798d1f79b7f6ee7ebb591211f08808a..2a6a32b5877db81927d6648f509cd1d0cd4a3163 100644 (file)
@@ -11,8 +11,8 @@
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include "render.h"
-#include "htmltable.h"
+#include <common/render.h>
+#include <common/htmltable.h>
 #include <limits.h>
 
 #define RBCONST 12
index 66d7e5558d5c39c637ba14a68cdee5b6e2c7c99e..b232bd79c6adef0ca6cf1125c40ef9452386a7bd 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include <math.h>
-#include "render.h"
+#include <common/render.h>
 
 #ifdef DEBUG
 static int debugleveln(edge_t* e, int i)
index fe0ca4c8033601770d378ee34712a1a5a01d819a..6c634d3e3766e35a78bfb89708551cf69d9b6d4b 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <types.h>
-#include <memory.h>
-#include <logic.h>
-#include <agxbuf.h>
-#include <utils.h>
+#include <common/memory.h>
+#include <common/logic.h>
+#include <cgraph/agxbuf.h>
+#include <common/utils.h>
 
   /* sample point size; should be dynamic based on dpi or under user control */
 #define BEZIERSUBDIVISION 20
index 8e6b0fd57205a0fe1e22f317b44bd2671afd1263..8038eaa03b5e3d06d2399cbe2c6ef4df882fde5e 100644 (file)
@@ -14,9 +14,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "cdt.h"
-#include "render.h"
-#include "strcasecmp.h"
+#include <cdt/cdt.h>
+#include <common/render.h>
+#include <cgraph/strcasecmp.h>
 
 static double timesFontWidth[] = {
     0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500,    /*          */
index dc684d290d4ea5192cb1145dc7e15684226dc8fc..bc23c765408f0e1a4143fe29eb56fd0b4af5539e 100644 (file)
@@ -30,8 +30,8 @@ typedef struct tms mytime_t;
 #else
 
 #include       <time.h>
-#include "render.h"
-#include    "utils.h"
+#include <common/render.h>
+#include    <common/utils.h>
 
 typedef clock_t mytime_t;
 #define GET_TIME(S) S = clock()
index 35efa97332aaa3d4a4c3c1fafdc56bdf68dd07fc..e926295068045eacb2b06b289772d4a8f518a5f6 100644 (file)
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include "render.h"
-#include "agxbuf.h"
-#include "htmltable.h"
-#include "entities.h"
-#include "logic.h"
+#include <common/render.h>
+#include <cgraph/agxbuf.h>
+#include <common/htmltable.h>
+#include <common/entities.h>
+#include <common/logic.h>
 #include <math.h>
-#include "gvc.h"
-#include "strcasecmp.h"
+#include <gvc/gvc.h>
+#include <cgraph/strcasecmp.h>
 
 #ifdef _WIN32
 #define R_OK 4
index 09de98b55f8b07eb6174f460e9b1453a6557c495..d079ebb5e3e3b47f8d8636e78c6e8c5e74cd58f7 100644 (file)
  */
 #define SUPPORT_WRITEDATE
 
-#include "render.h"
+#include <common/render.h>
 #ifdef SUPPORT_WRITEDATE
 #include <time.h>
 #endif
-#include "strcasecmp.h"
+#include <cgraph/strcasecmp.h>
 
 
 /* VTX font modifiers */
index 64b88f898bd1c79d74f6990316b01bc253f9e4a2..1d51c05d8931c335823c050e69ca6ba364f8af09 100644 (file)
@@ -51,7 +51,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GVC_EXPORTS;WIN32_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -88,7 +88,7 @@ awk -f $(SolutionDir)awk\colortbl.awk color_lib &gt; common\colortbl.h</Command>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;GVC_EXPORTS;WIN32_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PrecompiledHeader />
       <WarningLevel>Level4</WarningLevel>