Started from buttom go to the sky

This commit is contained in:
Raphaël 2024-04-28 19:59:01 +02:00
parent 96215449bd
commit f811e55dea
4781 changed files with 10121 additions and 1743 deletions

View file

@ -0,0 +1,31 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* mem_compare.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/06 11:16:02 by maiboyer #+# #+# */
/* Updated: 2023/12/09 15:00:58 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/mem/mem_compare.h"
t_i32 mem_compare(const void *lhs, const void *rhs, t_usize count)
{
t_usize i;
t_u8 *lhs_;
t_u8 *rhs_;
i = 0;
lhs_ = (t_u8 *)lhs;
rhs_ = (t_u8 *)rhs;
while (i < count)
{
if (lhs_[i] - rhs_[i])
return ((t_i32)(lhs_[i] - rhs_[i]));
i++;
}
return (0);
}