From c0e2ee28eedc1a9a886f9729a994d77738e2eb58 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 3 Apr 2020 15:13:08 +0200 Subject: Refactoring env, connecting pipes, preprocess draft --- include/minishell.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include/minishell.h') diff --git a/include/minishell.h b/include/minishell.h index ac00875..bc404d4 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */ -/* Updated: 2020/04/01 22:13:47 by charles ### ########.fr */ +/* Updated: 2020/04/03 14:24:34 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,6 +34,7 @@ # include "libft_lst.h" # include "libft_util.h" # include "libft_vec.h" +# include "libft_dstr.h" /* ** \brief Value of pipe entry if closed @@ -103,10 +104,20 @@ int builtin_unset(char **argv, t_env env); int builtin_env(char **argv, t_env env); int builtin_exit(char **argv, t_env env); +/* +** preprocess.c +*/ + +char *preprocess(char *input, t_env env); + /* ** util.c - various utilitary functions */ -void ht_del_str_entry(t_ftht_entry *entry); +int utils_directory_iter( + char *dirname, + void *param, + int (*f)(char*, struct dirent*, void*) + ); #endif -- cgit From db122618b7dd0e1c2b9432e3f470c880e0d4422e Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 4 Apr 2020 19:11:05 +0200 Subject: Glob logic mainly done --- include/minishell.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/minishell.h') diff --git a/include/minishell.h b/include/minishell.h index bc404d4..ed332c4 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */ -/* Updated: 2020/04/03 14:24:34 by charles ### ########.fr */ +/* Updated: 2020/04/04 14:50:21 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -108,6 +108,7 @@ int builtin_exit(char **argv, t_env env); ** preprocess.c */ +char *ms_glob(char *pattern); char *preprocess(char *input, t_env env); /* -- cgit From 4aeba6d2f03706fa21281709a138a7d3ea9797dc Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 5 Apr 2020 15:04:23 +0200 Subject: Preprocessing (glob and iterpolation) draft (not tested) --- include/minishell.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'include/minishell.h') diff --git a/include/minishell.h b/include/minishell.h index ed332c4..9551c1f 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */ -/* Updated: 2020/04/04 14:50:21 by charles ### ########.fr */ +/* Updated: 2020/04/05 14:52:20 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -71,6 +71,7 @@ t_path path_update(t_path path, char *path_var); t_env env_from_array(char **envp); char *env_search(t_env env, char *key); +char *env_search_first_match(t_env env, const char *haystack); /* ** builtin*.c - directory with all builtin commands @@ -108,17 +109,6 @@ int builtin_exit(char **argv, t_env env); ** preprocess.c */ -char *ms_glob(char *pattern); char *preprocess(char *input, t_env env); -/* -** util.c - various utilitary functions -*/ - -int utils_directory_iter( - char *dirname, - void *param, - int (*f)(char*, struct dirent*, void*) - ); - #endif -- cgit