GRU - Generic Reusable Utilities
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
gru_node.c File Reference
#include "gru_node.h"

Functions

gru_node_tgru_node_new (const void *ptr)
 Creates a new node. More...
 
void gru_node_destroy (gru_node_t **node)
 Destroys a node and sets is address to NULL. More...
 
void gru_node_set_previous (gru_node_t *node, gru_node_t *previous)
 
void gru_node_set_next (gru_node_t *node, gru_node_t *next)
 
void gru_node_reset (gru_node_t *node)
 
void gru_node_unlink (gru_node_t *node)
 

Function Documentation

void gru_node_destroy ( gru_node_t **  node)

Destroys a node and sets is address to NULL.

Parameters
nodea pointer to the node pointer to destroy
Examples:
collection/gru_list_test.c, and collection/gru_node_test.c.
gru_node_t* gru_node_new ( const void *  ptr)

Creates a new node.

Parameters
ptrdata pointer
Returns
a new node
Examples:
collection/gru_node_test.c.
void gru_node_reset ( gru_node_t node)
void gru_node_set_next ( gru_node_t node,
gru_node_t next 
)
void gru_node_set_previous ( gru_node_t node,
gru_node_t previous 
)
void gru_node_unlink ( gru_node_t node)