t.tv_sec = atoi(v->str);
g_string_free(v,TRUE);
v = g_string_new("");
- } else g_string_append_c(v,value[i]);
+ } else v = g_string_append_c(v,value[i]);
}
/* number can be integer or double */
if(is_double) t.tv_nsec = atoi(v->str);
break;
default: /* concatening current string */
if(a_string_spaces->len != 0) {
- g_string_append(a_field_component, a_string_spaces->str);
- a_string_spaces = g_string_set_size(a_string_spaces, 0);
- }
+ a_field_component = g_string_append(
+ a_field_component, a_string_spaces->str);
+ a_string_spaces = g_string_set_size(a_string_spaces, 0);
+ }
a_field_component = g_string_append_c(a_field_component,
filter->expression[i]);
}
GString* s = g_string_new("");
if(filter->expression != NULL) {
- g_string_append(s,filter->expression);
- g_string_append_c(s,'&');
+ s = g_string_append(s,filter->expression);
+ s = g_string_append_c(s,'&');
}
- g_string_append(s,expression);
+ s = g_string_append(s,expression);
g_free(filter->expression);
filter->expression = g_string_free(s,FALSE);
if(gm != NULL) break;
- g_string_append(messages, g_module_error());
- g_string_append(messages, "\n");
+ messages = g_string_append(messages, g_module_error());
+ messages = g_string_append(messages, "\n");
g_log(G_LOG_DOMAIN,G_LOG_LEVEL_INFO,"Trial failed, %s", g_module_error());
}
*/
GString* s;
s = g_ptr_array_index(fvd->f_logical_op_options,gtk_combo_box_get_active(GTK_COMBO_BOX(fvd->f_logical_op_junction_box)));
- g_string_append(a_filter_string,s->str);
+ a_filter_string = g_string_append(a_filter_string,s->str);
gtk_combo_box_set_active(GTK_COMBO_BOX(fvd->f_logical_op_junction_box),0);
/* begin expression */
- g_string_append_c(a_filter_string,'(');
+ a_filter_string = g_string_append_c(a_filter_string,'(');
/*
* For each simple expression, add the resulting string
fvdl = (FilterViewerDataLine*)g_ptr_array_index(fvd->f_lines,i);
s = g_ptr_array_index(fvd->f_not_op_options,gtk_combo_box_get_active(GTK_COMBO_BOX(fvdl->f_not_op_box)));
- g_string_append(a_filter_string,s->str);
+ a_filter_string = g_string_append(a_filter_string,s->str);
s = g_ptr_array_index(fvd->f_field_options,gtk_combo_box_get_active(GTK_COMBO_BOX(fvdl->f_field_box)));
- g_string_append(a_filter_string,s->str);
+ a_filter_string = g_string_append(a_filter_string,s->str);
s = g_ptr_array_index(fvd->f_math_op_options,gtk_combo_box_get_active(GTK_COMBO_BOX(fvdl->f_math_op_box)));
- g_string_append(a_filter_string,s->str);
+ a_filter_string = g_string_append(a_filter_string,s->str);
- g_string_append(a_filter_string,gtk_entry_get_text(GTK_ENTRY(fvdl->f_value_field)));
+ a_filter_string = g_string_append(a_filter_string,gtk_entry_get_text(GTK_ENTRY(fvdl->f_value_field)));
s = g_ptr_array_index(fvd->f_logical_op_options,gtk_combo_box_get_active(GTK_COMBO_BOX(fvdl->f_logical_op_box)));
- g_string_append(a_filter_string,s->str);
+ a_filter_string = g_string_append(a_filter_string,s->str);
/*
* resetting simple expression lines
}
/* end expression */
- g_string_append_c(a_filter_string,')');
+ a_filter_string = g_string_append_c(a_filter_string,')');
g_string_prepend(a_filter_string,gtk_entry_get_text(GTK_ENTRY(fvd->f_expression_field)));
gtk_entry_set_text(GTK_ENTRY(fvd->f_expression_field),a_filter_string->str);
#include <config.h>
#endif
+#include <glib.h>
#include <lttv/lttv.h>
#include <lttv/attribute.h>
#include <lttv/hook.h>
*(value_filter.v_pointer) = lttv_filter_new();
g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str);
-
+
lttv_filter_append_expression(*(value_filter.v_pointer),((GString*)*(value_expression.v_pointer))->str);
//lttv_traceset_context_add_hooks(tc,
fprintf(fp, "\n");
subtree = (LttvAttribute *)*(value.v_gobject);
saved_length = indent->len;
- g_string_append(indent, " ");
+ indent = g_string_append(indent, " ");
print_tree(fp, indent, subtree);
g_string_truncate(indent, saved_length);
}
start_time.tv_nsec);
#endif //FIXME
saved_length = indent->len;
- g_string_append(indent, " ");
+ indent = g_string_append(indent, " ");
print_tree(fp, indent, tcs->stats);
g_string_truncate(indent, saved_length);
}
#include <config.h>
#endif
+#include <glib.h>
#include <lttv/lttv.h>
#include <lttv/option.h>
#include <lttv/module.h>
#include <ltt/type.h>
#include <ltt/trace.h>
#include <ltt/facility.h>
-#include <stdio.h>
/* Insert the hooks before and after each trace and tracefile, and for each
event. Print a global header. */
g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
LTTV_POINTER, &value));
- if(((GString*)*(value.v_pointer))->len != 0) g_string_append_c((GString*)*(value.v_pointer),'&');
- g_string_append_c((GString*)*(value.v_pointer),'(');
- g_string_append((GString*)*(value.v_pointer),a_file_content);
- g_string_append_c((GString*)*(value.v_pointer),')');
+ if(((GString*)*(value.v_pointer))->len != 0)
+ (GString*)*(value.v_pointer) =
+ g_string_append_c((GString*)*(value.v_pointer),'&');
+ (GString*)*(value.v_pointer) =
+ g_string_append_c((GString*)*(value.v_pointer),'(');
+ (GString*)*(value.v_pointer) =
+ g_string_append((GString*)*(value.v_pointer),a_file_content);
+ (GString*)*(value.v_pointer) =
+ g_string_append_c((GString*)*(value.v_pointer),')');
}
g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
LTTV_POINTER, &value));
- if(((GString*)*(value.v_pointer))->len != 0) g_string_append_c((GString*)*(value.v_pointer),'&');
- g_string_append_c((GString*)*(value.v_pointer),'(');
- g_string_append((GString*)*(value.v_pointer),a_string);
- g_string_append_c((GString*)*(value.v_pointer),')');
+ if(((GString*)*(value.v_pointer))->len != 0)
+ (GString*)*(value.v_pointer) =
+ g_string_append_c((GString*)*(value.v_pointer),'&');
+ (GString*)*(value.v_pointer) =
+ g_string_append_c((GString*)*(value.v_pointer),'(');
+ (GString*)*(value.v_pointer) =
+ g_string_append((GString*)*(value.v_pointer),a_string);
+ (GString*)*(value.v_pointer) =
+ g_string_append_c((GString*)*(value.v_pointer),')');
}