From: Matthew Fernandez Date: Sat, 29 May 2021 03:00:15 +0000 (-0700) Subject: remove NOTDEF-guarded code X-Git-Tag: 2.47.3~17^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ed184b39be2bfb9facf8be7313200a89f8f7086;p=graphviz remove NOTDEF-guarded code This is not defined anywhere in the build. --- diff --git a/lib/cgraph/edge.c b/lib/cgraph/edge.c index 5a8fc6734..47e9aa1cf 100644 --- a/lib/cgraph/edge.c +++ b/lib/cgraph/edge.c @@ -519,17 +519,3 @@ CGRAPH_API Agedge_t *agopp(Agedge_t * e) { return AGOPP(e); } - -#ifdef NOTDEF - /* could be useful if we write relabel_edge */ -static Agedge_t *agfindedge_by_name(Agraph_t * g, Agnode_t * t, - Agnode_t * h, char *name) -{ - uint64_t id; - - if (agmapnametoid(agraphof(t), AGEDGE, name, &id, FALSE)) - return agfindedge_by_id(g, t, h, id); - else - return NULL; -} -#endif diff --git a/lib/cgraph/grammar.y b/lib/cgraph/grammar.y index 102139718..bfa677345 100644 --- a/lib/cgraph/grammar.y +++ b/lib/cgraph/grammar.y @@ -235,11 +235,6 @@ static gstack_t *pop(gstack_t *s) return rv; } -#ifdef NOTDEF -static item *cons_edge(Agedge_t *e) - { return newitem(T_edge,e,NULL); } -#endif - static void delete_items(item *ilist) { item *p,*pn; @@ -254,28 +249,12 @@ static void delete_items(item *ilist) } } -#ifdef NOTDEF -static void initlist(list_t *list) -{ - list->first = list->last = NULL; -} -#endif - static void deletelist(list_t *list) { delete_items(list->first); list->first = list->last = NULL; } -#ifdef NOTDEF -static void listins(list_t *list, item *v) -{ - v->next = list->first; - list->first = v; - if (list->last == NULL) list->last = v; -} -#endif - static void listapp(list_t *list, item *v) { if (list->last) list->last->next = v; diff --git a/lib/common/shapes.c b/lib/common/shapes.c index e9c0463e3..442fe639e 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -602,11 +602,6 @@ void round_corners(GVJ_t * job, pointf * AF, int sides, int style, int filled) gvrender_polygon(job, AF, sides, filled); for (seg = 0; seg < sides; seg++) { -#ifdef NOTDEF - C[0] = B[3 * seg]; - C[1] = B[3 * seg + 3]; - gvrender_polyline(job, C, 2); -#endif C[0] = B[3 * seg + 2]; C[1] = B[3 * seg + 4]; gvrender_polyline(job, C, 2); diff --git a/lib/dotgen/class1.c b/lib/dotgen/class1.c index 24bf9adf8..06322a11e 100644 --- a/lib/dotgen/class1.c +++ b/lib/dotgen/class1.c @@ -95,25 +95,6 @@ void class1(graph_t * g) merge_oneway(e, rep); else virtual_edge(t, h, e); - -#ifdef NOTDEF - if ((t == agtail(e)) && (h == aghead(e))) { - if (rep = find_fast_edge(t, h)) - merge_oneway(e, rep); - else - virtual_edge(t, h, e); - } else { - f = agfindedge(g, t, h); - if (f && (ED_to_virt(f) == NULL)) - rep = virtual_edge(t, h, f); - else - rep = find_fast_edge(t, h); - if (rep) - merge_oneway(e, rep); - else - virtual_edge(t, h, e); - } -#endif } } } diff --git a/lib/dotgen/mincross.c b/lib/dotgen/mincross.c index a532122c9..c5bf6ea43 100644 --- a/lib/dotgen/mincross.c +++ b/lib/dotgen/mincross.c @@ -801,14 +801,6 @@ static void transpose(graph_t * g, int reverse) GD_rank(g)[r].candidate = TRUE; do { delta = 0; -#ifdef NOTDEF - /* don't run both the upward and downward passes- they cancel. - i tried making it depend on whether an odd or even pass, - but that didn't help. */ - for (r = GD_maxrank(g); r >= GD_minrank(g); r--) - if (GD_rank(g)[r].candidate) - delta += transpose_step(g, r, reverse); -#endif for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { if (GD_rank(g)[r].candidate) { delta += transpose_step(g, r, reverse); diff --git a/lib/dotgen/position.c b/lib/dotgen/position.c index 93b8a3a95..ac252793c 100644 --- a/lib/dotgen/position.c +++ b/lib/dotgen/position.c @@ -339,16 +339,6 @@ static void make_edge_pairs(graph_t * g) m1 = -m0; m0 = 0; } -#ifdef NOTDEF -/* was trying to improve LR balance */ - if ((ND_save_out(n).size % 2 == 0) - && (i == ND_save_out(n).size / 2 - 1)) { - node_t *u = ND_save_out(n).list[i]->head; - node_t *v = ND_save_out(n).list[i + 1]->head; - double width = ND_rw(u) + ND_lw(v) + GD_nodesep(g); - m0 = width / 2 - 1; - } -#endif make_aux_edge(sn, agtail(e), m0 + 1, ED_weight(e)); make_aux_edge(sn, aghead(e), m1 + 1, ED_weight(e)); ND_rank(sn) = diff --git a/tclpkg/tclpathplan/wrapper.c b/tclpkg/tclpathplan/wrapper.c index a37d5aaa9..206add9ec 100644 --- a/tclpkg/tclpathplan/wrapper.c +++ b/tclpkg/tclpathplan/wrapper.c @@ -33,58 +33,6 @@ typedef struct Pedge_t { } Pedge_t; -#ifdef NOTDEF -int main(int argc, char **argv) -{ - Ppoly_t polys[2], *polys_ptr[2]; - - polys[0].ps = malloc(3 * sizeof(Ppoint_t)); - polys[1].ps = malloc(3 * sizeof(Ppoint_t)); - polys[0].pn = 3; - polys[1].pn = 3; - - polys[0].ps[0].x = 0.0; - polys[0].ps[0].y = 0.0; - polys[0].ps[1].x = 0.0; - polys[0].ps[1].y = 100.0; - polys[0].ps[2].x = 100.0; - polys[0].ps[2].y = 0.0; - - polys[1].ps[0].x = 70.0; - polys[1].ps[0].y = 70.0; - polys[1].ps[1].x = 70.0; - polys[1].ps[1].y = 100.0; - polys[1].ps[2].x = 100.0; - polys[1].ps[2].y = 70.0; - - polys_ptr[0] = &polys[0]; - polys_ptr[1] = &polys[1]; - - if (Plegal_arrangement(polys_ptr, 2)) - printf(" it is legal\n"); - else - printf(" it is not legal\n"); -} -#endif - -#ifdef NOTDEF -struct vertex *after(struct vertex *v) -{ - if (v == v->poly->finish) - return v->poly->start; - else - return v + 1; -} - -struct vertex *before(struct vertex *v) -{ - if (v == v->poly->start) - return v->poly->finish; - else - return v - 1; -} -#endif - void find_ints(struct vertex vertex_list[], struct polygon polygon_list[], struct data *input, struct intersection ilist[]);