From liblfds.org
Revision as of 21:27, 25 November 2015 by Admin (talk | contribs) (Admin moved page r7.0.0:Lfds700 list as link start to r7.0.0:Lfds700 list asu start without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

    │   └───liblfds700
    │           lfds700_list_addonly_singlylinked.h


void lfds700_list_as_link_start( struct lfds700_list_as_state *lass,
                                 struct lfds700_list_as_element *lase,
                                 void *key,
                                 void *value,
                                 struct lfds700_liblfds_prng_state *ps );


struct lfds700_list_as_state *lass

A pointer to an initialized struct lfds700_list_as_state.

struct lfds700_list_as_element *lase

A pointer to a struct lfds700_list_as_element.

void *key

A void pointer of user data which will be used as the key for this element.

void *value

A void pointer of user data which will be used as the data for this element.

struct lfds700_liblfds_prng_state *ps

A pointer to an initialized struct lfds700_liblfds_prng_state.


This function sets key and value into lase, and then links lase as the start of the list.

If a list is ordered (which is to say, key_compare_function was passed into lfds700_list_as_init and only lfds700_list_as_link_ordered has been used to link new elements) and lfds700_list_as_link_start is used to insert an out-of-order element, then the list will be broken. You were warned.

See Also