]> granicus.if.org Git - graphviz/commitdiff
gv2gxl writeHdr: take a C99 bool for 'top'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 1 Oct 2022 02:29:38 +0000 (19:29 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 1 Oct 2022 02:29:38 +0000 (19:29 -0700)
Slightly clearer about the intent of this parameter.

cmd/tools/gv2gxl.c

index 4a2ce69d721961229303513d712451016a780c67..64f49311782988fd9304d3f0fce572ee8542e67d 100644 (file)
@@ -438,9 +438,7 @@ static void writeDicts(Agraph_t * g, FILE * gxlFile)
     }
 }
 
-static void
-writeHdr(gxlstate_t * stp, Agraph_t * g, FILE * gxlFile, int top)
-{
+static void writeHdr(gxlstate_t *stp, Agraph_t *g, FILE *gxlFile, bool top) {
     char *name;
     char *kind;
     char *uniqueName;
@@ -527,7 +525,7 @@ static void writeSubgs(gxlstate_t * stp, Agraph_t * g, FILE * gxlFile)
     Agraph_t *subg;
 
     for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) {
-       writeHdr(stp, subg, gxlFile, FALSE);
+       writeHdr(stp, subg, gxlFile, false);
        writeBody(stp, subg, gxlFile);
        writeTrl(subg, gxlFile, FALSE);
     }
@@ -869,7 +867,7 @@ void gv_to_gxl(Agraph_t * g, FILE * gxlFile)
     fprintf(gxlFile, "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
     fprintf(gxlFile, "<gxl>\n");
 
-    writeHdr(stp, g, gxlFile, TRUE);
+    writeHdr(stp, g, gxlFile, true);
     writeBody(stp, g, gxlFile);
     writeTrl(g, gxlFile, TRUE);