purge ancien files et mise a jour libftH
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:15:42 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/25 14:16:15 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/11/25 14:34:19 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
** if necessary the function del is used to delete an element
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
** #include <libc.h>
|
||||
**
|
||||
**
|
||||
** typedef struct s_list
|
||||
** {
|
||||
** void *content;
|
||||
** struct s_list *next;
|
||||
** } t_list;
|
||||
**
|
||||
**
|
||||
** t_list *ft_lstnew(void *content)
|
||||
** {
|
||||
** t_list *lst;
|
||||
**
|
||||
**
|
||||
** if (!(lst = (t_list *)malloc(sizeof(*lst))))
|
||||
** return (NULL);
|
||||
** if (!content)
|
||||
@@ -37,11 +37,11 @@
|
||||
** lst->next = NULL;
|
||||
** return (lst);
|
||||
** }
|
||||
**
|
||||
**
|
||||
** void ft_lstadd_back(t_list **alst, t_list *new)
|
||||
** {
|
||||
** t_list *tmp;
|
||||
**
|
||||
**
|
||||
** if (alst)
|
||||
** {
|
||||
** tmp = *alst;
|
||||
@@ -56,26 +56,26 @@
|
||||
** new->next = NULL;
|
||||
** }
|
||||
** }
|
||||
**
|
||||
**
|
||||
** void *to_uppercase(void *element)
|
||||
** {
|
||||
** *(char*)(((t_list*)element)->content) -= 32;
|
||||
** return (element);
|
||||
** }
|
||||
**
|
||||
**
|
||||
** void ft_delete(void *element)
|
||||
** {
|
||||
** *(char*)element = '\0';
|
||||
** }
|
||||
**
|
||||
**
|
||||
** t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *));
|
||||
**
|
||||
**
|
||||
** int main(void)
|
||||
** {
|
||||
** t_list *toto;
|
||||
** void *(to_uppercase)(void *);
|
||||
** void (ft_delete)(void*);
|
||||
**
|
||||
**
|
||||
** toto = ft_lstnew("a");
|
||||
** toto->next = ft_lstnew("b");
|
||||
** toto->next->next = ft_lstnew("c");
|
||||
@@ -91,7 +91,7 @@
|
||||
** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next));
|
||||
** return (0);
|
||||
** }
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user