aboutsummaryrefslogtreecommitdiff
path: root/include/libft_lst.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-30 22:26:36 +0200
committerCharles <sircharlesaze@gmail.com>2020-03-30 22:26:36 +0200
commit901402c99018422c994bdb297e3ba404969c88ea (patch)
tree98602c73a00af57fb7efcb36e4e3cbae2c0ce3a8 /include/libft_lst.h
parent40ed37c023627726a5c9c6928284e9f042dc0fa4 (diff)
downloadlibft-901402c99018422c994bdb297e3ba404969c88ea.tar.gz
libft-901402c99018422c994bdb297e3ba404969c88ea.tar.bz2
libft-901402c99018422c994bdb297e3ba404969c88ea.zip
Added documentation for ht and lst
Diffstat (limited to 'include/libft_lst.h')
-rw-r--r--include/libft_lst.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/include/libft_lst.h b/include/libft_lst.h
index 5669979..04b1dbf 100644
--- a/include/libft_lst.h
+++ b/include/libft_lst.h
@@ -13,29 +13,40 @@
#ifndef LIBFT_LST_H
# define LIBFT_LST_H
+/**
+** \file libft_lst.h
+** \brief Linked list Manipulation
+*/
+
# include <stdlib.h>
# include "libft_types.h"
# include "libft_algo.h"
+/**
+** \brief List struct
+** \param data Pointer to node data
+** \param next Pointer to next node or NULL if last node
+*/
+
typedef struct s_ftlst
{
- void *content;
+ void *data;
struct s_ftlst *next;
} t_ftlst;
-typedef void (*t_ftdel_func)(void *);
+typedef void (*t_ftdel_func)(void *);
-t_ftlst *ft_lstnew(void const *content);
-void ft_lstadd_front(t_ftlst **alst, t_ftlst *new);
+t_ftlst *ft_lstnew(void const *data);
int ft_lstsize(t_ftlst *lst);
+void ft_lstpush_front(t_ftlst **alst, t_ftlst *new);
+void ft_lstpush_back(t_ftlst **alst, t_ftlst *new);
+void ft_lstpop_front(t_ftlst **lst, void (*del)(void *));
t_ftlst *ft_lstlast(t_ftlst *lst);
-void ft_lstadd_back(t_ftlst **alst, t_ftlst *new);
void ft_lstdelone(t_ftlst *lst, void (*del)(void *));
-void ft_lstclear(t_ftlst **lst, void (*del)(void *));
+void ft_lstdestroy(t_ftlst **lst, void (*del)(void *));
void ft_lstiter(t_ftlst *lst, void (*f)(void *));
t_ftlst *ft_lstmap(t_ftlst *lst, void *(*f)(void *),
t_ftdel_func del);
-void ft_lstpop_front(t_ftlst **lst, void (*del)(void *));
t_ftlst *ft_lstreverse_ret(t_ftlst *lst);
void ft_lstreverse(t_ftlst **lst);
void ft_lstremove_if(t_ftlst **lst,