parse oops in doc file
[lttv.git] / ltt / branches / poly / ltt / event.c
index 8a3174cff8a8e124322dd5ed75b2fa217f10c72f..f762dbddf5d174e306175115682f4d94a8776444 100644 (file)
@@ -252,8 +252,23 @@ void ltt_event_position_set(LttEventPosition *ep,
  ****************************************************************************/
 
 unsigned ltt_event_cpu_id(LttEvent *e)
-{  
-  return (unsigned)atoi(e->tracefile->name);
+{ 
+  char * c1, * c2, * c3;
+  c1 = strrchr(e->tracefile->name,'\\');
+  c2 = strrchr(e->tracefile->name,'/');
+  if(c1 == NULL && c2 == NULL){
+    return (unsigned)atoi(e->tracefile->name);
+  }else if(c1 == NULL){
+    c2++;
+    return (unsigned)atoi(c2);    
+  }else if(c2 == NULL){
+    c1++;
+    return (unsigned)atoi(c1);    
+  }else{
+    c3 = (c1 > c2) ? c1 : c2;
+    c3++;
+    return (unsigned)atoi(c3);        
+  }
 }
 
 /*****************************************************************************
This page took 0.023077 seconds and 4 git commands to generate.