clean
This commit is contained in:
@ -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.
@ -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
59
libftx/extra/ft_freer.c
Normal 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.
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.
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.
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libftx/libftx.a
BIN
libftx/libftx.a
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/09/26 14:47:54 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/01/08 12:36:24 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/01/08 18:07:49 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
int ft_printf(const char *format, ...);
|
||||
char *get_next_line(int fd);
|
||||
|
||||
void ft_freer_tab_ultimate(size_t len, ...);
|
||||
void ft_freer_ultimate(size_t len, ...);
|
||||
char *ft_strgen(char c, size_t len);
|
||||
int ft_is_in(char *str, char c);
|
||||
char **ft_tabrealloc(char **tab, size_t current_size, size_t new_size);
|
||||
|
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.
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.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user