diff options
| author | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-24 08:02:55 +0200 |
|---|---|---|
| committer | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-24 08:02:55 +0200 |
| commit | e7acdc820fefa41ae00a7c776388e3d17250a2e9 (patch) | |
| tree | 5604e51c0008088f25b2f5dfb9143a852dd079dd /c12/ex05 | |
| parent | 454d82f30e354e2629563822bac637e5eaa8e4ff (diff) | |
| download | piscine-e7acdc820fefa41ae00a7c776388e3d17250a2e9.tar.gz piscine-e7acdc820fefa41ae00a7c776388e3d17250a2e9.tar.bz2 piscine-e7acdc820fefa41ae00a7c776388e3d17250a2e9.zip | |
c12 passed, c13 start
Diffstat (limited to 'c12/ex05')
| -rw-r--r-- | c12/ex05/ft_list.h | 6 | ||||
| -rw-r--r-- | c12/ex05/ft_list_push_strs.c | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/c12/ex05/ft_list.h b/c12/ex05/ft_list.h index 8b736b4..b5a05a2 100644 --- a/c12/ex05/ft_list.h +++ b/c12/ex05/ft_list.h @@ -6,12 +6,12 @@ /* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/09 14:33:17 by cacharle #+# #+# */ -/* Updated: 2019/07/09 14:42:55 by cacharle ### ########.fr */ +/* Updated: 2019/07/23 15:19:36 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef FT_LIST_H -#define FT_LIST_H +# define FT_LIST_H typedef struct s_list { @@ -19,6 +19,6 @@ typedef struct s_list void *data; } t_list; -t_list *ft_create_elem(void *data); +t_list *ft_create_elem(void *data); #endif diff --git a/c12/ex05/ft_list_push_strs.c b/c12/ex05/ft_list_push_strs.c index e56cd18..43c24a7 100644 --- a/c12/ex05/ft_list_push_strs.c +++ b/c12/ex05/ft_list_push_strs.c @@ -6,13 +6,14 @@ /* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/09 17:18:23 by cacharle #+# #+# */ -/* Updated: 2019/07/17 18:34:23 by cacharle ### ########.fr */ +/* Updated: 2019/07/23 15:42:33 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ +#include <stdlib.h> #include "ft_list.h" -void list_push_front(t_list **begin_list, void *data) +static void push_front(t_list **begin_list, void *data) { t_list *new_front; @@ -21,14 +22,14 @@ void list_push_front(t_list **begin_list, void *data) *begin_list = new_front; } -t_list *ft_list_push_strs(int size, char **strs) +t_list *ft_list_push_strs(int size, char **strs) { - int i; + int i; t_list *list; list = NULL; i = 0; while (i < size) - list_push_front(&list, strs[i++]); + push_front(&list, strs[i++]); return (list); } |
