]> granicus.if.org Git - graphviz/commitdiff
Expose ageqedge in cgraph.dll.
authorChiel ten Brinke <ctenbrinke@gmail.com>
Tue, 3 Jan 2017 14:35:13 +0000 (15:35 +0100)
committerChiel ten Brinke <ctenbrinke@gmail.com>
Tue, 3 Jan 2017 14:35:13 +0000 (15:35 +0100)
Fix #1188.

lib/cgraph/cgraph.def
lib/cgraph/cgraph.h
lib/cgraph/edge.c

index a8ef3f34185c896863624a5b6fb74be9adb6bd50..d0e920cf82d7c6a162ee15ea62f50fc23084fe46 100644 (file)
@@ -50,6 +50,7 @@ agedgeseqcmpf
 agerr  
 agerrorf       
 agerrors       
+ageqedge       
 agfindnode_by_id       
 agfindnode_by_name     
 agflatten      
index bb3ddffaf458e0d2de012c2803bf77bcb71bc744..3141d7af4a07326111889804828066b886225958 100644 (file)
@@ -399,10 +399,12 @@ extern agusererrf agseterrf(agusererrf);
 #define AGMKIN(e)              (AGTYPE(e) == AGINEDGE?  (e): AGOUT2IN(e))
 #define AGTAIL(e)              (AGMKIN(e)->node)
 #define AGHEAD(e)              (AGMKOUT(e)->node)
+#define AGEQEDGE(e,f)          (AGMKOUT(e) == AGMKOUT(f))
+/* These macros are also exposed as functions, so they can be linked against. */
 #define agtail(e)              AGTAIL(e)
 #define aghead(e)              AGHEAD(e)
 #define agopp(e)               AGOPP(e)
-#define ageqedge(e,f)          (AGMKOUT(e) == AGMKOUT(f))
+#define ageqedge(e,f)          AGEQEDGE(e,f)
 
 #define TAILPORT_ID            "tailport"
 #define HEADPORT_ID            "headport"
index d8d5ab3d92a2f8997c9e0a3846567b3c1ce1c6d7..3e485a4ca30b34717e23a4548974c6d18bbec0e8 100644 (file)
@@ -493,7 +493,16 @@ Dtdisc_t Ag_subedge_id_disc = {
     NIL(Dtevent_f)
 };
 
-/* debug functions */
+/* expose macros as functions for ease of debugging
+and to expose them to foreign languages without C preprocessor. */
+#ifdef ageqedge
+#undef ageqedge
+#endif
+Agnode_t *ageqedge(Agedge_t * e, Agedge_t * f)
+{
+    return AGEQEDGE(e, f);
+}
+
 #ifdef agtail
 #undef agtail
 #endif