Function list_sort

Source
pub unsafe extern "C" fn list_sort(
    l: *mut list_t,
    versus: c_int,
) -> c_int
Expand description

sort list elements.

@warning Requires a comparator function to be set for the list.

Sorts the list in ascending or descending order as specified by the versus flag. The algorithm chooses autonomously what algorithm is best suited for sorting the list wrt its current status.

@param l list to operate @param versus positive: order small to big; negative: order big to small @return 0: sorting went OK non-0: errors happened

@see list_attributes_comparator()