|
myMPD
Internal API documentation
|
Linked list merge sort implementation. More...
#include <stdbool.h>

Go to the source code of this file.
Typedefs | |
| typedef bool(* | list_sort_callback) (struct t_list_node *current, struct t_list_node *next, enum list_sort_direction direction) |
Enumerations | |
| enum | list_sort_direction { LIST_SORT_ASC = 0 , LIST_SORT_DESC = 1 } |
Functions | |
| bool | list_sort_by_callback (struct t_list *l, enum list_sort_direction direction, list_sort_callback sort_cb) |
| bool | list_sort_by_value_i (struct t_list *l, enum list_sort_direction direction) |
| bool | list_sort_by_value_p (struct t_list *l, enum list_sort_direction direction) |
| bool | list_sort_by_key (struct t_list *l, enum list_sort_direction direction) |
Linked list merge sort implementation.
| typedef bool(* list_sort_callback) (struct t_list_node *current, struct t_list_node *next, enum list_sort_direction direction) |
Definition of sort callback
| enum list_sort_direction |
Sort direction
| bool list_sort_by_callback | ( | struct t_list * | l, |
| enum list_sort_direction | direction, | ||
| list_sort_callback | sort_cb ) |
The list sorting function. Uses bottom-up merge sort algorithm.
| l | pointer to list to sort |
| direction | sort direction |
| sort_cb | compare function |
| bool list_sort_by_key | ( | struct t_list * | l, |
| enum list_sort_direction | direction ) |
Sorts the list by key. It uses the merge sort algorithm.
| l | pointer to list to sort |
| direction | sort direction |
| bool list_sort_by_value_i | ( | struct t_list * | l, |
| enum list_sort_direction | direction ) |
Sorts the list by value_i. It uses the merge sort algorithm.
| l | pointer to list to sort |
| direction | sort direction |
| bool list_sort_by_value_p | ( | struct t_list * | l, |
| enum list_sort_direction | direction ) |
Sorts the list by value_p. It uses the merge sort algorithm.
| l | pointer to list to sort |
| direction | sort direction |