mega modif by Mathieu Desnoyers. Independant main windows, multiple tracesets, contro...
[lttv.git] / ltt / branches / poly / ltt / tracefile.c
index 1bcc111afde24f76d5eec72eadd1c7df1a01d653..a2f7bbadcc380376751ea64acaa6016ba8bd6afb 100644 (file)
@@ -404,7 +404,7 @@ void getCpuFileInfo(LttTrace *t, char* cpu)
  *are released as well.
  ****************************************************************************/
 
-LttTrace *ltt_trace_open(char *pathname)
+LttTrace *ltt_trace_open(const char *pathname)
 {
   LttTrace  * t;
   LttSystemDescription * sys_description;
@@ -463,6 +463,16 @@ LttTrace *ltt_trace_open(char *pathname)
   return t;
 }
 
+/******************************************************************************
+ * When we copy a trace, we want all the opening actions to happen again :
+ * the trace will be reopened and totally independant from the original.
+ * That's why we call ltt_trace_open.
+ *****************************************************************************/
+LttTrace *ltt_trace_copy(LttTrace *self)
+{
+  return ltt_trace_open(self->pathname);
+}
+
 void ltt_trace_close(LttTrace *t)
 {
   int i;
@@ -571,7 +581,7 @@ unsigned ltt_trace_eventtype_number(LttTrace *t)
   int i;
   unsigned count = 0;
   LttFacility * f;
-  for(i=0;i=t->facility_number;i++){
+  for(i=0;i<t->facility_number;i++){
     f = (LttFacility*)g_ptr_array_index(t->facilities, i);
     count += f->event_number;
   }
This page took 0.02342 seconds and 4 git commands to generate.