debut du parsing :(

This commit is contained in:
Tom Moron
2024-02-06 22:23:32 +01:00
parent c13f32bf42
commit 9b80cc758f
11 changed files with 314 additions and 66 deletions

View File

@ -1,13 +1,13 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* */
/* ::: :::::::: */
/* ft_strjoin.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/24 18:06:14 by tomoron #+# #+# */
/* Updated: 2023/11/02 10:26:09 by tomoron ### ########.fr */
/* */
/* +:+ +:+ +:+ */
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/24 18:06:14 by tomoron #+# #+# */
/* Updated: 2024/02/03 22:47:27 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
@ -61,3 +61,15 @@ char *ft_strjoin(char const *s1, char const *s2)
res[j] = 0;
return (res);
}
char *ft_strjoin_free(char *s1, char *s2, int free_flags)
{
char *res;
res = ft_strjoin(s1, s2);
if (free_flags == 1 || free_flags == 3)
free(s1);
if (free_flags == 2 || free_flags == 3)
free(s2);
return (res);
}