This commit is contained in:
Camille Chauvet
2023-01-08 18:08:41 +01:00
parent 650d9b1ab5
commit b5315e3a0a
375 changed files with 9 additions and 19711 deletions

View File

@ -6,13 +6,13 @@
# By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/09/27 08:39:27 by cchauvet #+# #+# #
# Updated: 2023/01/08 12:35:58 by cchauvet ### ########.fr #
# Updated: 2023/01/08 18:08:14 by cchauvet ### ########.fr #
# #
# **************************************************************************** #
CC = clang
SRCS = ft_strchri.c ft_strcmp.c ft_strfjoin.c ft_strmerger.c ft_strndup.c ft_tabrealloc.c ft_is_in.c ft_strgen.c
SRCS = ft_freer.c ft_is_in.c ft_strchri.c ft_strcmp.c ft_strfjoin.c ft_strgen.c ft_strmerger.c ft_strndup.c ft_tabrealloc.c
OBJS = $(SRCS:.c=.o)

Binary file not shown.

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/04 14:03:10 by cchauvet #+# #+# */
/* Updated: 2023/01/08 12:36:12 by cchauvet ### ########.fr */
/* Updated: 2023/01/08 18:08:06 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,6 +16,8 @@
# include <stdlib.h>
# include "../libft/libft.h"
void ft_freer_tab_ultimate(size_t len, ...);
void ft_freer_ultimate(size_t len, ...);
char *ft_strgen(char c, size_t len);
char *ft_strfjoin(char *s1, char *s2);
char *ft_strmerger(size_t arg_len, ...);

59
libftx/extra/ft_freer.c Normal file
View File

@ -0,0 +1,59 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_freer.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/08 15:01:40 by cchauvet #+# #+# */
/* Updated: 2023/01/08 15:39:31 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "solong.h"
void ft_freer_ultimate(size_t len, ...)
{
va_list va;
size_t i;
i = 0;
va_start(va, len);
while (i < len)
{
free(va_arg(va, char *));
i++;
}
va_end(va);
}
void ft_freer_tab(char **tab)
{
size_t i;
i = 0;
if (tab == NULL)
return ;
while (tab[i] != NULL)
{
free(tab[i]);
i++;
}
free(tab);
}
void ft_freer_tab_ultimate(size_t len, ...)
{
va_list va;
size_t i;
i = 0;
va_start(va, len);
while (i < len)
{
ft_freer_tab(va_arg(va, char **));
i++;
}
va_end(va);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.