OpenScop
0.9.0
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <osl/macros.h>
#include <osl/util.h>
#include <osl/interface.h>
#include <osl/extensions/textual.h>
Go to the source code of this file.
Functions | |
void | osl_textual_idump (FILE *file, osl_textual_p textual, int level) |
void | osl_textual_dump (FILE *file, osl_textual_p textual) |
char * | osl_textual_sprint (osl_textual_p textual) |
osl_textual_p | osl_textual_sread (char **extensions) |
osl_textual_p | osl_textual_malloc () |
void | osl_textual_free (osl_textual_p textual) |
osl_textual_p | osl_textual_clone (osl_textual_p textual) |
int | osl_textual_equal (osl_textual_p f1, osl_textual_p f2) |
osl_interface_p | osl_textual_interface () |
osl_textual_p osl_textual_clone | ( | osl_textual_p | textual | ) |
osl_textual_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_textual_t data structure.
[in] | textual | The pointer to the textual structure we want to clone. |
Definition at line 263 of file textual.c.
References OSL_strdup, osl_textual_malloc(), and osl_textual::textual.
Referenced by osl_textual_interface().
void osl_textual_dump | ( | FILE * | file, |
osl_textual_p | textual | ||
) |
osl_textual_dump function: this function prints the content of an osl_textual_t structure (*textual) into a file (file, possibly stdout).
[in] | file | The file where the information has to be printed. |
[in] | textual | The textual structure to be printed. |
Definition at line 139 of file textual.c.
References osl_textual_idump().
int osl_textual_equal | ( | osl_textual_p | f1, |
osl_textual_p | f2 | ||
) |
osl_textual_equal function: this function returns 1. This is part of the special behavior of the textual option (the text string can be easily different while the options are actually identical.
[in] | f1 | The first textual structure. |
[in] | f2 | The second textual structure. |
Definition at line 308 of file textual.c.
Referenced by osl_textual_interface().
void osl_textual_free | ( | osl_textual_p | textual | ) |
osl_textual_free function: this function frees the allocated memory for an osl_textual_t structure.
[in,out] | textual | The pointer to the textual structure to be freed. |
Definition at line 242 of file textual.c.
References osl_textual::textual.
Referenced by osl_textual_interface().
void osl_textual_idump | ( | FILE * | file, |
osl_textual_p | textual, | ||
int | level | ||
) |
osl_textual_idump function: this function displays an osl_textual_t structure (*textual) 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] | textual | The textual structure to be printed. |
[in] | level | Number of spaces before printing, for each line. |
Definition at line 91 of file textual.c.
References OSL_strdup, and osl_textual::textual.
Referenced by osl_textual_dump(), and osl_textual_interface().
osl_textual_interface function: this function creates an interface structure corresponding to the textual extension and returns it).
Definition at line 321 of file textual.c.
References osl_interface_malloc(), OSL_strdup, osl_textual_clone(), osl_textual_equal(), osl_textual_free(), osl_textual_idump(), osl_textual_malloc(), osl_textual_sprint(), osl_textual_sread(), and OSL_URI_TEXTUAL.
Referenced by osl_interface_get_default_registry().
osl_textual_malloc function: this function allocates the memory space for an osl_textual_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
Definition at line 226 of file textual.c.
References OSL_malloc, and osl_textual::textual.
Referenced by osl_textual_clone(), osl_textual_interface(), and osl_textual_sread().
char* osl_textual_sprint | ( | osl_textual_p | textual | ) |
osl_textual_sprint function: this function returns NULL. This is part of the special behavior of the textual option (printing it along with other options would double the options...).
[in] | textual | The textual structure to be printed. |
Definition at line 176 of file textual.c.
Referenced by osl_textual_interface().
osl_textual_p osl_textual_sread | ( | char ** | extensions | ) |
osl_textual_sread function: this function reads a textual structure from a string complying to the OpenScop textual format and returns a pointer to this textual structure. The string should contain only one textual format of a textual structure.
[in,out] | extensions | The input string where to find a textual struct. Updated to the position after what has been read. |
Definition at line 197 of file textual.c.
References OSL_strdup, osl_textual_malloc(), and osl_textual::textual.
Referenced by osl_textual_interface().