mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 08:41:58 +00:00
modified some files like all files in stack utils and adding main.c and modified atoi and parssing
This commit is contained in:
11
ft_atoi.c
11
ft_atoi.c
@@ -6,10 +6,19 @@
|
||||
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/12/08 18:28:17 by mteriier #+# #+# */
|
||||
/* Updated: 2025/12/08 18:30:28 by mteriier ### ########.fr */
|
||||
/* Updated: 2025/12/08 19:30:48 by mteriier ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static int calcul_sign(char c)
|
||||
{
|
||||
if (c == '-')
|
||||
return (-1);
|
||||
return (1);
|
||||
}
|
||||
|
||||
int ft_atoi(const char *nptr)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
Reference in New Issue
Block a user