OpenScop
0.9.0
|
Go to the source code of this file.
Data Structures | |
struct | osl_coordinates |
Defines | |
#define | OSL_URI_COORDINATES "coordinates" |
Typedefs | |
typedef struct osl_coordinates | osl_coordinates_t |
typedef struct osl_coordinates * | osl_coordinates_p |
Functions | |
void | osl_coordinates_idump (FILE *, osl_coordinates_p, int) |
void | osl_coordinates_dump (FILE *, osl_coordinates_p) |
char * | osl_coordinates_sprint (osl_coordinates_p) |
osl_coordinates_p | osl_coordinates_sread (char **) |
osl_coordinates_p | osl_coordinates_malloc () |
void | osl_coordinates_free (osl_coordinates_p) |
osl_coordinates_p | osl_coordinates_clone (osl_coordinates_p) |
int | osl_coordinates_equal (osl_coordinates_p, osl_coordinates_p) |
osl_interface_p | osl_coordinates_interface () |
#define OSL_URI_COORDINATES "coordinates" |
Definition at line 76 of file coordinates.h.
Referenced by osl_coordinates_interface().
typedef struct osl_coordinates* osl_coordinates_p |
Definition at line 94 of file coordinates.h.
typedef struct osl_coordinates osl_coordinates_t |
Definition at line 93 of file coordinates.h.
osl_coordinates_p osl_coordinates_clone | ( | osl_coordinates_p | coordinates | ) |
osl_coordinates_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_coordinates_t data structure.
coordinates | The pointer to the coordinates structure to clone. |
Definition at line 283 of file coordinates.c.
References osl_coordinates::column_end, osl_coordinates::column_start, osl_coordinates::indent, osl_coordinates::line_end, osl_coordinates::line_start, osl_coordinates::name, osl_coordinates_malloc(), and OSL_strdup.
Referenced by osl_coordinates_interface().
void osl_coordinates_dump | ( | FILE * | file, |
osl_coordinates_p | coordinates | ||
) |
osl_coordinates_dump function: this function prints the content of an osl_coordinates_t structure (*coordinates) into a file (file, possibly stdout).
file | The file where the information has to be printed. |
coordinates | The coordinates structure to print. |
Definition at line 143 of file coordinates.c.
References osl_coordinates_idump().
int osl_coordinates_equal | ( | osl_coordinates_p | c1, |
osl_coordinates_p | c2 | ||
) |
osl_coordinates_equal function: this function returns true if the two coordinates structures are the same (content-wise), false otherwise. This functions considers two coordinates
c1 | The first coordinates structure. |
c2 | The second coordinates structure. |
Definition at line 309 of file coordinates.c.
References osl_coordinates::column_end, osl_coordinates::column_start, osl_coordinates::indent, osl_coordinates::line_end, osl_coordinates::line_start, osl_coordinates::name, and OSL_info.
Referenced by osl_coordinates_interface().
void osl_coordinates_free | ( | osl_coordinates_p | coordinates | ) |
osl_coordinates_free function: this function frees the allocated memory for an osl_coordinates_t structure.
coordinates | The pointer to the coordinates structure to free. |
Definition at line 263 of file coordinates.c.
References osl_coordinates::name.
Referenced by osl_coordinates_interface().
void osl_coordinates_idump | ( | FILE * | file, |
osl_coordinates_p | coordinates, | ||
int | level | ||
) |
osl_coordinates_idump function: this function displays an osl_coordinates_t structure (*coordinates) 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. |
coordinates | The coordinates structure to print. |
level | Number of spaces before printing, for each line. |
Definition at line 88 of file coordinates.c.
References osl_coordinates::column_end, osl_coordinates::column_start, osl_coordinates::indent, osl_coordinates::line_end, osl_coordinates::line_start, and osl_coordinates::name.
Referenced by osl_coordinates_dump(), and osl_coordinates_interface().
osl_coordinates_interface function: this function creates an interface structure corresponding to the coordinates extension and returns it).
Definition at line 356 of file coordinates.c.
References osl_coordinates_clone(), osl_coordinates_equal(), osl_coordinates_free(), osl_coordinates_idump(), osl_coordinates_malloc(), osl_coordinates_sprint(), osl_coordinates_sread(), osl_interface_malloc(), OSL_strdup, and OSL_URI_COORDINATES.
Referenced by osl_interface_get_default_registry().
osl_coordinates_malloc function: this function allocates the memory space for an osl_coordinates_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 242 of file coordinates.c.
References osl_coordinates::column_end, osl_coordinates::column_start, osl_coordinates::indent, osl_coordinates::line_end, osl_coordinates::line_start, osl_coordinates::name, OSL_malloc, and OSL_UNDEFINED.
Referenced by osl_coordinates_clone(), osl_coordinates_interface(), and osl_coordinates_sread().
char* osl_coordinates_sprint | ( | osl_coordinates_p | coordinates | ) |
osl_coordinates_sprint function: this function prints the content of an osl_coordinates_t structure (*coordinates) into a string (returned) in the OpenScop textual format.
coordinates | The coordinates structure to be print. |
Definition at line 155 of file coordinates.c.
References osl_coordinates::column_end, osl_coordinates::column_start, osl_coordinates::indent, osl_coordinates::line_end, osl_coordinates::line_start, osl_coordinates::name, OSL_malloc, OSL_MAX_STRING, OSL_realloc, and osl_util_safe_strcat().
Referenced by osl_coordinates_interface().
osl_coordinates_p osl_coordinates_sread | ( | char ** | input | ) |
osl_coordinates_sread function: this function reads a coordinates structure from a string complying to the OpenScop textual format and returns a pointer to this structure. The input parameter is updated to the position in the input string this function reach right after reading the coordinates structure.
[in,out] | input | The input string where to find coordinates. Updated to the position after what has been read. |
Definition at line 202 of file coordinates.c.
References osl_coordinates::column_end, osl_coordinates::column_start, osl_coordinates::indent, osl_coordinates::line_end, osl_coordinates::line_start, osl_coordinates::name, osl_coordinates_malloc(), OSL_debug, osl_util_read_int(), and osl_util_read_line().
Referenced by osl_coordinates_interface().