X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf-text%2Ftypes%2Fsequence.c;h=4e9048949fc3f54a3481b8ce2dc6b989c7a85246;hb=764af3f43c289a0a5cd8bf6fd85d9361ae17a253;hp=1e19885cca75b6d7d296da0df40e69ee0d7518bc;hpb=c5e74408f9786219f6b44400dcf2098ab9cc78fb;p=babeltrace.git diff --git a/formats/ctf-text/types/sequence.c b/formats/ctf-text/types/sequence.c index 1e19885c..4e904894 100644 --- a/formats/ctf-text/types/sequence.c +++ b/formats/ctf-text/types/sequence.c @@ -25,15 +25,20 @@ int ctf_text_sequence_write(struct stream_pos *ppos, struct definition *definiti int ret; if (!pos->dummy) { - print_pos_tabs(pos); - fprintf(pos->fp, "[\n"); + 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 = sequence_rw(ppos, definition); if (!pos->dummy) { pos->depth--; - print_pos_tabs(pos); - fprintf(pos->fp, "]\n"); + fprintf(pos->fp, " ]"); } return ret; }