
Go to the source code of this file.
Data Structures | |
| struct | __alpm_list_t |
| Linked list type used by libalpm. More... | |
Defines | |
| #define | FREELIST(p) do { alpm_list_free_inner(p, free); alpm_list_free(p); p = NULL; } while(0) |
Typedefs | |
| typedef struct __alpm_list_t | alpm_list_t |
| typedef void(* | alpm_list_fn_free )(void *) |
| typedef int(* | alpm_list_fn_cmp )(const void *, const void *) |
Functions | |
| alpm_list_t * | alpm_list_new (void) |
| Allocate a new alpm_list_t. | |
| void | alpm_list_free (alpm_list_t *list) |
| Free a list, but not the contained data. | |
| void | alpm_list_free_inner (alpm_list_t *list, alpm_list_fn_free fn) |
| Free the internal data of a list structure. | |
| alpm_list_t * | alpm_list_add (alpm_list_t *list, void *data) |
| Add a new item to the end of the list. | |
| alpm_list_t * | alpm_list_add_sorted (alpm_list_t *list, void *data, alpm_list_fn_cmp fn) |
| Add items to a list in sorted order. | |
| alpm_list_t * | alpm_list_join (alpm_list_t *first, alpm_list_t *second) |
| Join two lists. The two lists must be independent. Do not free the original lists after calling this function, as this is not a copy operation. The list pointers passed in should be considered invalid after calling this function. | |
| alpm_list_t * | alpm_list_mmerge (alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn) |
| Merge the two sorted sublists into one sorted list. | |
| alpm_list_t * | alpm_list_msort (alpm_list_t *list, int n, alpm_list_fn_cmp fn) |
| Sort a list of size `n` using mergesort algorithm. | |
| alpm_list_t * | alpm_list_remove (alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data) |
| Remove an item from the list. | |
| alpm_list_t * | alpm_list_remove_dupes (const alpm_list_t *list) |
| Create a new list without any duplicates. | |
| alpm_list_t * | alpm_list_strdup (const alpm_list_t *list) |
| Copy a string list, including data. | |
| alpm_list_t * | alpm_list_copy (const alpm_list_t *list) |
| Copy a list, without copying data. | |
| alpm_list_t * | alpm_list_copy_data (const alpm_list_t *list, size_t size) |
| Copy a list and copy the data. Note that the data elements to be copied should not contain pointers and should also be of constant size. | |
| alpm_list_t * | alpm_list_reverse (alpm_list_t *list) |
| Create a new list in reverse order. | |
| alpm_list_t * | alpm_list_first (const alpm_list_t *list) |
| Get the first element of a list. | |
| alpm_list_t * | alpm_list_nth (const alpm_list_t *list, int n) |
| Return nth element from list (starting from 0). | |
| alpm_list_t * | alpm_list_next (const alpm_list_t *list) |
| Get the next element of a list. | |
| alpm_list_t * | alpm_list_last (const alpm_list_t *list) |
| Get the last item in the list. | |
| void * | alpm_list_getdata (const alpm_list_t *entry) |
| Get the data member of a list node. | |
| int | alpm_list_count (const alpm_list_t *list) |
| Get the number of items in a list. | |
| void * | alpm_list_find (const alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn) |
| Find an item in a list. | |
| void * | alpm_list_find_ptr (const alpm_list_t *haystack, const void *needle) |
| Find an item in a list. | |
| char * | alpm_list_find_str (const alpm_list_t *haystack, const char *needle) |
| Find a string in a list. | |
| alpm_list_t * | alpm_list_diff (const alpm_list_t *lhs, const alpm_list_t *rhs, alpm_list_fn_cmp fn) |
| Find the items in list `lhs` that are not present in list `rhs`. | |
| #define FREELIST | ( | p | ) | do { alpm_list_free_inner(p, free); alpm_list_free(p); p = NULL; } while(0) |
Definition at line 42 of file alpm_list.h.
Referenced by _alpm_add_prepare(), _alpm_db_find_fileconflicts(), _alpm_db_free_grpcache(), _alpm_grp_free(), _alpm_handle_free(), _alpm_pkg_free(), _alpm_pkg_load(), _alpm_remove_prepare(), _alpm_resolvedeps(), _alpm_sync_commit(), _alpm_sync_prepare(), _alpm_trans_free(), alpm_db_setserver(), alpm_db_unregister_all(), alpm_db_update(), alpm_option_set_cachedirs(), alpm_option_set_holdpkgs(), alpm_option_set_ignoregrps(), alpm_option_set_ignorepkgs(), alpm_option_set_noextracts(), alpm_option_set_noupgrades(), cb_trans_progress(), display_targets(), dump_pkg_full(), pacman_add(), and pacman_remove().
| typedef int(* alpm_list_fn_cmp)(const void *, const void *) |
Definition at line 45 of file alpm_list.h.
| typedef void(* alpm_list_fn_free)(void *) |
Definition at line 44 of file alpm_list.h.
| typedef struct __alpm_list_t alpm_list_t |
1.5.4