lfds700_list_as_link_start

From liblfds.org
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Source Files

└───liblfds700
    ├───inc
    │   └───liblfds700
    │           lfds700_list_addonly_singlylinked.h
    └───src
        └───llfds700_list_addonly_singlylinked
                lfds700_list_addonly_singlylinked_link.c

Prototype

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 );

Parameters

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.

Notes

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