OpenScop
0.9.0
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <osl/macros.h>
#include <osl/util.h>
#include <osl/strings.h>
#include <osl/interface.h>
#include <osl/extensions/irregular.h>
Go to the source code of this file.
Functions | |
void | osl_irregular_idump (FILE *file, osl_irregular_p irregular, int level) |
void | osl_irregular_dump (FILE *file, osl_irregular_p irregular) |
char * | osl_irregular_sprint (osl_irregular_p irregular) |
osl_irregular_p | osl_irregular_sread (char **extensions_fixme) |
osl_irregular_p | osl_irregular_malloc () |
void | osl_irregular_free (osl_irregular_p irregular) |
osl_irregular_p | osl_irregular_clone (osl_irregular_p irregular) |
int | osl_irregular_equal (osl_irregular_p c1, osl_irregular_p c2) |
osl_irregular_p | osl_irregular_add_control (osl_irregular_p irregular, char **iterators, int nb_iterators, char *body) |
osl_irregular_p | osl_irregular_add_exit (osl_irregular_p irregular, char **iterators, int nb_iterators, char *body) |
osl_irregular_p | osl_irregular_add_predicates (osl_irregular_p irregular, int *predicates, int nb_add_predicates) |
osl_interface_p | osl_irregular_interface () |
osl_irregular_p osl_irregular_add_control | ( | osl_irregular_p | irregular, |
char ** | iterators, | ||
int | nb_iterators, | ||
char * | body | ||
) |
Definition at line 503 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_interface::malloc, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, osl_irregular_malloc(), OSL_strdup, and osl_irregular::predicates.
osl_irregular_p osl_irregular_add_exit | ( | osl_irregular_p | irregular, |
char ** | iterators, | ||
int | nb_iterators, | ||
char * | body | ||
) |
Definition at line 592 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_interface::malloc, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, osl_irregular_malloc(), OSL_strdup, and osl_irregular::predicates.
osl_irregular_p osl_irregular_add_predicates | ( | osl_irregular_p | irregular, |
int * | predicates, | ||
int | nb_add_predicates | ||
) |
Definition at line 667 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_interface::malloc, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, osl_irregular_malloc(), OSL_strdup, and osl_irregular::predicates.
osl_irregular_p osl_irregular_clone | ( | osl_irregular_p | irregular | ) |
osl_irregular_clone function: This function builds and returns a "hard copy" (not a pointer copy) of an osl_irregular_t data structure.
irregular | The pointer to the irregular structure we want to copy. |
Definition at line 381 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_interface::malloc, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, osl_irregular_malloc(), OSL_strdup, and osl_irregular::predicates.
Referenced by osl_irregular_interface().
void osl_irregular_dump | ( | FILE * | file, |
osl_irregular_p | irregular | ||
) |
osl_irregular_dump function: this function prints the content of an osl_irregular_t structure (*irregular) into a file (file, possibly stdout).
file | The file where the information has to be printed. |
irregular | The irregular structure whose information has to be printed. |
Definition at line 147 of file irregular.c.
References osl_irregular_idump().
int osl_irregular_equal | ( | osl_irregular_p | c1, |
osl_irregular_p | c2 | ||
) |
osl_irregular_equal function: this function returns true if the two irregular structures are the same (content-wise), false otherwise. This functions considers two irregular
c1 | The first irregular structure. |
c2 | The second irregular structure. |
Definition at line 463 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, and osl_irregular::nb_statements.
Referenced by osl_irregular_interface().
void osl_irregular_free | ( | osl_irregular_p | irregular | ) |
osl_irregular_free function: This function frees the allocated memory for an osl_irregular_t structure.
irregular | The pointer to the irregular structure we want to free. |
Definition at line 339 of file irregular.c.
References osl_irregular::body, osl_interface::free, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, and osl_irregular::predicates.
Referenced by osl_irregular_interface().
void osl_irregular_idump | ( | FILE * | file, |
osl_irregular_p | irregular, | ||
int | level | ||
) |
osl_irregular_idump function: this function displays an osl_irregular_t structure (*irregular) 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. |
irregular | The irregular structure whose information has to be printed. |
level | Number of spaces before printing, for each line. |
Definition at line 89 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, and osl_irregular::predicates.
Referenced by osl_irregular_dump(), and osl_irregular_interface().
osl_irregular_interface function: this function creates an interface structure corresponding to the irregular extension and returns it).
Definition at line 749 of file irregular.c.
References osl_interface_malloc(), osl_irregular_clone(), osl_irregular_equal(), osl_irregular_free(), osl_irregular_idump(), osl_irregular_malloc(), osl_irregular_sprint(), osl_irregular_sread(), OSL_strdup, and OSL_URI_IRREGULAR.
osl_irregular_malloc function: This function allocates the memory space for an osl_irregular_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 315 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, OSL_malloc, and osl_irregular::predicates.
Referenced by osl_irregular_add_control(), osl_irregular_add_exit(), osl_irregular_add_predicates(), osl_irregular_clone(), osl_irregular_interface(), and osl_irregular_sread().
char* osl_irregular_sprint | ( | osl_irregular_p | irregular | ) |
osl_irregular_sprint function: this function prints the content of an osl_irregular_t structure (*irregular) into a string (returned) in the OpenScop textual format.
irregular | The irregular structure whose information has to be printed. |
Definition at line 159 of file irregular.c.
References osl_irregular::body, osl_interface::free, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, OSL_malloc, OSL_MAX_STRING, OSL_realloc, OSL_TAG_IRREGULAR_START, OSL_TAG_IRREGULAR_STOP, osl_util_safe_strcat(), and osl_irregular::predicates.
Referenced by osl_irregular_interface().
osl_irregular_p osl_irregular_sread | ( | char ** | extensions_fixme | ) |
osl_irregular_sread function: this function reads a irregular structure from a string complying to the OpenScop textual format and returns a pointer to this irregular structure. The string should contain only one textual format of a irregular structure.
extensions | The input string where to find a irregular structure. |
Definition at line 230 of file irregular.c.
References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, OSL_debug, OSL_error, osl_irregular_malloc(), OSL_malloc, OSL_MAX_STRING, OSL_strdup, and osl_irregular::predicates.
Referenced by osl_irregular_interface().