🏗️」 wip: __to_token nearly done

This commit is contained in:
2024-05-23 20:53:07 +02:00
parent ce0ef1d897
commit 6a8a6382bd
12 changed files with 305 additions and 60 deletions

BIN
libft/include/libft.h.gch Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/08 21:44:04 by mmoussou #+# #+# */
/* Updated: 2023/11/13 19:31:49 by mmoussou ### ########.fr */
/* Updated: 2024/05/22 11:35:58 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,7 +18,7 @@ void ft_lstclear(t_list **lst, void (*del)(void *))
if (!lst || !del)
return ;
while (*lst)
while (*lst && lst && del)
{
tmp = (*lst)->next;
ft_lstdelone(*lst, del);

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/03 19:35:01 by mmoussou #+# #+# */
/* Updated: 2024/05/16 17:36:58 by adjoly ### ########.fr */
/* Updated: 2024/05/23 20:01:55 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -41,7 +41,7 @@ char *ft_strjoin_free_s1(char *s1, const char *s2)
return (NULL);
ft_strlcpy(fstr, s1, ft_strlen(s1) + 1);
ft_strlcat(fstr, s2, ft_strlen(s1) + ft_strlen(s2) + 1);
if (s1)
if (*s1)
free(s1);
return (fstr);
}
@ -59,7 +59,7 @@ char *ft_strjoin_free_s2(const char *s1, char *s2)
return (NULL);
ft_strlcpy(fstr, s1, ft_strlen(s1) + 1);
ft_strlcat(fstr, s2, ft_strlen(s1) + ft_strlen(s2) + 1);
if (s2)
if (*s2)
free(s2);
return (fstr);
}
@ -77,9 +77,9 @@ char *ft_strjoin_free(char *s1, char *s2)
return (NULL);
ft_strlcpy(fstr, s1, ft_strlen(s1) + 1);
ft_strlcat(fstr, s2, ft_strlen(s1) + ft_strlen(s2) + 1);
if (s1)
if (*s1)
free(s1);
if (s2)
if (*s2)
free(s2);
return (fstr);
}