aboutsummaryrefslogtreecommitdiff
path: root/functions_reference
diff options
context:
space:
mode:
Diffstat (limited to 'functions_reference')
-rw-r--r--functions_reference/ref_ft_atoi_base.c6
-rw-r--r--functions_reference/ref_ft_list_remove_if.c6
-rw-r--r--functions_reference/ref_ft_list_size.c6
-rw-r--r--functions_reference/ref_ft_list_sort.c6
4 files changed, 20 insertions, 4 deletions
diff --git a/functions_reference/ref_ft_atoi_base.c b/functions_reference/ref_ft_atoi_base.c
index 1599163..52dd92c 100644
--- a/functions_reference/ref_ft_atoi_base.c
+++ b/functions_reference/ref_ft_atoi_base.c
@@ -6,13 +6,15 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:20:16 by cacharle #+# #+# */
-/* Updated: 2020/04/13 15:00:33 by charles ### ########.fr */
+/* Updated: 2020/10/21 15:29:23 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include <ctype.h>
#include "libasm_test.h"
+#ifdef LIBASM_TEST_BONUS
+
static
bool valid_base(char *base)
{
@@ -54,3 +56,5 @@ int ref_ft_atoi_base(char *str, char *base)
}
return is_negative ? -nb : nb;
}
+
+#endif
diff --git a/functions_reference/ref_ft_list_remove_if.c b/functions_reference/ref_ft_list_remove_if.c
index 90bd1cc..c7a584f 100644
--- a/functions_reference/ref_ft_list_remove_if.c
+++ b/functions_reference/ref_ft_list_remove_if.c
@@ -6,12 +6,14 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:20:03 by cacharle #+# #+# */
-/* Updated: 2020/04/13 15:01:02 by charles ### ########.fr */
+/* Updated: 2020/10/21 15:28:59 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libasm_test.h"
+#ifdef LIBASM_TEST_BONUS
+
void ref_ft_list_remove_if(t_list **begin_list, void *data_ref,
int (*cmp)(), void (*free_fct)(void *))
{
@@ -30,3 +32,5 @@ void ref_ft_list_remove_if(t_list **begin_list, void *data_ref,
*begin_list = saved_next;
ref_ft_list_remove_if(begin_list, data_ref, cmp, free_fct);
}
+
+#endif
diff --git a/functions_reference/ref_ft_list_size.c b/functions_reference/ref_ft_list_size.c
index c403732..a76a472 100644
--- a/functions_reference/ref_ft_list_size.c
+++ b/functions_reference/ref_ft_list_size.c
@@ -6,12 +6,14 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:20:11 by cacharle #+# #+# */
-/* Updated: 2020/04/13 15:00:42 by charles ### ########.fr */
+/* Updated: 2020/10/21 15:28:41 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libasm_test.h"
+#ifdef LIBASM_TEST_BONUS
+
int ref_ft_list_size(t_list *begin_list)
{
int counter;
@@ -24,3 +26,5 @@ int ref_ft_list_size(t_list *begin_list)
}
return counter;
}
+
+#endif
diff --git a/functions_reference/ref_ft_list_sort.c b/functions_reference/ref_ft_list_sort.c
index d203231..08914b3 100644
--- a/functions_reference/ref_ft_list_sort.c
+++ b/functions_reference/ref_ft_list_sort.c
@@ -6,12 +6,14 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 02:49:28 by cacharle #+# #+# */
-/* Updated: 2020/04/13 15:00:52 by charles ### ########.fr */
+/* Updated: 2020/10/21 15:28:30 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libasm_test.h"
+#ifdef LIBASM_TEST_BONUS
+
static
t_list* merge_sorted_list(t_list* l1, t_list* l2, int (*cmp)(void *, void*))
{
@@ -57,3 +59,5 @@ void ref_ft_list_sort(t_list **begin_list, int (*cmp)(void *, void*))
ref_ft_list_sort(&middle, cmp);
*begin_list = merge_sorted_list(*begin_list, middle, cmp);
}
+
+#endif