OpenScop 0.8.1
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <osl/macros.h>
#include <osl/util.h>
#include <osl/interface.h>
#include <osl/extensions/lines.h>
Go to the source code of this file.
Functions | |
void | osl_lines_idump (FILE *file, osl_lines_p lines, int level) |
void | osl_lines_dump (FILE *file, osl_lines_p lines) |
char * | osl_lines_sprint (osl_lines_p lines) |
osl_lines_p | osl_lines_sread (char **extensions_fixme) |
osl_lines_p | osl_lines_malloc () |
void | osl_lines_free (osl_lines_p lines) |
osl_lines_p | osl_lines_clone (osl_lines_p lines) |
int | osl_lines_equal (osl_lines_p c1, osl_lines_p c2) |
osl_interface_p | osl_lines_interface () |
osl_lines_p osl_lines_clone | ( | osl_lines_p | lines | ) |
osl_lines_clone function: This function builds and returns a "hard copy" (not a pointer copy) of an osl_lines_t data structure.
lines | The pointer to the lines structure we want to copy. |
Definition at line 259 of file lines.c.
References osl_lines::end, osl_lines_malloc(), and osl_lines::start.
Referenced by osl_lines_interface().
void osl_lines_dump | ( | FILE * | file, |
osl_lines_p | lines | ||
) |
osl_lines_dump function: this function prints the content of an osl_lines_t structure (*lines) into a file (file, possibly stdout).
file | The file where the information has to be printed. |
lines | The lines structure whose information has to be printed. |
Definition at line 123 of file lines.c.
References osl_lines_idump().
int osl_lines_equal | ( | osl_lines_p | c1, |
osl_lines_p | c2 | ||
) |
osl_lines_equal function: this function returns true if the two lines structures are the same (content-wise), false otherwise. This functions considers two lines
c1 | The first lines structure. |
c2 | The second lines structure. |
Definition at line 281 of file lines.c.
References osl_lines::end, and osl_lines::start.
Referenced by osl_lines_interface().
void osl_lines_free | ( | osl_lines_p | lines | ) |
osl_lines_free function: This function frees the allocated memory for an osl_lines_t structure.
lines | The pointer to the lines structure we want to free. |
Definition at line 240 of file lines.c.
Referenced by osl_lines_interface().
void osl_lines_idump | ( | FILE * | file, |
osl_lines_p | lines, | ||
int | level | ||
) |
osl_lines_idump function: this function displays an osl_lines_t structure (*lines) 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. |
lines | The lines structure whose information has to be printed. |
level | Number of spaces before printing, for each line. |
Definition at line 88 of file lines.c.
References osl_lines::end, and osl_lines::start.
Referenced by osl_lines_dump(), and osl_lines_interface().
osl_interface_p osl_lines_interface | ( | ) |
osl_lines_interface function: this function creates an interface structure corresponding to the lines extension and returns it).
Definition at line 301 of file lines.c.
References osl_interface::clone, osl_interface::equal, osl_interface::free, osl_interface::idump, osl_interface::malloc, osl_interface_malloc(), osl_lines_clone(), osl_lines_equal(), osl_lines_free(), osl_lines_idump(), osl_lines_malloc(), osl_lines_sprint(), osl_lines_sread(), OSL_URI_LINES, osl_interface::sprint, osl_interface::sread, and osl_interface::URI.
osl_lines_p osl_lines_malloc | ( | ) |
osl_lines_malloc function: This function allocates the memory space for an osl_lines_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 223 of file lines.c.
References osl_lines::end, OSL_malloc, OSL_UNDEFINED, and osl_lines::start.
Referenced by osl_lines_clone(), osl_lines_interface(), and osl_lines_sread().
char* osl_lines_sprint | ( | osl_lines_p | lines | ) |
osl_lines_sprint function: this function prints the content of an osl_lines_t structure (*lines) into a string (returned) in the OpenScop textual format.
lines | The lines structure whose information has to be printed. |
Definition at line 135 of file lines.c.
References osl_lines::end, OSL_malloc, OSL_MAX_STRING, OSL_realloc, OSL_TAG_LINES_START, OSL_TAG_LINES_STOP, osl_util_safe_strcat(), and osl_lines::start.
Referenced by osl_lines_interface().
osl_lines_p osl_lines_sread | ( | char ** | extensions_fixme | ) |
osl_lines_sread function: this function reads a lines structure from a string complying to the OpenScop textual format and returns a pointer to this lines structure. The string should contain only one textual format of a lines structure.
extensions | The input string where to find a lines structure. |
Definition at line 178 of file lines.c.
References osl_lines::end, OSL_debug, OSL_error, osl_lines_malloc(), OSL_MAX_STRING, and osl_lines::start.
Referenced by osl_lines_interface().