mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 08:41:58 +00:00
finish the checker error
This commit is contained in:
28
checker/check_error.c
Normal file
28
checker/check_error.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* check_error.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/01/09 09:31:50 by mteriier #+# #+# */
|
||||
/* Updated: 2026/01/09 09:31:51 by mteriier ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "check_error.h"
|
||||
|
||||
int check_error(char **tab, int mod)
|
||||
{
|
||||
if (!verif_flag(tab, mod))
|
||||
return (0);
|
||||
if (!verif_is_digit(tab, mod))
|
||||
return (0);
|
||||
if (!verif_overflow(tab, mod))
|
||||
return (0);
|
||||
if (!verif_double(tab, mod))
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user