From c98de126d2252fe47dc2a9094a5f9a8fa6b4b60a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 11 Oct 2020 15:52:52 +0200 Subject: Removing libft/minishell_test submodules, Removing subject/README/etc --- libft/src/algo/ft_compar_int.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 libft/src/algo/ft_compar_int.c (limited to 'libft/src/algo/ft_compar_int.c') diff --git a/libft/src/algo/ft_compar_int.c b/libft/src/algo/ft_compar_int.c new file mode 100644 index 0000000..ab057bf --- /dev/null +++ b/libft/src/algo/ft_compar_int.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_compar_int.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/01/19 08:24:43 by cacharle #+# #+# */ +/* Updated: 2020/04/04 22:30:09 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +/* +** \brief Comparison function for 2 ints +** \param a Pointer to first int +** \param b Pointer to first int +** \return The difference between a and b +*/ + +int ft_compar_int(const void *a, const void *b) +{ + return (*(int*)a - *(int*)b); +} -- cgit