From: Matthew Fernandez Date: Wed, 28 Dec 2022 17:56:52 +0000 (-0800) Subject: common attach_attrs_and_arrows: use 'agxbprint' to simplify some code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12682445fd458cb73c8d3591e0e19af1dc1260fa;p=graphviz common attach_attrs_and_arrows: use 'agxbprint' to simplify some code This is similar to bb80d536e9cfdd4680254d9e91511b224a143eb4. --- diff --git a/lib/common/output.c b/lib/common/output.c index 2aca14aaa..a64c6d72c 100644 --- a/lib/common/output.c +++ b/lib/common/output.c @@ -335,17 +335,15 @@ void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep) agxbputc(&xb, ';'); if (ED_spl(e)->list[i].sflag) { s_arrows = 1; - snprintf(buf, sizeof(buf), "s,%.5g,%.5g ", + agxbprint(&xb, "s,%.5g,%.5g ", ED_spl(e)->list[i].sp.x, YDIR(ED_spl(e)->list[i].sp.y)); - agxbput(&xb, buf); } if (ED_spl(e)->list[i].eflag) { e_arrows = 1; - snprintf(buf, sizeof(buf), "e,%.5g,%.5g ", + agxbprint(&xb, "e,%.5g,%.5g ", ED_spl(e)->list[i].ep.x, YDIR(ED_spl(e)->list[i].ep.y)); - agxbput(&xb, buf); } for (j = 0; j < ED_spl(e)->list[i].size; j++) { if (j > 0)