altered env. Added dummy function for cd, echo, setenv & unsetenv Started work on env copy feature
38 lines
1.4 KiB
C
38 lines
1.4 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* minishell.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2018/11/18 13:12:34 by tmaze #+# #+# */
|
|
/* Updated: 2019/09/20 14:36:35 by tmaze ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef MINISHELL_H
|
|
# define MINISHELL_H
|
|
|
|
# include <unistd.h>
|
|
# include <sys/stat.h>
|
|
# include "libft.h"
|
|
|
|
# define S_BIN 5
|
|
|
|
typedef struct s_builtin
|
|
{
|
|
char *cmd;
|
|
int (*f)(char **argv, t_list **env);
|
|
} t_builtin;
|
|
|
|
int cmd_env(char** argv, t_list** env);
|
|
int cmd_setenv(char** argv, t_list** env);
|
|
int cmd_unsetenv(char** argv, t_list** env);
|
|
int cmd_cd(char** argv, t_list** env);
|
|
int cmd_echo(char** argv, t_list** env);
|
|
|
|
void lstdelenvelem(void *content, size_t size);
|
|
t_list *env2lst(char **env);
|
|
|
|
#endif
|