OpenScop
0.9.0
|
#include <stdio.h>
Go to the source code of this file.
typedef void*(* osl_clone_f)(void *) |
Definition at line 80 of file interface.h.
typedef int(* osl_equal_f)(void *, void *) |
Definition at line 81 of file interface.h.
typedef void(* osl_free_f)(void *) |
Definition at line 79 of file interface.h.
typedef void(* osl_idump_f)(FILE *, void *, int) |
Definition at line 75 of file interface.h.
typedef struct osl_interface* osl_interface_p |
Definition at line 101 of file interface.h.
typedef struct osl_interface osl_interface_t |
Definition at line 100 of file interface.h.
typedef void*(* osl_malloc_f)() |
Definition at line 78 of file interface.h.
typedef char*(* osl_sprint_f)(void *) |
Definition at line 76 of file interface.h.
typedef void*(* osl_sread_f)(char **) |
Definition at line 77 of file interface.h.
void osl_interface_add | ( | osl_interface_p * | list, |
osl_interface_p | interface | ||
) |
osl_interface_add function: this function adds an interface node (it may be a list as well) to a list of interfaces provided as parameter (list). The new node is inserted at the end of the list.
list | The list of interfaces to add a node (NULL if empty). |
interface | The interface to add to the list. |
Definition at line 177 of file interface.c.
References osl_interface::next, OSL_error, osl_interface_lookup(), and osl_interface::URI.
Referenced by osl_interface_get_default_registry(), osl_interface_nclone(), and osl_scop_register_extension().
osl_interface_p osl_interface_clone | ( | osl_interface_p | interface | ) |
osl_interface_clone function: This function builds and returns a "hard copy" (not a pointer copy) of an osl_interface_t data structure.
interface | The pointer to the interface structure we want to copy. |
Definition at line 314 of file interface.c.
References osl_interface_nclone().
Referenced by osl_generic_clone(), osl_scop_clone(), and osl_scop_pread().
void osl_interface_dump | ( | FILE * | file, |
osl_interface_p | interface | ||
) |
osl_interface_dump function: this function prints the content of a osl_interface_t structure (*interface) into a file (file, possibly stdout).
file | File where informations are printed. |
interface | The interface structure to print. |
Definition at line 154 of file interface.c.
References osl_interface_idump().
int osl_interface_equal | ( | osl_interface_p | interface1, |
osl_interface_p | interface2 | ||
) |
osl_interface_equal function: this function returns true if the two interface structures are the same, (content-wise) false otherwise.
interface1 | The first interface structure. |
interface2 | The second interface structure. |
Definition at line 328 of file interface.c.
References osl_interface::clone, osl_interface::equal, osl_interface::free, osl_interface::idump, osl_interface::malloc, osl_interface::sprint, osl_interface::sread, and osl_interface::URI.
Referenced by osl_generic_equal(), and osl_scop_equal().
void osl_interface_free | ( | osl_interface_p | interface | ) |
osl_interface_free function: this function frees the allocated memory for an osl_interface_t structure, and all the interfaces stored in the list.
[in] | interface | The pointer to the interface we want to free. |
Definition at line 237 of file interface.c.
References osl_interface::next, and osl_interface::URI.
Referenced by osl_generic_free(), osl_scop_free(), osl_scop_read(), osl_statement_read(), and osl_symbols_sread().
osl_interface_get_default_registry function: this function creates the list of known interfaces (of all generic types, including extensions) and returns it.
Definition at line 386 of file interface.c.
References osl_arrays_interface(), osl_body_interface(), osl_clay_interface(), osl_comment_interface(), osl_coordinates_interface(), osl_dependence_interface(), osl_extbody_interface(), osl_interface_add(), osl_loop_interface(), osl_null_interface(), osl_pluto_unroll_interface(), osl_relation_interface(), osl_scatnames_interface(), osl_strings_interface(), osl_symbols_interface(), and osl_textual_interface().
Referenced by osl_scop_read(), osl_statement_read(), and osl_symbols_sread().
void osl_interface_idump | ( | FILE * | file, |
osl_interface_p | interface, | ||
int | level | ||
) |
osl_interface_idump function: this function displays an osl_interface_t structure (*interface) into a file (file, possibly stdout) in a way that trends to be understandable. It includes an indentation level (level) in order to work with others idump functions.
file | The file where the information has to be printed. |
interface | The interface structure which has to be printed. |
level | Number of spaces before printing, for each line. |
Definition at line 100 of file interface.c.
References osl_interface::URI.
Referenced by osl_generic_idump(), osl_interface_dump(), and osl_scop_idump().
osl_interface_p osl_interface_lookup | ( | osl_interface_p | list, |
char * | URI | ||
) |
osl_interface_lookup function: this function returns the first interface with a given URI in the interface list provided as parameter and NULL if it doesn't find such an interface.
list | The interface list where to search a given interface URI. |
URI | The URI of the interface we are looking for. |
Definition at line 362 of file interface.c.
References osl_interface::next, OSL_warning, and osl_interface::URI.
Referenced by osl_generic_read_one(), osl_generic_sread_one(), and osl_interface_add().
osl_interface_malloc function: This function allocates the memory space for a osl_interface_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 212 of file interface.c.
References osl_interface::clone, osl_interface::equal, osl_interface::free, osl_interface::idump, osl_interface::malloc, osl_interface::next, OSL_malloc, osl_interface::sprint, osl_interface::sread, and osl_interface::URI.
Referenced by osl_arrays_interface(), osl_body_interface(), osl_clay_interface(), osl_comment_interface(), osl_coordinates_interface(), osl_dependence_interface(), osl_extbody_interface(), osl_interface_nclone(), osl_irregular_interface(), osl_loop_interface(), osl_null_interface(), osl_pluto_unroll_interface(), osl_relation_interface(), osl_scatnames_interface(), osl_strings_interface(), osl_symbols_interface(), and osl_textual_interface().
osl_interface_p osl_interface_nclone | ( | osl_interface_p | interface, |
int | n | ||
) |
osl_interface_nclone function: This function builds and returns a "hard copy" (not a pointer copy) of the n first elements of an osl_interface_t list.
interface | The pointer to the interface structure we want to clone. |
n | The number of nodes we want to copy (-1 for infinity). |
Definition at line 283 of file interface.c.
References osl_interface::clone, osl_interface::equal, osl_interface::free, osl_interface::idump, osl_interface::malloc, osl_interface_add(), osl_interface_malloc(), OSL_strdup, osl_interface::sprint, osl_interface::sread, and osl_interface::URI.
Referenced by osl_generic_read_one(), osl_generic_sread_one(), and osl_interface_clone().
int osl_interface_number | ( | osl_interface_p | interface | ) |
osl_interface_number function: this function returns the number of statements in the interface list provided as parameter.
[in] | interface | The first element of the interface list. |
Definition at line 264 of file interface.c.