Added memorybook to parsing and cleaned most of the files
This commit is contained in:
24
libs/libft/srcs/ft_lstbegin.c
Normal file
24
libs/libft/srcs/ft_lstbegin.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstbegin.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: simplonco <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/03/24 15:05:21 by simplonco #+# #+# */
|
||||
/* Updated: 2022/05/04 14:17:27 by pblagoje ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
/*
|
||||
* return a pointer to the first element of a two-way list
|
||||
*/
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
t_list *ft_lstbegin(t_list *lst)
|
||||
{
|
||||
while (lst->prev)
|
||||
lst = lst->prev;
|
||||
return (lst);
|
||||
}
|
||||
Reference in New Issue
Block a user