diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-12-21 20:42:08 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-12-21 20:42:08 -0500 |
commit | 91c102a897467ff1bae345458ccf096e32e7bd15 (patch) | |
tree | 104c612d08afef1566c9b56f962641bb39c0dc1b /include/list.h | |
parent | Merge pull request #391 from mikkeloscar/trigger-workspace-ipc (diff) | |
parent | replace non-standard qsort_r with qsort (diff) | |
download | sway-91c102a897467ff1bae345458ccf096e32e7bd15.tar.gz sway-91c102a897467ff1bae345458ccf096e32e7bd15.tar.zst sway-91c102a897467ff1bae345458ccf096e32e7bd15.zip |
Merge pull request #393 from robotanarchy/musl-libc-compatibility
musl libc compatibility
Diffstat (limited to 'include/list.h')
-rw-r--r-- | include/list.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/list.h b/include/list.h index 90d0ad36..d18d3f54 100644 --- a/include/list.h +++ b/include/list.h | |||
@@ -13,8 +13,9 @@ void list_add(list_t *list, void *item); | |||
13 | void list_insert(list_t *list, int index, void *item); | 13 | void list_insert(list_t *list, int index, void *item); |
14 | void list_del(list_t *list, int index); | 14 | void list_del(list_t *list, int index); |
15 | void list_cat(list_t *list, list_t *source); | 15 | void list_cat(list_t *list, list_t *source); |
16 | // See qsort | 16 | // See qsort. Remember to use *_qsort functions as compare functions, |
17 | void list_sort(list_t *list, int compare(const void *left, const void *right)); | 17 | // because they dereference the left and right arguments first! |
18 | void list_qsort(list_t *list, int compare(const void *left, const void *right)); | ||
18 | // Return index for first item in list that returns 0 for given compare | 19 | // Return index for first item in list that returns 0 for given compare |
19 | // function or -1 if none matches. | 20 | // function or -1 if none matches. |
20 | int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to); | 21 | int list_seq_find(list_t *list, int compare(const void *item, const void *cmp_to), const void *cmp_to); |