docs: Adding the doxygen on all my function

This commit is contained in:
Raphael 2024-10-31 18:16:00 +01:00
parent 707e9a4177
commit f5bcbeac3c
38 changed files with 342 additions and 43 deletions

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:39:56 by rparodi #+# #+# */
/* Updated: 2023/11/12 17:11:53 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:29:37 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Add the list new to the back of chained list of lst
*
* @param lst first element of the list
* @param new The element to add at the end
*/
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *tempo;

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:40:16 by rparodi #+# #+# */
/* Updated: 2023/11/12 17:14:33 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:30:01 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Add the list new to the front of chained list of lst
*
* @param lst first element of the list
* @param new The element to add at the start
*/
void ft_lstadd_front(t_list **lst, t_list *new)
{
if (*lst == NULL)

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:40:37 by rparodi #+# #+# */
/* Updated: 2023/11/12 19:34:19 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:32:23 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Clear the all list with the function
*
* @param lst the start of the chained list
* @param del the function to clear the list
*/
void ft_lstclear(t_list **lst, void (*del)(void *))
{
t_list *tempo;

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:42:11 by rparodi #+# #+# */
/* Updated: 2023/11/12 18:10:40 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:46:00 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Clear the element of the list with the function
*
* @param lst the element of the list to be clear
* @param del the function to clear the list
*/
void ft_lstdelone(t_list *lst, void (*del)(void *))
{
del(lst->content);

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:42:24 by rparodi #+# #+# */
/* Updated: 2023/11/12 18:07:02 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:46:55 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Apply the function given in arguments at all the element of the list
*
* @param lst the chained list
* @param f the pointer to function
*/
void ft_lstiter(t_list *lst, void (*f)(void *))
{
while (lst != NULL)

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:42:54 by rparodi #+# #+# */
/* Updated: 2023/11/12 17:25:48 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:48:08 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Found the last element of the chained list
*
* @param lst the chained list
* @return the last element of the chained list
*/
t_list *ft_lstlast(t_list *lst)
{
if (lst == NULL)

View file

@ -6,12 +6,20 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:43:28 by rparodi #+# #+# */
/* Updated: 2023/11/12 19:28:02 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:51:38 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Create an other list from an old one with a function on all element
*
* @param lst the chained list
* @param f the function to function to iterate
* @param del The function to delete the old list
* @return
*/
t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *))
{
t_list *tempo;

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:44:02 by rparodi #+# #+# */
/* Updated: 2023/11/12 14:25:12 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:52:24 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Allocate a new list with the first element
*
* @param content the element to give on first element
* @return the new list
*/
t_list *ft_lstnew(void *content)
{
t_list *to_return;

View file

@ -6,12 +6,18 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:44:24 by rparodi #+# #+# */
/* Updated: 2023/11/13 12:22:02 by rparodi ### ########.fr */
/* Updated: 2024/10/31 17:53:11 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Give the size of the chained list
*
* @param lst the chained list
* @return the size of the list
*/
int ft_lstsize(t_list *lst)
{
int count;