outstanding bugs fixed
[lttv.git] / ltt / branches / poly / lttv / lttv / print.c
index 84f3af795adab287833024dd45a15b36119099a1..50c7c67473dbcb9560950892d83633b296a1f731 100644 (file)
@@ -190,6 +190,9 @@ void lttv_event_to_string(LttEvent *e, GString *s,
   event_type = ltt_event_eventtype(e);
   
   num_fields = ltt_eventtype_num_fields(event_type);
+  if(num_fields == 0) return;
+  g_string_append_printf(s, " ");
+  g_string_append_printf(s, "{ ");
   for(i=0; i<num_fields; i++) {
     field = ltt_eventtype_field(event_type, i);
     if(field_names) {
@@ -198,7 +201,9 @@ void lttv_event_to_string(LttEvent *e, GString *s,
         g_string_append_printf(s, "%s = ", g_quark_to_string(name));
     }
     lttv_print_field(e, field, s, field_names);
+    if(i != num_fields-1) g_string_append_printf(s, ", ");
   }
+  g_string_append_printf(s, " }");
 } 
 
 static void init()
This page took 0.027407 seconds and 4 git commands to generate.