diff options
author | taiyu <taiyu.len@gmail.com> | 2015-09-08 08:54:57 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-09-08 08:54:57 -0700 |
commit | d673a72705ea29afe58784b3ce169fb5bde73c11 (patch) | |
tree | 09e819fcc2bd305c5c0844d0e9401d24602771a1 /sway/list.c | |
parent | 936e4ca2883669dfb35d3c2ecb7ec79ded00ea78 (diff) |
set variable changes
Diffstat (limited to 'sway/list.c')
-rw-r--r-- | sway/list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/list.c b/sway/list.c index 1be1e17c..45efc16f 100644 --- a/sway/list.c +++ b/sway/list.c @@ -49,3 +49,7 @@ void list_cat(list_t *list, list_t *source) { list_add(list, source->items[i]); } } + +void list_sort(list_t *list, int compare(const void *left, const void *right)) { + qsort(list->items, list->length, sizeof(void *), compare); +} |