From 4388cc2d74f1ee8930ca1baaeeea67da925f8a2c Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 13 Apr 2020 15:03:29 +0200 Subject: Added argument precsion in error message for all function but ft_strdup, Changed function prototype style --- functions_reference/ref_ft_atoi_base.c | 9 ++++----- functions_reference/ref_ft_list_push_front.c | 5 ++--- functions_reference/ref_ft_list_remove_if.c | 7 +++---- functions_reference/ref_ft_list_size.c | 5 ++--- functions_reference/ref_ft_list_sort.c | 9 ++++----- 5 files changed, 15 insertions(+), 20 deletions(-) (limited to 'functions_reference') diff --git a/functions_reference/ref_ft_atoi_base.c b/functions_reference/ref_ft_atoi_base.c index 6bd7052..1599163 100644 --- a/functions_reference/ref_ft_atoi_base.c +++ b/functions_reference/ref_ft_atoi_base.c @@ -6,15 +6,15 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 03:20:16 by cacharle #+# #+# */ -/* Updated: 2020/02/08 03:20:18 by cacharle ### ########.fr */ +/* Updated: 2020/04/13 15:00:33 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include #include "libasm_test.h" -static bool -valid_base(char *base) +static +bool valid_base(char *base) { if (strlen(base) < 2) return false; @@ -30,8 +30,7 @@ valid_base(char *base) return true; } -int -ref_ft_atoi_base(char *str, char *base) +int ref_ft_atoi_base(char *str, char *base) { long int nb; int radix; diff --git a/functions_reference/ref_ft_list_push_front.c b/functions_reference/ref_ft_list_push_front.c index 78b0877..9f796a4 100644 --- a/functions_reference/ref_ft_list_push_front.c +++ b/functions_reference/ref_ft_list_push_front.c @@ -6,14 +6,13 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 03:20:23 by cacharle #+# #+# */ -/* Updated: 2020/02/08 03:20:24 by cacharle ### ########.fr */ +/* Updated: 2020/04/13 15:01:09 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include "libasm_test.h" -void -ref_ft_list_push_front(t_list **begin_list, void *data) +void ref_ft_list_push_front(t_list **begin_list, void *data) { if (begin_list == NULL) return ; diff --git a/functions_reference/ref_ft_list_remove_if.c b/functions_reference/ref_ft_list_remove_if.c index c99cbea..90bd1cc 100644 --- a/functions_reference/ref_ft_list_remove_if.c +++ b/functions_reference/ref_ft_list_remove_if.c @@ -6,15 +6,14 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 03:20:03 by cacharle #+# #+# */ -/* Updated: 2020/02/08 20:02:25 by cacharle ### ########.fr */ +/* Updated: 2020/04/13 15:01:02 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include "libasm_test.h" -void -ref_ft_list_remove_if(t_list **begin_list, void *data_ref, - int (*cmp)(), void (*free_fct)(void *)) +void ref_ft_list_remove_if(t_list **begin_list, void *data_ref, + int (*cmp)(), void (*free_fct)(void *)) { t_list *saved_next; diff --git a/functions_reference/ref_ft_list_size.c b/functions_reference/ref_ft_list_size.c index c6348ba..c403732 100644 --- a/functions_reference/ref_ft_list_size.c +++ b/functions_reference/ref_ft_list_size.c @@ -6,14 +6,13 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 03:20:11 by cacharle #+# #+# */ -/* Updated: 2020/02/08 03:20:12 by cacharle ### ########.fr */ +/* Updated: 2020/04/13 15:00:42 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include "libasm_test.h" -int -ref_ft_list_size(t_list *begin_list) +int ref_ft_list_size(t_list *begin_list) { int counter; diff --git a/functions_reference/ref_ft_list_sort.c b/functions_reference/ref_ft_list_sort.c index e770fa0..d203231 100644 --- a/functions_reference/ref_ft_list_sort.c +++ b/functions_reference/ref_ft_list_sort.c @@ -6,14 +6,14 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 02:49:28 by cacharle #+# #+# */ -/* Updated: 2020/02/08 02:49:29 by cacharle ### ########.fr */ +/* Updated: 2020/04/13 15:00:52 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #include "libasm_test.h" -static t_list* -merge_sorted_list(t_list* l1, t_list* l2, int (*cmp)(void *, void*)) +static +t_list* merge_sorted_list(t_list* l1, t_list* l2, int (*cmp)(void *, void*)) { t_list *merged = 0x0; @@ -34,8 +34,7 @@ merge_sorted_list(t_list* l1, t_list* l2, int (*cmp)(void *, void*)) return merged; } -void -ref_ft_list_sort(t_list **begin_list, int (*cmp)(void *, void*)) +void ref_ft_list_sort(t_list **begin_list, int (*cmp)(void *, void*)) { if (begin_list == 0x0 || *begin_list == 0x0 || (*begin_list)->next == 0x0) -- cgit