]> granicus.if.org Git - graphviz/commitdiff
remove unused taper0
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 May 2021 18:15:06 +0000 (11:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 28 May 2021 00:03:30 +0000 (17:03 -0700)
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.

lib/common/render.h
lib/common/taper.c

index e6e832527a88ed0b85b02646be143e2030de1827..59eb34805827af2106aa99840fe890acdafbce70 100644 (file)
@@ -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);
index 834dcda5fa7b21320f52816e1225c8f369a64df9..d101d981cc4ccce9bcae9a2071bfc9fafff682e9 100644 (file)
@@ -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; i<sp->nvertices; i++)