summaryrefslogtreecommitdiffstats
path: root/main/graphviz/0001-clone-nameclash.patch
blob: 6222238d8d9ad1cad6060c080f2a3c37a9c33138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From cb8bbbd3a48fa1f41965617852d11e02eb20b1f0 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 26 Jul 2011 12:41:21 +0000
Subject: [PATCH] clone nameclash

---
 lib/gvpr/actions.c |    6 +++---
 lib/gvpr/actions.h |    2 +-
 lib/gvpr/compile.c |    2 +-
 lib/gvpr/gvpr.c    |    4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/gvpr/actions.c b/lib/gvpr/actions.c
index 05bfcd1..b3b4a60 100644
--- a/lib/gvpr/actions.c
+++ b/lib/gvpr/actions.c
@@ -380,7 +380,7 @@ Agraph_t *cloneG(Agraph_t * g, char* name)
  * graph. Otherwise, create a clone subgraph of g.
  * Assume obj != NULL.
  */
-Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
+Agobj_t *cloneO(Agraph_t * g, Agobj_t * obj)
 {
     Agobj_t *nobj = 0;
     Agedge_t *e;
@@ -415,8 +415,8 @@ Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
     case AGINEDGE:
     case AGOUTEDGE:
 	e = (Agedge_t *) obj;
-	t = (Agnode_t *) clone(g, OBJ(agtail(e)));
-	h = (Agnode_t *) clone(g, OBJ(aghead(e)));
+	t = (Agnode_t *) cloneO(g, OBJ(agtail(e)));
+	h = (Agnode_t *) cloneO(g, OBJ(aghead(e)));
 	name = agnameof (AGMKOUT(e));
 	nobj = (Agobj_t *) openEdge(g, t, h, name);
 	if (nobj)
diff --git a/lib/gvpr/actions.h b/lib/gvpr/actions.h
index 5c62a3b..4223c52 100644
--- a/lib/gvpr/actions.h
+++ b/lib/gvpr/actions.h
@@ -22,7 +22,7 @@ extern "C" {
 #include "expr.h"
 
     extern void nodeInduce(Agraph_t * selected);
-    extern Agobj_t *clone(Agraph_t * g, Agobj_t * obj);
+    extern Agobj_t *cloneO(Agraph_t * g, Agobj_t * obj);
     extern Agraph_t *cloneG(Agraph_t * g, char* name);
     extern Agobj_t *copy(Agraph_t * g, Agobj_t * obj);
     extern int copyAttr(Agobj_t * obj, Agobj_t * obj1);
diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c
index c157572..0914210 100644
--- a/lib/gvpr/compile.c
+++ b/lib/gvpr/compile.c
@@ -1087,7 +1087,7 @@ getval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
 		error(ERROR_WARNING, "NULL object passed to clone()");
 		v.integer = 0;
 	    } else
-		v.integer = PTR2INT(clone(gp, objp));
+		v.integer = PTR2INT(cloneO(gp, objp));
 	    break;
 	case F_cloneG:
 	    gp = INT2PTR(Agraph_t *, args[0].integer);
diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c
index 0d47d70..9a1bfd1 100644
--- a/lib/gvpr/gvpr.c
+++ b/lib/gvpr/gvpr.c
@@ -803,7 +803,7 @@ addOutputGraph (Gpr_t* state, gvpropts* uopts)
     Agraph_t* g = state->outgraph;
 
     if ((agroot(g) == state->curgraph) && !uopts->ingraphs)
-	g = (Agraph_t*)clone (0, (Agobj_t *)g);
+	g = (Agraph_t*)cloneO (0, (Agobj_t *)g);
 
     uopts->n_outgraphs++;
     uopts->outgraphs = oldof(uopts->outgraphs,Agraph_t*,uopts->n_outgraphs,0);
@@ -988,7 +988,7 @@ int gvpr (int argc, char *argv[], gvpropts * uopts)
 
 		/* begin graph */
 		if (incoreGraphs && (opts->compflags & CLONE))
-		    state->curgraph = (Agraph_t*)clone (0, (Agobj_t*)(state->curgraph));
+		    state->curgraph = (Agraph_t*)cloneO (0, (Agobj_t*)(state->curgraph));
 		state->curobj = (Agobj_t *) state->curgraph;
 		state->tvroot = 0;
 		if (bp->begg_stmt)
-- 
1.7.6