From: Matthew Fernandez Date: Sun, 16 May 2021 18:15:06 +0000 (-0700) Subject: remove unused taper0 X-Git-Tag: 2.47.3~29^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32a22bd179ecefca514672e5fca32181a5919a63;p=graphviz remove unused taper0 This function’s only use is in test code and the header declaring its prototype is not shipped. It is simpler to omit this (and utility function halffunc) from the libcommon build entirely. Squashes one -Wmissing-prototypes warning. --- diff --git a/lib/common/render.h b/lib/common/render.h index e6e832527..59eb34805 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -147,7 +147,6 @@ extern "C" { extern void make_simple_label (GVC_t * gvc, textlabel_t* rv); extern int stripedBox (GVJ_t * job, pointf* AF, char* clrs, int rotate); extern stroke_t* taper (bezier*, double (*radfunc_t)(double,double,double), double initwid, int linejoin, int linecap); - extern stroke_t* taper0 (bezier* bez, double initwid); extern pointf textspan_size(GVC_t * gvc, textspan_t * span); extern Dt_t * textfont_dict_open(GVC_t *gvc); extern void textfont_dict_close(GVC_t *gvc); diff --git a/lib/common/taper.c b/lib/common/taper.c index 834dcda5f..d101d981c 100644 --- a/lib/common/taper.c +++ b/lib/common/taper.c @@ -412,17 +412,12 @@ stroke_t* taper (bezier* bez, radfunc_t radfunc, double initwid, int linejoin, i return p; } +#ifdef TEST static double halffunc (double curlen, double totallen, double initwid) { return ((1 - (curlen/totallen))*initwid/2.0); } -stroke_t* taper0 (bezier* bez, double initwid) -{ - return taper(bez, halffunc, initwid, 0, 0); -} - -#ifdef TEST static pointf pts[] = { {100,100}, {150,150}, @@ -438,7 +433,7 @@ main () bez.size = sizeof(pts)/sizeof(pointf); bez.list = pts; - sp = taper0 (&bez, 20); + sp = taper(&bez, halffunc, 20.0, 0, 0); printf ("newpath\n"); printf ("%.02f %.02f moveto\n", sp->vertices[0].x, sp->vertices[0].y); for (i=1; invertices; i++)