aboutsummaryrefslogtreecommitdiff
path: root/src/preprocess/filename.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-10 11:43:05 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-10 11:43:05 +0200
commitcccd4692fab390d0c4fbab3fcae7f4aa55ca9f1a (patch)
tree935f8aa5b19c780bdd7dbd7581dd067bad7b1eeb /src/preprocess/filename.c
parent5b681182824ae45b5a27d1503de32fa2760c5800 (diff)
downloadminishell-cccd4692fab390d0c4fbab3fcae7f4aa55ca9f1a.tar.gz
minishell-cccd4692fab390d0c4fbab3fcae7f4aa55ca9f1a.tar.bz2
minishell-cccd4692fab390d0c4fbab3fcae7f4aa55ca9f1a.zip
Added comment to preprocess, redir, setup, signal, eval_cmd and utils
Diffstat (limited to 'src/preprocess/filename.c')
-rw-r--r--src/preprocess/filename.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/preprocess/filename.c b/src/preprocess/filename.c
index 0470554..fa5c3d2 100644
--- a/src/preprocess/filename.c
+++ b/src/preprocess/filename.c
@@ -6,7 +6,7 @@
/* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/10/09 15:29:04 by cacharle #+# #+# */
-/* Updated: 2020/10/09 15:30:03 by cacharle ### ########.fr */
+/* Updated: 2020/10/10 10:49:50 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,6 +14,15 @@
#include "lexer.h"
#include "minishell.h"
+/*
+** \brief Preprocess the tokens of a filename
+** \param tokens List of sicked string tokens
+** \param env Environment
+** \param filename A pointer where to put the resulting filename
+** \return Return 0 on success, 1 on ambiguous redirect,
+** EVAL_FATAL if an allocation failed
+*/
+
int preprocess_filename(t_tok_lst **tokens, t_env env, char **filename)
{
char **strs;