]> granicus.if.org Git - graphviz/commitdiff
simplify xdot_points with agxbprint
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Sep 2020 17:26:05 +0000 (10:26 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 17 Sep 2020 04:08:23 +0000 (21:08 -0700)
plugin/core/gvrender_core_dot.c

index 37ec8048be6a22b976dd0f001310fedfca9d7039..8d820c7a9563d3731a3f121f326cc11da9a83125 100644 (file)
@@ -155,12 +155,9 @@ static void xdot_num(agxbuf *xbuf, double v)
 static void xdot_points(GVJ_t *job, char c, pointf * A, int n)
 {
     emit_state_t emit_state = job->obj->emit_state;
-    char buf[BUFSIZ];
     int i;
 
-    agxbputc(xbufs[emit_state], c);
-    sprintf(buf, " %d ", n);
-    agxbput(xbufs[emit_state], buf);
+    agxbprint(xbufs[emit_state], "%c %d ", c, n);
     for (i = 0; i < n; i++)
         xdot_point(xbufs[emit_state], A[i]);
 }