/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* env.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sede-san 1) { ft_eputendl("minishell: env: too many arguments"); return (EXIT_FAILURE); } print_env(msh); return (EXIT_SUCCESS); } static void print_entry( t_map_entry *entry ) { ft_putstr((char *)entry->key); ft_putchar('='); if (entry->value != NULL) ft_putstr((char *)entry->value); ft_putchar('\n'); } static void print_env( t_minishell *msh ) { t_list *entries; t_list *current; entries = ft_hashmap_entries(msh->variables.environment); current = entries; while (current != NULL) { print_entry((t_map_entry *)current->content); current = current->next; } ft_lstclear_nodes(&entries); }