text module
[lttv.git] / ltt / branches / poly / lttv / modules / text / textFilter.c
index 6013fea6ffe3fc021a6ca18d0270b3b4871f391c..27b878a35da9ede685ddd63518cbfe83fed5666f 100644 (file)
@@ -53,17 +53,15 @@ static char
   *a_file_name = NULL,
   *a_string = NULL;
 
-static GString
+GString
   *a_filter_string = NULL;
 
-
 static LttvHooks
   *before_traceset,
   *event_hook;
 
 static FILE *a_file;
 
-
 /**
  * filters the file input from user
  * @param hook_data the hook data
@@ -93,14 +91,15 @@ void filter_analyze_file(void *hook_data) {
   else {
     g_string_append(a_filter_string,"&"); /*conjonction between expression*/
   }
+
   while(!feof(a_file)) {
     getline(&line,&len,a_file);
     g_string_append(a_filter_string,line);
     line = NULL;
   }
+//  lttv_filter_append_expression(lttvfilter_t,a_filter_string->str);
   
-  lttv_filter_new(a_filter_string->str,NULL);
   fclose(a_file);
 }
 
@@ -123,10 +122,12 @@ void filter_analyze_string(void *hook_data) {
     g_string_append(a_filter_string,a_string);
   }
   else {
-    g_string_append(a_filter_string,"&"); /*conjonction between expression*/
+    g_string_append(a_filter_string,"&"); 
     g_string_append(a_filter_string,a_string);
   }
 
+//  lttv_filter_append_expression(lttvfilter_t,a_string); 
+
 }
 
 /**
@@ -153,7 +154,7 @@ static void init() {
   LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
 
   g_info("Init textFilter.c");
-  
   a_string = NULL;
   lttv_option_add("string", 's', 
       "filters a string issued by the user on the command line", 
@@ -181,7 +182,6 @@ static void init() {
 //     LTTV_POINTER, &value));
 //  g_assert((before_traceset = *(value.v_pointer)) != NULL);
 //  lttv_hooks_add(before_traceset, parse_filter_options, NULL, LTTV_PRIO_DEFAULT);
-
   
 }
 
This page took 0.023641 seconds and 4 git commands to generate.