purge ancien files et mise a jour libftH
This commit is contained in:
@@ -1,16 +1,32 @@
|
||||
/*
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstsize.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:31:48 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/25 14:32:30 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
/*
|
||||
** return the size of the linked list
|
||||
*/
|
||||
|
||||
/*
|
||||
** #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)
|
||||
@@ -20,21 +36,21 @@
|
||||
** lst->next = NULL;
|
||||
** return (lst);
|
||||
** }
|
||||
**
|
||||
**
|
||||
** void ft_lstadd_front(t_list **alst, t_list *new)
|
||||
** {
|
||||
** new->next = *alst;
|
||||
** *alst = new;
|
||||
** }
|
||||
**
|
||||
**
|
||||
** int ft_lstsize(t_list *lst);
|
||||
**
|
||||
**
|
||||
** int main(void)
|
||||
** {
|
||||
** char tresor;
|
||||
** t_list *toto;
|
||||
** t_list *tmp;
|
||||
**
|
||||
**
|
||||
** tresor = 'a';
|
||||
** toto = ft_lstnew(&tresor);
|
||||
** tresor = 'b';
|
||||
@@ -52,7 +68,7 @@
|
||||
** printf("toto->nxt->nxt->dqta:%c\n",*(char*)(toto->next->next->content));
|
||||
** return (0);
|
||||
** }
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user