X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Ftypes%2Farray.c;h=f61693ab85b4245867ee80e62a8eb89955449c7a;hp=b7770174b4ca3340dea73554ff7b9ee05e60bc3e;hb=312623540c466defab45503fbe0ce7ec79dcce85;hpb=b1a2f5806630289aa0b85edbb7f7c581cfa26178 diff --git a/formats/ctf-text/types/array.c b/formats/ctf-text/types/array.c index b7770174..f61693ab 100644 --- a/formats/ctf-text/types/array.c +++ b/formats/ctf-text/types/array.c @@ -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; }