X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf-text%2Ftypes%2Fsequence.c;h=70a41dc3bb9a975d39344e59e3b83fc2d1efd83a;hb=312623540c466defab45503fbe0ce7ec79dcce85;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..70a41dc3 100644 --- a/formats/ctf-text/types/sequence.c +++ b/formats/ctf-text/types/sequence.c @@ -25,15 +25,22 @@ 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"); + //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 = sequence_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; }