add MALLOC_DEBUG_LEVEL environment variable support

This commit is contained in:
2024-12-09 20:08:28 +01:00
parent 039d29f0d7
commit 9824c9d230
12 changed files with 205 additions and 19 deletions

View File

@ -6,7 +6,7 @@
# By: tomoron <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/28 00:35:01 by tomoron #+# #+# #
# Updated: 2024/12/03 15:26:54 by tomoron ### ########.fr #
# Updated: 2024/12/09 17:25:04 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -54,6 +54,7 @@ SRCS = ft_atoi.c\
ft_set_color.c\
ft_isspace.c\
ft_str_is_only_char.c\
ft_putulnbr.c
SRCS_BONUS = ft_lstnew.c\
ft_lstadd_front.c\

20
libft/ft_putulnbr.c Executable file
View File

@ -0,0 +1,20 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putulnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/09 17:24:29 by tomoron #+# #+# */
/* Updated: 2024/12/09 17:24:33 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putulnbr_fd(unsigned long nb, int fd)
{
if (nb >= 10)
ft_putulnbr_fd(nb / 10, fd);
ft_putchar_fd((nb % 10) + 48, fd);
}

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/30 16:55:48 by tomoron #+# #+# */
/* Updated: 2024/11/27 17:48:14 by tomoron ### ########.fr */
/* Updated: 2024/12/09 17:25:45 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -45,6 +45,7 @@ void ft_lstadd_front(t_list **lst, t_list *new);
char **ft_split(char const *str, char charset);
void ft_lstadd_back(t_list **lst, t_list *new);
char **ft_split_set(char *str, char *charset);
void ft_putulnbr_fd(unsigned long n, int fd);
int ft_str_is_only_char(char *str, char c);
void *ft_memset(void *s, int c, size_t n);
char *ft_get_color(int r, int g, int b);