]> granicus.if.org Git - graphviz/commitdiff
common attach_attrs_and_arrows: use 'agxbprint' to simplify some code
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 28 Dec 2022 17:56:52 +0000 (09:56 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 31 Dec 2022 22:31:10 +0000 (14:31 -0800)
This is similar to bb80d536e9cfdd4680254d9e91511b224a143eb4.

lib/common/output.c

index 2aca14aaa431261fc81f43c95882d0c88c9e3d20..a64c6d72c225e9753d4785b442582cf7d0e0b84e 100644 (file)
@@ -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)