This commit is contained in:
2025-02-13 13:37:18 +01:00
parent 9824c9d230
commit 561211f709
10 changed files with 94 additions and 68 deletions

View File

@ -6,22 +6,22 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/06 19:16:40 by tomoron #+# #+# */
/* Updated: 2024/12/09 17:45:45 by tomoron ### ########.fr */
/* Updated: 2024/12/10 18:18:03 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
#include "includes/malloc.h"
#include <stdio.h>
t_settings *get_settings()
t_settings *get_settings(void)
{
static t_settings settings;
char *str;
static t_settings settings;
char *str;
if(!settings.initialized)
if (!settings.initialized)
{
if (getenv("MALLOC_SHOW_LEAKS"))
settings.show_leaks = 0;
settings.show_leaks = 1;
str = getenv("MALLOC_DEBUG_LEVEL");
if (!str || !ft_strcmp(str, "NONE"))
settings.debug_level = 0;
@ -33,5 +33,5 @@ t_settings *get_settings()
settings.debug_level = 3;
settings.initialized = 1;
}
return(&settings);
return (&settings);
}