]> granicus.if.org Git - graphviz/commitdiff
Revert "common: inline and remove 'printint'"
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 4 Jun 2022 15:24:53 +0000 (08:24 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 5 Jun 2022 18:28:25 +0000 (11:28 -0700)
This reverts commit 4e12bb0867503ceb142227e5b620b476abe77d52.

lib/common/output.c

index f591beeaacbca56ef1248eec3c2011b690b07bfe..cedf8dd8d6e32cff3ed4fa220be4bc8b7b1769ab 100644 (file)
@@ -38,6 +38,15 @@ static void agputc (int c, FILE* fp)
 }
 
 
+static void printint(FILE * f, char *prefix, int i)
+{
+    char buf[BUFSIZ];
+    
+    if (prefix) agputs(prefix, f);
+    snprintf(buf, sizeof(buf), "%d", i);
+    agputs(buf, f);
+}
+
 static void printdouble(FILE * f, char *prefix, double v)
 {
     char buf[BUFSIZ];
@@ -151,7 +160,7 @@ void write_plain(GVJ_t *job, graph_t *g, FILE *f, bool extend) {
                print(f, "edge");
                writenodeandport(f, agtail(e), tport);
                writenodeandport(f, aghead(e), hport);
-               print(f, " %d", splinePoints);
+               printint(f, " ", splinePoints);
                for (i = 0; i < ED_spl(e)->size; i++) {
                    bz = ED_spl(e)->list[i];
                    for (j = 0; j < bz.size; j++)