aboutsummaryrefslogtreecommitdiff
path: root/functions_reference
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-04-13 15:03:29 +0200
committerCharles <sircharlesaze@gmail.com>2020-04-13 15:03:29 +0200
commit4388cc2d74f1ee8930ca1baaeeea67da925f8a2c (patch)
tree5feee2181fc8875d22ccb1dacdc0710f23bd9169 /functions_reference
parent1eb2d4832a590c809e38840f970b4506661c89cf (diff)
downloadlibasm_test-4388cc2d74f1ee8930ca1baaeeea67da925f8a2c.tar.gz
libasm_test-4388cc2d74f1ee8930ca1baaeeea67da925f8a2c.tar.bz2
libasm_test-4388cc2d74f1ee8930ca1baaeeea67da925f8a2c.zip
Added argument precsion in error message for all function but ft_strdup, Changed function prototype style
Diffstat (limited to 'functions_reference')
-rw-r--r--functions_reference/ref_ft_atoi_base.c9
-rw-r--r--functions_reference/ref_ft_list_push_front.c5
-rw-r--r--functions_reference/ref_ft_list_remove_if.c7
-rw-r--r--functions_reference/ref_ft_list_size.c5
-rw-r--r--functions_reference/ref_ft_list_sort.c9
5 files changed, 15 insertions, 20 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <ctype.h>
#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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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)