-
- if(current_var->in_libsimgrid == 1){
- variables = mc_local_variables_libsimgrid;
- }else{
- variables = mc_local_variables_binary;
- }
-
- unsigned int cursor2 = 0;
- dw_variable_t var;
- int start, end;
-
- if(strcmp(current_var->frame, "*") == 0){
- xbt_dict_cursor_t dict_cursor;
- char *frame_name;
- dw_frame_t frame;
- xbt_dict_foreach(variables, dict_cursor, frame_name, frame){
- start = 0;
- end = xbt_dynar_length(frame->variables) - 1;
- while(start <= end){
- cursor2 = (start + end) / 2;
- var = (dw_variable_t)xbt_dynar_get_as(frame->variables, cursor2, dw_variable_t);
- if(strcmp(var->name, current_var->var_name) == 0){
- xbt_dynar_remove_at(frame->variables, cursor2, NULL);
- start = 0;
- end = xbt_dynar_length(frame->variables) - 1;
- }else if(strcmp(var->name, current_var->var_name) < 0){
- start = cursor2 + 1;
- }else{
- end = cursor2 - 1;
- }
- }
- }
- }else{
- xbt_dynar_t variables_list = ((dw_frame_t)xbt_dict_get_or_null(variables, current_var->frame))->variables;
- start = 0;
- end = xbt_dynar_length(variables_list) - 1;
- while(start <= end){
- cursor2 = (start + end) / 2;
- var = (dw_variable_t)xbt_dynar_get_as(variables_list, cursor2, dw_variable_t);
- if(strcmp(var->name, current_var->var_name) == 0){
- xbt_dynar_remove_at(variables_list, cursor2, NULL);
- start = 0;
- end = xbt_dynar_length(variables_list) - 1;
- }else if(strcmp(var->name, current_var->var_name) < 0){
- start = cursor2 + 1;
- }else{
- end = cursor2 - 1;
- }
- }
- }