dynamiC
0.1
|
Extension of type LIST to handle and implement SET. More...
Functions | |
trilean | dyn_set_set_len (dyn_c *set, const dyn_ushort len) |
Initialize dynamic element as empty set with maximal length. More... | |
trilean | dyn_set_insert (dyn_c *set, dyn_c *element) |
Insert new element into set, if and only if it is not included yet. More... | |
Extension of type LIST to handle and implement SET.
Insert new element into set, if and only if it is not included yet.
Before a new element is added, it is checked, whether it is already included or not.
[in,out] | set | has to be of type SET |
[in] | element | to be added |
DYN_TRUE | if memory for the SET could be allocated |
DYN_FALSE | otherwise |
Definition at line 48 of file dynamic_set.c.
trilean dyn_set_set_len | ( | dyn_c * | dyn, |
const dyn_ushort | len | ||
) |
Initialize dynamic element as empty set with maximal length.
Generate a set as a list with a maximal available number of preallocated elemens, and change the type of the list to SET. The returned set is empty.
[in,out] | dyn | element to be imp input has to be of type LIST |
[in] | len | of preallocated elements |
DYN_TRUE | if memory for the SET could be allocated |
DYN_FALSE | otherwise |
Definition at line 29 of file dynamic_set.c.