piscine-rush02/ex00/main.c

41 lines
1.6 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/01 07:11:58 by tischmid #+# #+# */
/* Updated: 2023/04/01 17:20:50 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
#include "main.h"
#include "ft_strlib.h"
#include "argparse.h"
#include "ft_linked_list.h"
#include <stdio.h>
int main(int argc, char **argv)
{
char *str_nbr;
char *path;
// t_map_entry *map;
if (!parse_args(argc, argv, &path, &str_nbr))
return (puterr("Error\n", 1));
// if (!parse_dict(path, map))
// return (puterr("Dict Error\n", 2));
t_map_entry *head = ll_map_new_node("hello", "world");
ll_map_push(head, "hello2", "world2");
ll_map_push(head, "hello3", "world3");
ll_map_push(head, "hello4", "world4");
ll_map_push(head, "hello5", "world5");
ll_map_push(head, "hello6", "world6");
printf("%s\n", ll_map_get(head, "hello2"));
printf("%s\n", ll_map_get(head, "hello3"));
ll_clear(head);
return (0);
}