From: erg Date: Fri, 3 Oct 2008 15:24:47 +0000 (+0000) Subject: Make setAttr external; alter conflicting static function in args.c X-Git-Tag: LAST_LIBGRAPH~32^2~3242 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ffc7d1ffe1145569b81a1e7941c44e9ad7d0eb29;p=graphviz Make setAttr external; alter conflicting static function in args.c --- diff --git a/lib/common/args.c b/lib/common/args.c index c4164ef66..d908513ec 100644 --- a/lib/common/args.c +++ b/lib/common/args.c @@ -188,11 +188,11 @@ setInt (int* v, char* arg) return 0; } -/* setAttr: +/* setFDPAttr: * Actions for fdp specific flags */ static int -setAttr (char* arg) +setFDPAttr (char* arg) { switch (*arg++) { case 'g' : @@ -242,7 +242,7 @@ fdp_extra_args (GVC_t *gvc, int argc, char** argv) for (i = 1; i < argc; i++) { arg = argv[i]; if (arg && (*arg == '-') && (*(arg+1) == 'L')) { - if (setAttr (arg+2)) dotneato_usage(1); + if (setFDPAttr (arg+2)) dotneato_usage(1); } else { cnt++; diff --git a/lib/common/utils.c b/lib/common/utils.c index b61205308..681235502 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -790,7 +790,7 @@ void compute_bb(graph_t * g) * Sets object's name attribute to the given value. * Creates the attribute if not already set. */ -static Agsym_t *setAttr(graph_t * g, void *obj, char *name, char *value, +Agsym_t *setAttr(graph_t * g, void *obj, char *name, char *value, Agsym_t * ap) { if (ap == NULL) { diff --git a/lib/common/utils.h b/lib/common/utils.h index d0acbd8fb..01f79ac29 100644 --- a/lib/common/utils.h +++ b/lib/common/utils.h @@ -75,6 +75,7 @@ extern "C" { extern pointf neato_closest(splines * spl, pointf p); extern pointf spline_at_y(splines * spl, double y); + extern Agsym_t *setAttr(graph_t*, void*, char*name, char *value, Agsym_t*); extern void setEdgeType (graph_t* g, int dflt); #ifdef __cplusplus }