34 lines
1.4 KiB
C
34 lines
1.4 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/04/01 07:11:58 by tischmid #+# #+# */
|
|
/* Updated: 2023/04/01 21:45:18 by tischmid ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "main.h"
|
|
#include "ft_strlib.h"
|
|
#include "argparse.h"
|
|
#include "dictparse.h"
|
|
#include "ft_linked_list.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));
|
|
map = ll_map_new_entry("about", "Dict for the data from the .dict file");
|
|
if (!parse_dict(path, map))
|
|
return (puterr("Dict Error\n", 2));
|
|
printf("%s\n", ll_map_get(map, "20"));
|
|
ll_clear(map, 1);
|
|
return (0);
|
|
}
|