Update pretty-print
[babeltrace.git] / formats / ctf-text / types / array.c
index b7770174b4ca3340dea73554ff7b9ee05e60bc3e..f61693ab85b4245867ee80e62a8eb89955449c7a 100644 (file)
@@ -25,15 +25,22 @@ int ctf_text_array_write(struct stream_pos *ppos, struct definition *definition)
        int ret;
 
        if (!pos->dummy) {
-               print_pos_tabs(pos);
-               fprintf(pos->fp, "[\n");
+               //print_pos_tabs(pos);
+               if (definition->index != 0 && definition->index != INT_MAX)
+                       fprintf(pos->fp, ",");
+               if (definition->index != INT_MAX)
+                       fprintf(pos->fp, " ");
+               if (pos->print_names)
+                       fprintf(pos->fp, "%s = ",
+                               g_quark_to_string(definition->name));
+               fprintf(pos->fp, "[");
                pos->depth++;
        }
        ret = array_rw(ppos, definition);
        if (!pos->dummy) {
                pos->depth--;
-               print_pos_tabs(pos);
-               fprintf(pos->fp, "]\n");
+               //print_pos_tabs(pos);
+               fprintf(pos->fp, " ]");
        }
        return ret;
 }
This page took 0.024269 seconds and 4 git commands to generate.