-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvec_sort.c
21 lines (19 loc) · 1.08 KB
/
vec_sort.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vec_sort.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: alischyn <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/25 17:27:15 by alischyn #+# #+# */
/* Updated: 2017/03/25 17:53:06 by alischyn ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "vec.h"
void vec_sort_qsort(t_vec *vec,
int (*compare)(const void *, const void *))
{
if (vec->length >= 2)
qsort(vec->data, vec->length, sizeof(void *), compare);
}