forgot to stage file

This commit is contained in:
Jack Halford 2017-03-25 20:49:49 +01:00
parent 5c7a810fb1
commit 032a88e554
2 changed files with 37 additions and 10 deletions

View file

@ -1,10 +0,0 @@
41830 main.c 47 
41830 main.c 24 before readline
41830 readline.c 28 readline stind
41830 readline.c 30 after stdin
41830 main.c 26 after readline
41830 main.c 50 
41830 main.c 53 
41830 main.c 47 
41830 main.c 24 before readline
41830 readline.c 28 readline stind

View file

@ -0,0 +1,37 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* bt_env_opt.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/25 20:39:54 by jhalford #+# #+# */
/* Updated: 2017/03/25 20:41:58 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int bt_env_opt_i(char *opt_arg, t_env_data *data)
{
(void)opt_arg;
ft_tabdel(&data->custom_env);
return (0);
}
int bt_env_opt_u(char *opt_arg, t_env_data *data)
{
int i;
char **env;
if (!(env = data->custom_env))
return (0);
i = -1;
while (env[++i])
{
if (ft_strcmp(env[i], opt_arg) == '='
&& ft_strlen(opt_arg) == ft_strlenchr(env[i], '='))
ft_sstrdel(env, i);
}
return (0);
}