]> granicus.if.org Git - graphviz/commitdiff
disambiguate lib/ortho/*.c #includes
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 21 Aug 2020 03:25:18 +0000 (20:25 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Sep 2020 02:26:51 +0000 (19:26 -0700)
Related to #1242 and #1785.

lib/ortho/CMakeLists.txt
lib/ortho/Makefile.am
lib/ortho/fPQ.c
lib/ortho/gvortho.vcxproj
lib/ortho/maze.c
lib/ortho/ortho.c
lib/ortho/partition.c
lib/ortho/rawgraph.c
lib/ortho/sgraph.c
lib/ortho/trapezoid.c

index 8e9407d6f9a420cc76a98e8e2c275552f04cf93a..512c745ecce6fbb9557cd09cee171d049d24daba 100644 (file)
@@ -2,17 +2,6 @@ if (with_ortho)
 
 add_definitions(-D_BLD_gvc=1)
 
-include_directories(
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    ${GRAPHVIZ_LIB_DIR}/cdt
-    ${GRAPHVIZ_LIB_DIR}/cgraph
-    ${GRAPHVIZ_LIB_DIR}/common
-    ${GRAPHVIZ_LIB_DIR}/gvc
-    ${GRAPHVIZ_LIB_DIR}/neatogen
-    ${GRAPHVIZ_LIB_DIR}/pack
-    ${GRAPHVIZ_LIB_DIR}/pathplan
-)
-
 add_library(ortho STATIC
     # Header files
     fPQ.h
@@ -34,4 +23,16 @@ add_library(ortho STATIC
     trapezoid.c
 )
 
-endif (with_ortho)
\ No newline at end of file
+target_include_directories(ortho PRIVATE
+    ${GRAPHVIZ_LIB_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}
+    ${GRAPHVIZ_LIB_DIR}/cdt
+    ${GRAPHVIZ_LIB_DIR}/cgraph
+    ${GRAPHVIZ_LIB_DIR}/common
+    ${GRAPHVIZ_LIB_DIR}/gvc
+    ${GRAPHVIZ_LIB_DIR}/neatogen
+    ${GRAPHVIZ_LIB_DIR}/pack
+    ${GRAPHVIZ_LIB_DIR}/pathplan
+)
+
+endif (with_ortho)
index f5b5883d99b70ba6d0a00cb004b70daf473fe80d..9bd832cac7c5174993747077659909dcdab5d887 100644 (file)
@@ -2,6 +2,7 @@
 ## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = \
+       -I$(top_srcdir)/lib \
         -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/neatogen \
index 41d873c707e0a050acc9072cacdd4fdfdd40e391..702fec68fe5d55c23a065521e25e8c760bbe66c3 100644 (file)
 /* Priority Queue Code for shortest path in graph */
 
 #include "config.h"
-#include <memory.h>
+#include <common/memory.h>
 #include <assert.h>
 
-#include "fPQ.h"
+#include <ortho/fPQ.h>
 
 static snode**  pq;
 static int     PQcnt;
index ab5c5ae5988c068e7a15b868dda7ae69bf94f786..debb56b52ac9ee3b79d0f45056fa12396d0ae591 100644 (file)
@@ -51,7 +51,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_DEBUG;_LIB;WIN32_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -66,7 +66,7 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;_LIB;WIN32_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PrecompiledHeader />
       <WarningLevel>Level4</WarningLevel>
index e4a304883620453c6371ed5d255c8e138b929d84..e343f3f6e87977cf0cba046a8638975a8385f427 100644 (file)
 #define DEBUG
 
 #include <stddef.h>
-#include <maze.h>
-#include <partition.h>
-#include <memory.h>
-#include <arith.h>
-/* #include <values.h> */
+#include <ortho/maze.h>
+#include <ortho/partition.h>
+#include <common/memory.h>
+#include <common/arith.h>
 
 #define MARGIN 36;
 
index 6ee462e69d051fa099a3aa8061db0923a49d80f5..39fc9edbf777bc8dfee9d3af94045adfeb5e537c 100644 (file)
 #define DEBUG
 #include <stddef.h>
 #include <setjmp.h>
-#include <maze.h>
-#include "fPQ.h"
-#include "memory.h"
-#include "geomprocs.h"
-#include "globals.h"
-#include "render.h"
-#include "pointset.h"
+#include <ortho/maze.h>
+#include <ortho/fPQ.h>
+#include <common/memory.h>
+#include <common/geomprocs.h>
+#include <common/globals.h>
+#include <common/render.h>
+#include <common/pointset.h>
 typedef struct {
     int d;
     Agedge_t* e;
@@ -513,7 +513,7 @@ addNodeEdges (sgraph* sg, cell* cp, snode* np)
 
 #ifdef DEBUG
 
-#include <intset.h>
+#include <common/intset.h>
 static char* bendToStr (bend b)
 {
   char* s = NULL;
@@ -1371,8 +1371,7 @@ orthofinish:
 }
 
 #ifdef DEBUG
-#include <arith.h>
-/* #include <values.h> */
+#include <common/arith.h>
 #define TRANS 10
 
 static char* prolog2 =
index dfbb423f07625a07182ffd1445271aadb3696fc0..2a9c545525cc5b7ea7d990ba976d9817b5062a14 100644 (file)
@@ -13,9 +13,9 @@
 
 #include "config.h"
 
-#include <partition.h>
-#include <trap.h>
-#include <memory.h>
+#include <ortho/partition.h>
+#include <ortho/trap.h>
+#include <common/memory.h>
 #include <math.h>
 #include <stdlib.h>
 
index ba3f7bc5cf86db604d6bf5a12d4e1ebf0d748899..d8e7b7b210e86809ec5bdc7e1761a6e5ee921304 100644 (file)
@@ -15,9 +15,9 @@
 
 #include "config.h"
 
-#include "rawgraph.h"
-#include "memory.h"
-#include "intset.h"
+#include <ortho/rawgraph.h>
+#include <common/memory.h>
+#include <common/intset.h>
 
 #define UNSCANNED 0
 #define SCANNING  1
index 490b94910b0d87403d7b939977a949b90ba0b0da..152efa5146ee30e4b6b443df14e32fd2e0c64550 100644 (file)
@@ -15,9 +15,9 @@
 #include "config.h"
 
 #include <limits.h>
-#include "memory.h"
-#include "sgraph.h"
-#include "fPQ.h"
+#include <common/memory.h>
+#include <ortho/sgraph.h>
+#include <ortho/fPQ.h>
 
 #if 0
 /* Max. number of maze segments around a node */
@@ -179,7 +179,7 @@ freeSGraph (sgraph* g)
     free (g);
 }
 
-#include "fPQ.h"
+#include <ortho/fPQ.h>
 
 /* shortest path:
  * Constructs the path of least weight between from and to.
index 55ad3c62f2b2b7e4455a5739fda613a82693ed61..98bf455db57b88d6c753e23a99b4dd06d558d259 100644 (file)
 #define __USE_ISOC99
 #endif
 #include <math.h>
-#include <geom.h>
-#include <logic.h>
-#include <memory.h>
-#include <trap.h>
+#include <common/geom.h>
+#include <common/logic.h>
+#include <common/memory.h>
+#include <ortho/trap.h>
 
 /* Node types */