From b6e9b9e5e67bb104889f97e3b791a4e5f4ef9ee4 Mon Sep 17 00:00:00 2001 From: Hugo LAMY Date: Mon, 25 Nov 2019 14:17:42 +0100 Subject: [PATCH] remis les header des toutes les fonctions --- srcs/bonus/ft_dl.c | 99 ------------------------------------ srcs/bonus/ft_lstadd_back.c | 32 +++++------- srcs/bonus/ft_lstadd_front.c | 16 ++++++ srcs/bonus/ft_lstclear.c | 27 +++++----- srcs/bonus/ft_lstdelone.c | 26 +++++----- srcs/bonus/ft_lstiter.c | 32 +++++------- srcs/bonus/ft_lstlast.c | 16 ++++++ srcs/bonus/ft_lstmap.c | 32 +++++------- srcs/bonus/ft_lstnew.c | 26 +++++----- srcs/bonus/ft_lstsize.c | 20 +------- srcs/part1/ft_atoi.c | 4 +- srcs/part1/ft_bzero.c | 4 +- srcs/part1/ft_calloc.c | 4 +- srcs/part1/ft_isalnum.c | 4 +- srcs/part1/ft_isalpha.c | 4 +- srcs/part1/ft_isascii.c | 4 +- srcs/part1/ft_isdigit.c | 4 +- srcs/part1/ft_isprint.c | 4 +- srcs/part1/ft_memchr.c | 4 +- srcs/part1/ft_memcmp.c | 4 +- srcs/part1/ft_memcpy.c | 4 +- srcs/part1/ft_memmove.c | 4 +- srcs/part1/ft_memset.c | 4 +- srcs/part1/ft_strchr.c | 4 +- srcs/part1/ft_strdup.c | 4 +- srcs/part1/ft_strlcat.c | 6 +-- srcs/part1/ft_strlcpy.c | 6 +-- srcs/part1/ft_strlen.c | 4 +- srcs/part1/ft_strncmp.c | 4 +- srcs/part1/ft_strnstr.c | 4 +- srcs/part1/ft_strrchr.c | 4 +- srcs/part1/ft_tolower.c | 4 +- srcs/part1/ft_toupper.c | 4 +- srcs/part2/ft_itoa.c | 8 +-- srcs/part2/ft_putchar_fd.c | 4 +- srcs/part2/ft_putendl_fd.c | 4 +- srcs/part2/ft_putnbr_fd.c | 4 +- srcs/part2/ft_putstr_fd.c | 4 +- srcs/part2/ft_split.c | 6 +-- srcs/part2/ft_strjoin.c | 4 +- srcs/part2/ft_strmapi.c | 12 +++++ srcs/part2/ft_strtrim.c | 12 +++++ srcs/part2/ft_substr.c | 12 +++++ 43 files changed, 207 insertions(+), 285 deletions(-) delete mode 100644 srcs/bonus/ft_dl.c diff --git a/srcs/bonus/ft_dl.c b/srcs/bonus/ft_dl.c deleted file mode 100644 index ccdd0ef..0000000 --- a/srcs/bonus/ft_dl.c +++ /dev/null @@ -1,99 +0,0 @@ - -#include - -typedef struct s_list -{ - void *content; - struct s_list *next; -} t_list; - -void *ft_memcpy(void *dst, const void *src, size_t n) -{ - size_t i; - char *ptr; - char *ptr2; - - ptr = (char *)dst; - ptr2 = (char *)src; - i = -1; - while (++i < n) - ptr[i] = ptr2[i]; - return (dst); -} - -t_list *ft_lstnew(void *content) -{ - t_list *lst; - - if (!(lst = (t_list *)malloc(sizeof(*lst)))) - return (NULL); - if (!content) - lst->content = NULL; - else - { - if (!(lst->content = malloc(sizeof(content)))) - return (NULL); - ft_memcpy(lst->content, content, sizeof(content)); - } - lst->next = NULL; - return (lst); -} - -void ft_lstadd_back(t_list **alst, t_list *new) -{ - t_list *tmp; - - if (alst) - { - tmp = *alst; - if (!tmp) - *alst = new; - else - { - while (tmp->next) - tmp = tmp->next; - tmp->next = new; - } - new->next = NULL; - } -} - - - - -//############################################################################## - -void ft_delete(void *element) -{ - *(char*)element = '\0'; -} - -void ft_lstdelone(t_list *lst, void (*del)(void *)); - -int main(void) -{ - t_list *toto; - void (ft_delete)(void*); - - toto = ft_lstnew("a"); - toto->next = ft_lstnew("b"); - toto->next->next = ft_lstnew("c"); - printf("toto->data :%c\n",*(char*)(toto->content)); - printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); - printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); - printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); - ft_lstdelone(toto->next, ft_delete); - printf("----------------------\n"); - printf("toto->data :%c\n",*(char*)(toto->content)); - printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); - printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); - printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); - return (0); -} - -void ft_lstdelone(t_list *lst, void (*del)(void *)) -{ - del(lst->content); - free(lst); - lst = NULL; -} diff --git a/srcs/bonus/ft_lstadd_back.c b/srcs/bonus/ft_lstadd_back.c index 2c7eec9..401595b 100644 --- a/srcs/bonus/ft_lstadd_back.c +++ b/srcs/bonus/ft_lstadd_back.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstadd_back.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:11:53 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:11:57 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** add an element to the end of a list ** or first if list has no element so far @@ -12,20 +24,6 @@ ** struct s_list *next; ** } t_list; ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** t_list *ft_lstnew(void *content) ** { ** t_list *lst; @@ -35,11 +33,7 @@ ** if (!content) ** lst->content = NULL; ** else -** { -** if (!(lst->content = malloc(sizeof(content)))) -** return (NULL); -** ft_memcpy(lst->content, content, sizeof(content)); -** } +** lst->content = content; ** lst->next = NULL; ** return (lst); ** } diff --git a/srcs/bonus/ft_lstadd_front.c b/srcs/bonus/ft_lstadd_front.c index c5e1384..71b238a 100644 --- a/srcs/bonus/ft_lstadd_front.c +++ b/srcs/bonus/ft_lstadd_front.c @@ -1,3 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstadd_front.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:12:02 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:13:14 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** add an element to the begining of a list +*/ + /* ** #include ** diff --git a/srcs/bonus/ft_lstclear.c b/srcs/bonus/ft_lstclear.c index 5106fd7..8ef1ea1 100644 --- a/srcs/bonus/ft_lstclear.c +++ b/srcs/bonus/ft_lstclear.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstclear.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:13:30 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:13:49 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** delete and free an element of the list and all the followings */ @@ -11,20 +23,6 @@ ** struct s_list *next; ** } t_list; ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** t_list *ft_lstnew(void *content) ** { ** t_list *lst; @@ -102,4 +100,3 @@ void ft_lstclear(t_list **lst, void (*del)(void *)) ft_lstclear(&(*lst)->next, del); ft_lstdelone(*lst, del); } - diff --git a/srcs/bonus/ft_lstdelone.c b/srcs/bonus/ft_lstdelone.c index b18ef54..15e1393 100644 --- a/srcs/bonus/ft_lstdelone.c +++ b/srcs/bonus/ft_lstdelone.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstdelone.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:14:03 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:14:05 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** free an element and delete its content with del ** next is not free @@ -12,20 +24,6 @@ ** struct s_list *next; ** } t_list; ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** t_list *ft_lstnew(void *content) ** { ** t_list *lst; diff --git a/srcs/bonus/ft_lstiter.c b/srcs/bonus/ft_lstiter.c index 9da910e..9cbaf51 100644 --- a/srcs/bonus/ft_lstiter.c +++ b/srcs/bonus/ft_lstiter.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstiter.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:14:11 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:14:29 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** go through all elements of the list and apply the function f to each of them */ @@ -11,20 +23,6 @@ ** struct s_list *next; ** } t_list; ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** t_list *ft_lstnew(void *content) ** { ** t_list *lst; @@ -34,11 +32,7 @@ ** if (!content) ** lst->content = NULL; ** else -** { -** if (!(lst->content = malloc(sizeof(content)))) -** return (NULL); -** ft_memcpy(lst->content, content, sizeof(content)); -** } +** lst->content = content; ** lst->next = NULL; ** return (lst); ** } diff --git a/srcs/bonus/ft_lstlast.c b/srcs/bonus/ft_lstlast.c index 15e6fc4..590ee4b 100644 --- a/srcs/bonus/ft_lstlast.c +++ b/srcs/bonus/ft_lstlast.c @@ -1,3 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstlast.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:14:49 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:15:36 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return a pointer to the last element of a list +*/ + /* ** #include ** diff --git a/srcs/bonus/ft_lstmap.c b/srcs/bonus/ft_lstmap.c index 98b854e..3508037 100644 --- a/srcs/bonus/ft_lstmap.c +++ b/srcs/bonus/ft_lstmap.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstmap.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:15:42 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:16:15 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** iterate trhough linked list and apply to each element a function f ** if necessary the function del is used to delete an element @@ -12,20 +24,6 @@ ** struct s_list *next; ** } t_list; ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** t_list *ft_lstnew(void *content) ** { ** t_list *lst; @@ -35,11 +33,7 @@ ** if (!content) ** lst->content = NULL; ** else -** { -** if (!(lst->content = malloc(sizeof(content)))) -** return (NULL); -** ft_memcpy(lst->content, content, sizeof(content)); -** } +** lst->content = content; ** lst->next = NULL; ** return (lst); ** } diff --git a/srcs/bonus/ft_lstnew.c b/srcs/bonus/ft_lstnew.c index 061f428..966290d 100644 --- a/srcs/bonus/ft_lstnew.c +++ b/srcs/bonus/ft_lstnew.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstnew.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:16:20 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:16:30 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** create a new list */ @@ -5,20 +17,6 @@ /* ** #include ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** typedef struct s_list ** { ** void *content; diff --git a/srcs/bonus/ft_lstsize.c b/srcs/bonus/ft_lstsize.c index 3dae147..cedcdb9 100644 --- a/srcs/bonus/ft_lstsize.c +++ b/srcs/bonus/ft_lstsize.c @@ -7,20 +7,6 @@ ** struct s_list *next; ** } t_list; ** -** void *ft_memcpy(void *dst, const void *src, size_t n) -** { -** size_t i; -** char *ptr; -** char *ptr2; -** -** ptr = (char *)dst; -** ptr2 = (char *)src; -** i = -1; -** while (++i < n) -** ptr[i] = ptr2[i]; -** return (dst); -** } -** ** t_list *ft_lstnew(void *content) ** { ** t_list *lst; @@ -30,11 +16,7 @@ ** if (!content) ** lst->content = NULL; ** else -** { -** if (!(lst->content = malloc(sizeof(content)))) -** return (NULL); -** ft_memcpy(lst->content, content, sizeof(content)); -** } +** lst->content = content; ** lst->next = NULL; ** return (lst); ** } diff --git a/srcs/part1/ft_atoi.c b/srcs/part1/ft_atoi.c index 5c10b59..74da199 100644 --- a/srcs/part1/ft_atoi.c +++ b/srcs/part1/ft_atoi.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:09:04 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:38:12 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:54:29 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:54:35 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_bzero.c b/srcs/part1/ft_bzero.c index ed2c7eb..f66336a 100644 --- a/srcs/part1/ft_bzero.c +++ b/srcs/part1/ft_bzero.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:09:19 by hulamy #+# #+# */ -/* Updated: 2018/11/15 21:43:05 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:54:43 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:54:44 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_calloc.c b/srcs/part1/ft_calloc.c index d6a9d4b..f44d0bd 100644 --- a/srcs/part1/ft_calloc.c +++ b/srcs/part1/ft_calloc.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 14:56:09 by hulamy #+# #+# */ -/* Updated: 2019/11/19 19:27:38 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:54:53 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:54:57 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_isalnum.c b/srcs/part1/ft_isalnum.c index 21bfad0..dc1bb03 100644 --- a/srcs/part1/ft_isalnum.c +++ b/srcs/part1/ft_isalnum.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:09:33 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:09:37 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:55:05 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:06 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_isalpha.c b/srcs/part1/ft_isalpha.c index b754b0b..e0ec883 100644 --- a/srcs/part1/ft_isalpha.c +++ b/srcs/part1/ft_isalpha.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:09:44 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:09:46 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:55:15 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:17 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_isascii.c b/srcs/part1/ft_isascii.c index 054f504..f201880 100644 --- a/srcs/part1/ft_isascii.c +++ b/srcs/part1/ft_isascii.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:09:53 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:09:55 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:55:24 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:25 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_isdigit.c b/srcs/part1/ft_isdigit.c index 1dd5840..69e0809 100644 --- a/srcs/part1/ft_isdigit.c +++ b/srcs/part1/ft_isdigit.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:10:01 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:10:05 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:55:32 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:33 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_isprint.c b/srcs/part1/ft_isprint.c index f45cbaf..21395ab 100644 --- a/srcs/part1/ft_isprint.c +++ b/srcs/part1/ft_isprint.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:10:19 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:10:20 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:55:43 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:44 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_memchr.c b/srcs/part1/ft_memchr.c index f6254ed..ab61ff4 100644 --- a/srcs/part1/ft_memchr.c +++ b/srcs/part1/ft_memchr.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:12:32 by hulamy #+# #+# */ -/* Updated: 2019/04/03 15:43:14 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:55:51 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:54 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_memcmp.c b/srcs/part1/ft_memcmp.c index d881cba..c05a028 100644 --- a/srcs/part1/ft_memcmp.c +++ b/srcs/part1/ft_memcmp.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:13:04 by hulamy #+# #+# */ -/* Updated: 2019/04/03 15:43:41 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:56:05 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:07 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_memcpy.c b/srcs/part1/ft_memcpy.c index d21a57c..489857d 100644 --- a/srcs/part1/ft_memcpy.c +++ b/srcs/part1/ft_memcpy.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:13:17 by hulamy #+# #+# */ -/* Updated: 2019/04/03 15:43:56 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:56:16 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:17 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_memmove.c b/srcs/part1/ft_memmove.c index 51af09b..5ff017c 100644 --- a/srcs/part1/ft_memmove.c +++ b/srcs/part1/ft_memmove.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:13:34 by hulamy #+# #+# */ -/* Updated: 2019/04/03 15:44:28 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:56:25 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:29 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_memset.c b/srcs/part1/ft_memset.c index b3df393..10c2d7c 100644 --- a/srcs/part1/ft_memset.c +++ b/srcs/part1/ft_memset.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:13:41 by hulamy #+# #+# */ -/* Updated: 2019/04/03 15:44:44 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:56:37 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:38 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_strchr.c b/srcs/part1/ft_strchr.c index 095c87e..b220565 100644 --- a/srcs/part1/ft_strchr.c +++ b/srcs/part1/ft_strchr.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:15:48 by hulamy #+# #+# */ -/* Updated: 2019/04/16 17:28:46 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:56:46 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:47 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_strdup.c b/srcs/part1/ft_strdup.c index 6fc8594..b917ac9 100644 --- a/srcs/part1/ft_strdup.c +++ b/srcs/part1/ft_strdup.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:16:32 by hulamy #+# #+# */ -/* Updated: 2019/03/25 15:20:22 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:56:54 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:55 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_strlcat.c b/srcs/part1/ft_strlcat.c index 7499b22..d81994f 100644 --- a/srcs/part1/ft_strlcat.c +++ b/srcs/part1/ft_strlcat.c @@ -5,15 +5,13 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 15:09:51 by hulamy #+# #+# */ -/* Updated: 2019/11/19 18:18:30 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:57:02 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:57:05 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ /* ** append src to sized dest and return size of final dest -** -** TESTS : */ /* diff --git a/srcs/part1/ft_strlcpy.c b/srcs/part1/ft_strlcpy.c index d6284a2..f784918 100644 --- a/srcs/part1/ft_strlcpy.c +++ b/srcs/part1/ft_strlcpy.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 15:10:04 by hulamy #+# #+# */ -/* Updated: 2019/11/19 18:18:54 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:57:19 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:57:22 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,8 +14,6 @@ ** copy size - 1 length of src into dest, ** terminate it with a '\0' ** and return size of src -** -** TESTS : */ /* diff --git a/srcs/part1/ft_strlen.c b/srcs/part1/ft_strlen.c index 59cc818..8af143b 100644 --- a/srcs/part1/ft_strlen.c +++ b/srcs/part1/ft_strlen.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:17:32 by hulamy #+# #+# */ -/* Updated: 2019/03/25 15:23:00 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:57:48 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:57:49 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_strncmp.c b/srcs/part1/ft_strncmp.c index 5d51c2d..7022624 100644 --- a/srcs/part1/ft_strncmp.c +++ b/srcs/part1/ft_strncmp.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:18:34 by hulamy #+# #+# */ -/* Updated: 2019/03/25 15:24:35 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:57:59 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:00 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_strnstr.c b/srcs/part1/ft_strnstr.c index 5dbb8c0..52ff0d2 100644 --- a/srcs/part1/ft_strnstr.c +++ b/srcs/part1/ft_strnstr.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:19:16 by hulamy #+# #+# */ -/* Updated: 2019/03/25 15:25:57 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:58:10 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:11 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_strrchr.c b/srcs/part1/ft_strrchr.c index 012535a..1c8faa8 100644 --- a/srcs/part1/ft_strrchr.c +++ b/srcs/part1/ft_strrchr.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 19:35:39 by hulamy #+# #+# */ -/* Updated: 2019/11/19 19:35:45 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:58:20 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:21 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_tolower.c b/srcs/part1/ft_tolower.c index e8f2b0f..2cd5cb6 100644 --- a/srcs/part1/ft_tolower.c +++ b/srcs/part1/ft_tolower.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:20:19 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:20:20 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:58:30 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:32 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part1/ft_toupper.c b/srcs/part1/ft_toupper.c index e0e0271..cc842a5 100644 --- a/srcs/part1/ft_toupper.c +++ b/srcs/part1/ft_toupper.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:20:26 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:20:27 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:58:39 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:43 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_itoa.c b/srcs/part2/ft_itoa.c index 5875144..0baf45d 100644 --- a/srcs/part2/ft_itoa.c +++ b/srcs/part2/ft_itoa.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:10:25 by hulamy #+# #+# */ -/* Updated: 2019/11/25 11:57:23 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:59:01 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:21 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -27,10 +27,10 @@ ** } ** return 0; ** } -** -** #include "libft.h" */ +#include "libft.h" + char *ft_itoa(int n) { char *str; diff --git a/srcs/part2/ft_putchar_fd.c b/srcs/part2/ft_putchar_fd.c index e12e154..a48c1d5 100644 --- a/srcs/part2/ft_putchar_fd.c +++ b/srcs/part2/ft_putchar_fd.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:14:14 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:14:15 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:59:40 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:42 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_putendl_fd.c b/srcs/part2/ft_putendl_fd.c index 2f82783..5a0ef44 100644 --- a/srcs/part2/ft_putendl_fd.c +++ b/srcs/part2/ft_putendl_fd.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 18:38:05 by hulamy #+# #+# */ -/* Updated: 2019/11/19 18:39:05 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:59:47 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:48 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_putnbr_fd.c b/srcs/part2/ft_putnbr_fd.c index 66a4a9d..afc9e85 100644 --- a/srcs/part2/ft_putnbr_fd.c +++ b/srcs/part2/ft_putnbr_fd.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:15:09 by hulamy #+# #+# */ -/* Updated: 2018/11/14 21:15:10 by hulamy ### ########.fr */ +/* Created: 2019/11/25 13:59:56 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:57 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_putstr_fd.c b/srcs/part2/ft_putstr_fd.c index 42719e5..cf6ad12 100644 --- a/srcs/part2/ft_putstr_fd.c +++ b/srcs/part2/ft_putstr_fd.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 18:35:48 by hulamy #+# #+# */ -/* Updated: 2019/11/19 18:37:07 by hulamy ### ########.fr */ +/* Created: 2019/11/25 14:00:04 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:00:05 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_split.c b/srcs/part2/ft_split.c index caa1c5d..67dca63 100644 --- a/srcs/part2/ft_split.c +++ b/srcs/part2/ft_split.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2019/11/19 18:22:41 by hulamy #+# #+# */ -/* Updated: 2019/11/19 18:28:01 by hulamy ### ########.fr */ +/* Created: 2019/11/25 14:00:13 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:01:09 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,7 +33,7 @@ static int ft_count_word(char const *s, char c) return (len); } -char **ft_strsplit(char const *s, char c) +char **ft_split(char const *s, char c) { char **array; int i; diff --git a/srcs/part2/ft_strjoin.c b/srcs/part2/ft_strjoin.c index 48f95a1..a325582 100644 --- a/srcs/part2/ft_strjoin.c +++ b/srcs/part2/ft_strjoin.c @@ -5,8 +5,8 @@ /* +:+ +:+ +:+ */ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2018/11/14 21:17:12 by hulamy #+# #+# */ -/* Updated: 2019/03/25 15:31:03 by hulamy ### ########.fr */ +/* Created: 2019/11/25 14:01:26 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:01:34 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_strmapi.c b/srcs/part2/ft_strmapi.c index 6b04fa9..f68be73 100644 --- a/srcs/part2/ft_strmapi.c +++ b/srcs/part2/ft_strmapi.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strmapi.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:01:40 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:01:45 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** create a new array with the result of function f on every element of ** s by index i diff --git a/srcs/part2/ft_strtrim.c b/srcs/part2/ft_strtrim.c index 46a345d..881db23 100644 --- a/srcs/part2/ft_strtrim.c +++ b/srcs/part2/ft_strtrim.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strtrim.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:01:49 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:01:54 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** create a copy of s without the firsts and lasts empty characters */ diff --git a/srcs/part2/ft_substr.c b/srcs/part2/ft_substr.c index 7d9d90b..189ba2c 100644 --- a/srcs/part2/ft_substr.c +++ b/srcs/part2/ft_substr.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_substr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:01:58 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:02:01 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + /* ** create a copy of a portion of s, begining at start and of length len */