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

Go to the source code of this file.

Data Structures

struct  osl_null

Defines

#define OSL_URI_NULL   "null"

Typedefs

typedef struct osl_null osl_null_t
typedef struct osl_nullosl_null_p

Functions

void osl_null_idump (FILE *, osl_null_p, int)
void osl_null_dump (FILE *, osl_null_p)
char * osl_null_sprint (osl_null_p)
osl_null_p osl_null_sread (char **)
osl_null_p osl_null_malloc ()
void osl_null_free (osl_null_p)
osl_null_p osl_null_clone (osl_null_p)
int osl_null_equal (osl_null_p, osl_null_p)
osl_interface_p osl_null_interface ()

Define Documentation

#define OSL_URI_NULL   "null"

Definition at line 76 of file null.h.

Referenced by osl_null_interface().


Typedef Documentation

typedef struct osl_null* osl_null_p

Definition at line 87 of file null.h.

typedef struct osl_null osl_null_t

Definition at line 86 of file null.h.


Function Documentation

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

Parameters:
[in]nullThe pointer to the null structure to clone.
Returns:
A pointer to the clone of the null structure.

Definition at line 218 of file null.c.

References osl_null_malloc().

Referenced by osl_null_interface().

void osl_null_dump ( FILE *  file,
osl_null_p  null 
)

osl_null_dump function: this function prints the content of an osl_null_t structure (*null) into a file (file, possibly stdout).

Parameters:
[in]fileThe file where the information has to be printed.
[in]nullThe null structure to print.

Definition at line 114 of file null.c.

References osl_null_idump().

int osl_null_equal ( osl_null_p  c1,
osl_null_p  c2 
)

osl_null_equal function: this function returns true if the two null structures are the same (content-wise), false otherwise.

Parameters:
[in]c1The first null structure.
[in]c2The second null structure.
Returns:
1 if c1 and c2 are the same (content-wise), 0 otherwise.

Definition at line 237 of file null.c.

References OSL_info.

Referenced by osl_null_interface().

void osl_null_free ( osl_null_p  null)

osl_null_free function: this function frees the allocated memory for an osl_null_t structure.

Parameters:
[in,out]nullThe pointer to the null structure to free.

Definition at line 199 of file null.c.

Referenced by osl_null_interface().

void osl_null_idump ( FILE *  file,
osl_null_p  null,
int  level 
)

osl_null_idump function: this function displays an osl_null_t structure (*null) 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]nullThe null structure to print.
[in]levelNumber of spaces before printing, for each line.

Definition at line 88 of file null.c.

Referenced by osl_null_dump(), and osl_null_interface().

osl_null_interface function: this function creates an interface structure corresponding to the null extension and returns it).

Returns:
An interface structure for the null extension.

Definition at line 256 of file null.c.

References osl_interface_malloc(), osl_null_clone(), osl_null_equal(), osl_null_free(), osl_null_idump(), osl_null_malloc(), osl_null_sprint(), osl_null_sread(), OSL_strdup, and OSL_URI_NULL.

Referenced by osl_interface_get_default_registry().

osl_null_malloc function: this function allocates the memory space for an osl_null_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.

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

Definition at line 185 of file null.c.

References OSL_malloc.

Referenced by osl_null_clone(), osl_null_interface(), and osl_null_sread().

char* osl_null_sprint ( osl_null_p  null)

osl_null_sprint function: this function prints the content of an osl_null_t structure (*null) into a string (returned) in the OpenScop textual format.

Parameters:
[in]nullThe null structure to print.
Returns:
A string containing the OpenScop dump of the null structure.

Definition at line 126 of file null.c.

References OSL_malloc.

Referenced by osl_null_interface().

osl_null_p osl_null_sread ( char **  input)

osl_null_sread function: this function reads a null structure from a string complying to the OpenScop textual format and returns a pointer to this null structure. The input parameter is updated to the position in the input string this function reach right after reading the null structure.

Parameters:
[in,out]inputThe input string where to find a null. Updated to the position after what has been read.
Returns:
A pointer to the null structure that has been read.

Definition at line 154 of file null.c.

References OSL_debug, and osl_null_malloc().

Referenced by osl_null_interface().