PIPS
|
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "properties.h"
#include "misc.h"
#include "pipsdbm.h"
#include "ri.h"
#include "ri-util.h"
#include "text-util.h"
#include "icfg.h"
Go to the source code of this file.
Functions | |
void | safe_free_vertex (vertex ver, list l_of_vers) |
util.c More... | |
list | safe_add_vertex_to_list (vertex ver, list l_of_vers) |
list | list_of_connected_nodes (vertex ver, list l_of_vers) |
static string | convert_string_for_daVinci_graph (string s) |
vertex | get_vertex_by_string (const char *str_name, list l_of_vers) |
list | safe_make_successor (vertex ver_parent, vertex ver_child, list l_of_vers) |
void | print_graph_of_text_to_daVinci (FILE *f_out, list l_of_vers) |
void | print_graph_daVinci_from_starting_node (FILE *f_out, vertex start_ver) |
void | print_marged_text_from_starting_node (FILE *fd, int margin, vertex start_ver, list l_of_vers) |
bool | make_resource_from_starting_node (const char *mod_name, string res_name, string file_ext, vertex start_ver, list l_of_vers, bool res_text_type) |
if empty, do nothing
effects lines
delete the comment of effects
Definition at line 67 of file util.c.
References malloc(), memset(), and strdup().
Referenced by print_graph_of_text_to_daVinci().
str_name | tr_name |
l_of_vers | _of_vers |
Definition at line 92 of file util.c.
References CAR, first_word_of_sentence(), free(), MAP, remove_newline_of_string(), same_string_p, sens, SENTENCE, text_sentences, VERTEX, vertex_undefined, and vertex_vertex_label.
Referenced by call_flt(), and print_marged_text_from_starting_node().
ver | er |
l_of_vers | _of_vers |
Definition at line 57 of file util.c.
References list_of_connected_nodes(), MAP, safe_add_vertex_to_list(), SUCCESSOR, successor_vertex, and vertex_successors.
Referenced by list_of_connected_nodes(), and print_graph_daVinci_from_starting_node().
bool make_resource_from_starting_node | ( | const char * | mod_name, |
string | res_name, | ||
string | file_ext, | ||
vertex | start_ver, | ||
list | l_of_vers, | ||
bool | res_text_type | ||
) |
ree(dir);
this line may cause a problem of bus errone
this line must be after DB_PUT_FILE_RESOURCE for the reason of memory liberation
mod_name | od_name |
res_name | es_name |
file_ext | ile_ext |
start_ver | tart_ver |
l_of_vers | _of_vers |
res_text_type | es_text_type |
Definition at line 220 of file util.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), DB_PUT_FILE_RESOURCE, free(), print_graph_daVinci_from_starting_node(), print_marged_text_from_starting_node(), safe_fclose(), safe_fopen(), strdup(), vertex_undefined_p, and write_an_attachment_file().
Referenced by print_module_icfg().
void print_graph_daVinci_from_starting_node | ( | FILE * | f_out, |
vertex | start_ver | ||
) |
f_out | _out |
start_ver | tart_ver |
Definition at line 190 of file util.c.
References ADD_ELEMENT_TO_LIST, gen_free_list(), list_of_connected_nodes(), NIL, print_graph_of_text_to_daVinci(), and VERTEX.
Referenced by make_resource_from_starting_node().
void print_graph_of_text_to_daVinci | ( | FILE * | f_out, |
list | l_of_vers | ||
) |
printf(f_out, convert_string_for_daVinci_graph(s + strlen(CALL_MARK)));
f_out | _out |
l_of_vers | _of_vers |
Definition at line 134 of file util.c.
References CALL_MARK, CAR, convert_string_for_daVinci_graph(), first_word_of_sentence(), FOREACH, fprintf(), free(), remove_newline_of_string(), SENTENCE, sentence_to_string(), SUCCESSOR, successor_vertex, text_sentences, VERTEX, vertex_successors, and vertex_vertex_label.
Referenced by print_graph_daVinci_from_starting_node().
void print_marged_text_from_starting_node | ( | FILE * | fd, |
int | margin, | ||
vertex | start_ver, | ||
list | l_of_vers | ||
) |
if s in not empty, ok write out
fd | d |
margin | argin |
start_ver | tart_ver |
l_of_vers | _of_vers |
Definition at line 200 of file util.c.
References CALL_MARK, fprintf(), free(), get_vertex_by_string(), MAP, print_marged_text_from_starting_node(), remove_newline_of_string(), SENTENCE, sentence_to_string(), text_sentences, vertex_undefined_p, and vertex_vertex_label.
Referenced by make_resource_from_starting_node(), and print_marged_text_from_starting_node().
ver | er |
l_of_vers | _of_vers |
Definition at line 50 of file util.c.
References ADD_ELEMENT_TO_LIST, gen_in_list_p(), and VERTEX.
Referenced by list_of_connected_nodes(), print_module_icfg(), and safe_make_successor().
util.c
ver | er |
l_of_vers | _of_vers |
Definition at line 43 of file util.c.
References free_vertex(), and gen_in_list_p().
Referenced by print_module_icfg().
search if it was made yet, do not make
if it was not made, do it
add vertex parent to the list of vertex
ver_parent | er_parent |
ver_child | er_child |
l_of_vers | _of_vers |
Definition at line 110 of file util.c.
References ADD_ELEMENT_TO_LIST, CAR, first_word_of_sentence(), make_successor(), MAP, safe_add_vertex_to_list(), same_string_p, SENTENCE, SUCCESSOR, successor_vertex, text_sentences, vertex_successors, and vertex_vertex_label.
Referenced by call_flt().