From a5b068767440327f910dfa815be12ff4c0d94309 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 19 Jan 2020 08:30:03 +0100 Subject: Added algo functions ft_qsort, ft_is_set, ft_memswap, ft_compar_int --- src/algo/ft_compar_int.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/algo/ft_compar_int.c (limited to 'src/algo/ft_compar_int.c') diff --git a/src/algo/ft_compar_int.c b/src/algo/ft_compar_int.c new file mode 100644 index 0000000..848dc71 --- /dev/null +++ b/src/algo/ft_compar_int.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_compar_int.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/01/19 08:24:43 by cacharle #+# #+# */ +/* Updated: 2020/01/19 08:27:38 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_compar_int(const void *a, const void *b) +{ + return (*(int*)a - *(int*)b); +} -- cgit