forgot to stage file
This commit is contained in:
parent
5c7a810fb1
commit
032a88e554
2 changed files with 37 additions and 10 deletions
10
42sh/STDUG
10
42sh/STDUG
|
|
@ -1,10 +0,0 @@
|
||||||
[7m[35m41830[33m main.c [1m[34m47 [0m[0m
|
|
||||||
[7m[35m41830[33m main.c [1m[34m24 [0mbefore readline[0m
|
|
||||||
[7m[35m41830[33m readline.c [1m[34m28 [0mreadline stind[0m
|
|
||||||
[7m[35m41830[33m readline.c [1m[34m30 [0mafter stdin[0m
|
|
||||||
[7m[35m41830[33m main.c [1m[34m26 [0mafter readline[0m
|
|
||||||
[7m[35m41830[33m main.c [1m[34m50 [0m[0m
|
|
||||||
[7m[35m41830[33m main.c [1m[34m53 [0m[0m
|
|
||||||
[7m[35m41830[33m main.c [1m[34m47 [0m[0m
|
|
||||||
[7m[35m41830[33m main.c [1m[34m24 [0mbefore readline[0m
|
|
||||||
[7m[35m41830[33m readline.c [1m[34m28 [0mreadline stind[0m
|
|
||||||
37
42sh/src/builtin/bt_env_get.c
Normal file
37
42sh/src/builtin/bt_env_get.c
Normal 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);
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue