summaryrefslogblamecommitdiff
path: root/user/graphviz/0001-clone-nameclash.patch
blob: f657851819c5909190770d8baebaddb918a69a6e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                      
                                                              







                                                   
                                                               













                                                    
                              











                                                         
                                                                                        


                                                                      

                                                      

                      
                                          



                                              
                                                                  







                                                                               
                                                                         










                                                                                         
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
@@ -367,7 +367,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;
@@ -402,8 +402,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
@@ -18,7 +18,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
@@ -1145,7 +1145,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(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
@@ -837,7 +837,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);
@@ -1031,7 +1031,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