diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-04-26 19:18:11 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-04-28 21:57:58 +0200 |
commit | ab4685070515230c9aa64f9e69eec7fc061ee8d7 (patch) | |
tree | a051dd2237119d9094dff919bff6548536e67db6 /src/common/sort.h | |
parent | f09e36acfe2db50e0452ba1e19b13f4395a8d704 (diff) | |
download | blogc-ab4685070515230c9aa64f9e69eec7fc061ee8d7.tar.gz blogc-ab4685070515230c9aa64f9e69eec7fc061ee8d7.tar.bz2 blogc-ab4685070515230c9aa64f9e69eec7fc061ee8d7.zip |
common: added bc_slist_sort
Diffstat (limited to 'src/common/sort.h')
-rw-r--r-- | src/common/sort.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common/sort.h b/src/common/sort.h new file mode 100644 index 0000000..9f4dda2 --- /dev/null +++ b/src/common/sort.h @@ -0,0 +1,18 @@ +/* + * blogc: A blog compiler. + * Copyright (C) 2014-2019 Rafael G. Martins <rafael@rafaelmartins.eng.br> + * + * This program can be distributed under the terms of the BSD License. + * See the file LICENSE. + */ + +#ifndef _SORT_H +#define _SORT_H + +#include "utils.h" + +typedef int (*bc_sort_func_t) (const void *a, const void *b); + +bc_slist_t* bc_slist_sort(bc_slist_t *l, bc_sort_func_t cmp); + +#endif /* _SORT_H */ |