dynamiC  0.1
Macros | Functions
dynamic_list.c File Reference

Implementation of dynamiC list module. More...

#include "dynamic.h"

Go to the source code of this file.

Macros

#define LST_CONT(X)   X->data.list->container
 
#define LST_SPACE(X)   X->data.list->space
 

Functions

trilean dyn_set_list_len (dyn_c *dyn, dyn_ushort len)
 Set dynamic element to list with maximal length. More...
 
void dyn_list_free (dyn_c *dyn)
 Free the allocated memory of the entire list and set it to NONE. More...
 
trilean dyn_list_resize (dyn_c *list, dyn_ushort size)
 Change the maximal space of a list. More...
 
dyn_cdyn_list_push (dyn_c *list, const dyn_c *element)
 Push new element to the end of a list. More...
 
dyn_cdyn_list_push_none (dyn_c *list)
 Push NONE element to the end of a list. More...
 
trilean dyn_list_remove (dyn_c *list, dyn_ushort i)
 Delete the ith element from a list. More...
 
trilean dyn_list_insert (dyn_c *list, dyn_c *element, const dyn_ushort i)
 Insert a new element at the ith position into a list. More...
 
trilean dyn_list_pop (dyn_c *list, dyn_c *element)
 Pop the last element from the list and move it to param element. More...
 
trilean dyn_list_popi (dyn_c *list, dyn_short i)
 Pop i elements from the end of a list. More...
 
trilean dyn_list_get (const dyn_c *list, dyn_c *element, const dyn_short i)
 Copy the ith element of a list to param element. More...
 
dyn_cdyn_list_get_ref (const dyn_c *list, const dyn_short i)
 Return a reference to the ith element within list, negative values are allowed. More...
 
trilean dyn_list_copy (const dyn_c *list, dyn_c *copy)
 Make a deep copy of the entire list. More...
 
dyn_ushort dyn_list_string_len (const dyn_c *list)
 Return the length of the string representation of a list. More...
 
void dyn_list_string_add (const dyn_c *list, dyn_str str)
 Add string representation of a list to str. More...
 

Detailed Description

Implementation of dynamiC list module.

Author
André Dietrich
Date
14 December 2016

This project is released under the MIT-License.

Definition in file dynamic_list.c.