]> granicus.if.org Git - graphviz/commitdiff
simplify some debugging code
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 29 Mar 2021 03:00:59 +0000 (20:00 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 4 Apr 2021 05:03:04 +0000 (22:03 -0700)
lib/cgraph/refstr.c

index 1a3ff9f8501240396ea541f0703876335fb1ac59..1517417085d530ce12cbf1a2db7955ae29490567 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <cgraph/cghdr.h>
 #include <stddef.h>
+#include <stdio.h>
 
 /*
  * reference counted strings.
@@ -191,8 +192,7 @@ static int refstrprint(Dict_t * dict, void *ptr, void *user)
     NOTUSED(dict);
     r = ptr;
     NOTUSED(user);
-    write(2, r->s, strlen(r->s));
-    write(2, "\n", 1);
+    fprintf(stderr, "%s\n", r->s);
     return 0;
 }