OpenScop  0.9.0
Data Structures | Defines | Typedefs | Functions
textual.h File Reference
#include <stdio.h>
#include <osl/interface.h>
Include dependency graph for textual.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  osl_textual

Defines

#define OSL_URI_TEXTUAL   "textual"

Typedefs

typedef struct osl_textual osl_textual_t
typedef struct osl_textualosl_textual_p

Functions

void osl_textual_idump (FILE *, osl_textual_p, int)
void osl_textual_dump (FILE *, osl_textual_p)
char * osl_textual_sprint (osl_textual_p)
osl_textual_p osl_textual_sread (char **)
osl_textual_p osl_textual_malloc ()
void osl_textual_free (osl_textual_p)
osl_textual_p osl_textual_clone (osl_textual_p)
int osl_textual_equal (osl_textual_p, osl_textual_p)
osl_interface_p osl_textual_interface ()

Define Documentation

#define OSL_URI_TEXTUAL   "textual"

Definition at line 76 of file textual.h.

Referenced by osl_textual_interface().


Typedef Documentation

typedef struct osl_textual* osl_textual_p

Definition at line 88 of file textual.h.

typedef struct osl_textual osl_textual_t

Definition at line 87 of file textual.h.


Function Documentation

osl_textual_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_textual_t data structure.

Parameters:
[in]textualThe pointer to the textual structure we want to clone.
Returns:
A pointer to the clone of the textual structure.

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).

Parameters:
[in]fileThe file where the information has to be printed.
[in]textualThe textual structure to be printed.

Definition at line 139 of file textual.c.

References osl_textual_idump().

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.

Parameters:
[in]f1The first textual structure.
[in]f2The second textual structure.
Returns:
1.

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.

Parameters:
[in,out]textualThe 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.

Parameters:
[in]fileThe file where the information has to be printed.
[in]textualThe textual structure to be printed.
[in]levelNumber 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).

Returns:
An interface structure for the textual extension.

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.

Returns:
A pointer to an empty textual structure with fields set to default values.

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...).

Parameters:
[in]textualThe textual structure to be printed.
Returns:
NULL.

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.

Parameters:
[in,out]extensionsThe input string where to find a textual struct. Updated to the position after what has been read.
Returns:
A pointer to the textual structure that 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().