int compute_sel_bary_positions(GraphFrame *gf) { int mes = 0; int cycle_len = count_llist(gf->list_sel_vertex); enumerate_vertices(gf); reset_mark_pick_vertices(gf); reset_level_vertices(gf); if(!gf->the_cycle) gf->the_cycle = init_linked_list(); if(!gf->list_visited_vertex) gf->list_visited_vertex = init_linked_list(); if(!gf->the_rest) gf->the_rest = init_linked_list(); get_sel_cycle(gf); /*printing_linked_list(gf->the_cycle);*/ if(!is_empty_list(gf->the_cycle)) { Delete_hash_table(gf->HV); circularize(gf,gf->the_cycle, cycle_len); get_rest(gf); /*printing_linked_list(gf->the_rest);*/ if(!is_empty_list(gf->the_rest)) mes = layout_rest(gf, gf->the_rest, gf->count_vertex-cycle_len); } else mes = NO_CYCLE; Delete_all_list(gf->the_cycle); Delete_all_list(gf->list_visited_vertex); Delete_all_list(gf->the_rest); gf->the_cycle = init_linked_list(); gf->list_visited_vertex = init_linked_list(); gf->the_rest = init_linked_list(); return mes; }
void result(t_difference* diff) { while (diff->next != NULL) { if (diff->state != '\0') { printf("%d%c%d\n", diff->num_line+1, diff->state, diff->num_line+1); if (diff->line_file1 != NULL) printf("< %s", diff->line_file1); printf("---\n"); if (diff->line_file2 != NULL) printf("> %s", diff->line_file2); } diff = diff->next; } Delete_all_list(diff); }