piscine-rush02/ex00/include/ft_linked_list.h

30 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_linked_list.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/01 15:25:59 by tischmid #+# #+# */
/* Updated: 2023/04/01 17:44:27 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_LINKED_LIST_H
# define FT_LINKED_LIST_H
typedef struct s_map_entry
{
char *key;
char *value;
struct s_map_entry *next;
} t_map_entry;
char *ll_map_get(t_map_entry *head, char *key);
void ll_map_push(t_map_entry *head, char *key, char *value);
void ll_clear(t_map_entry *head);
t_map_entry *ll_map_new_entry(char *key, char *value);
t_map_entry *ll_pop_last(t_map_entry *head);
#endif