aboutsummaryrefslogtreecommitdiff
path: root/src/builtin/env.c
blob: 6b430c4334ab8931636be5028da62fd4ba9cc95c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   env.c                                              :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/01 17:10:32 by charles           #+#    #+#             */
/*   Updated: 2020/09/13 20:23:59 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

/*
** \file   env.c
** \brief  `env` builtin
*/

#include "minishell.h"

/*
** \brief       Print the environment variables (one on each line)
** \param argv  arguments
** \param env   environment
** \return      a status code or EVAL_FATAL on fatal error
*/

int		builtin_env(char **argv, t_env env)
{
	(void)argv;
	ft_veciter(env, (void (*)(void*))ft_putendl);
	return (0);
}