X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Ftypes%2Fstring.c;h=59924dafc90d81bc6efefd24d6ef9aee94046280;hp=d07501e5c2b510bee955ab8aa215a1636116aff7;hb=312623540c466defab45503fbe0ce7ec79dcce85;hpb=b1a2f5806630289aa0b85edbb7f7c581cfa26178 diff --git a/formats/ctf-text/types/string.c b/formats/ctf-text/types/string.c index d07501e5..59924daf 100644 --- a/formats/ctf-text/types/string.c +++ b/formats/ctf-text/types/string.c @@ -31,7 +31,16 @@ int ctf_text_string_write(struct stream_pos *ppos, assert(string_definition->value != NULL); if (pos->dummy) return 0; - print_pos_tabs(pos); - fprintf(pos->fp, "%s\n", string_definition->value); + //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, "\"%s\"", string_definition->value); return 0; }