OpenScop
0.9.0
|
Go to the source code of this file.
Data Structures | |
struct | osl_comment |
Defines | |
#define | OSL_URI_COMMENT "comment" |
Typedefs | |
typedef struct osl_comment | osl_comment_t |
typedef struct osl_comment * | osl_comment_p |
Functions | |
void | osl_comment_idump (FILE *, osl_comment_p, int) |
void | osl_comment_dump (FILE *, osl_comment_p) |
char * | osl_comment_sprint (osl_comment_p) |
osl_comment_p | osl_comment_sread (char **) |
osl_comment_p | osl_comment_malloc () |
void | osl_comment_free (osl_comment_p) |
osl_comment_p | osl_comment_clone (osl_comment_p) |
int | osl_comment_equal (osl_comment_p, osl_comment_p) |
osl_interface_p | osl_comment_interface () |
#define OSL_URI_COMMENT "comment" |
Definition at line 76 of file comment.h.
Referenced by osl_comment_interface().
typedef struct osl_comment* osl_comment_p |
typedef struct osl_comment osl_comment_t |
osl_comment_p osl_comment_clone | ( | osl_comment_p | comment | ) |
osl_comment_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_comment_t data structure.
[in] | comment | The pointer to the comment structure to clone. |
Definition at line 250 of file comment.c.
References osl_comment::comment, osl_comment_malloc(), and OSL_strdup.
Referenced by osl_comment_interface().
void osl_comment_dump | ( | FILE * | file, |
osl_comment_p | comment | ||
) |
osl_comment_dump function: this function prints the content of an osl_comment_t structure (*comment) into a file (file, possibly stdout).
[in] | file | The file where the information has to be printed. |
[in] | comment | The comment structure to print. |
Definition at line 130 of file comment.c.
References osl_comment_idump().
int osl_comment_equal | ( | osl_comment_p | c1, |
osl_comment_p | c2 | ||
) |
osl_comment_equal function: this function returns true if the two comment structures are the same (content-wise), false otherwise.
[in] | c1 | The first comment structure. |
[in] | c2 | The second comment structure. |
Definition at line 271 of file comment.c.
References osl_comment::comment, and OSL_info.
Referenced by osl_comment_interface().
void osl_comment_free | ( | osl_comment_p | comment | ) |
osl_comment_free function: this function frees the allocated memory for an osl_comment_t structure.
[in,out] | comment | The pointer to the comment structure to free. |
Definition at line 229 of file comment.c.
References osl_comment::comment.
Referenced by osl_comment_interface().
void osl_comment_idump | ( | FILE * | file, |
osl_comment_p | comment, | ||
int | level | ||
) |
osl_comment_idump function: this function displays an osl_comment_t structure (*comment) 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.
[in] | file | The file where the information has to be printed. |
[in] | comment | The comment structure to print. |
[in] | level | Number of spaces before printing, for each line. |
Definition at line 88 of file comment.c.
References osl_comment::comment, and OSL_strdup.
Referenced by osl_comment_dump(), and osl_comment_interface().
osl_comment_interface function: this function creates an interface structure corresponding to the comment extension and returns it).
Definition at line 297 of file comment.c.
References osl_comment_clone(), osl_comment_equal(), osl_comment_free(), osl_comment_idump(), osl_comment_malloc(), osl_comment_sprint(), osl_comment_sread(), osl_interface_malloc(), OSL_strdup, and OSL_URI_COMMENT.
Referenced by osl_interface_get_default_registry().
osl_comment_malloc function: this function allocates the memory space for an osl_comment_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 213 of file comment.c.
References osl_comment::comment, and OSL_malloc.
Referenced by osl_comment_clone(), osl_comment_interface(), and osl_comment_sread().
char* osl_comment_sprint | ( | osl_comment_p | comment | ) |
osl_comment_sprint function: this function prints the content of an osl_comment_t structure (*comment) into a string (returned) in the OpenScop textual format.
[in] | comment | The comment structure to print. |
Definition at line 142 of file comment.c.
References osl_comment::comment, OSL_malloc, OSL_MAX_STRING, OSL_realloc, and osl_util_safe_strcat().
Referenced by osl_comment_interface().
osl_comment_p osl_comment_sread | ( | char ** | input | ) |
osl_comment_sread function: this function reads a comment structure from a string complying to the OpenScop textual format and returns a pointer to this comment structure. The input parameter is updated to the position in the input string this function reach right after reading the comment structure.
[in,out] | input | The input string where to find a comment. Updated to the position after what has been read. |
Definition at line 178 of file comment.c.
References osl_comment::comment, osl_comment_malloc(), OSL_debug, OSL_error, OSL_MAX_STRING, and OSL_strdup.
Referenced by osl_comment_interface().