aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/c-cpp.yml21
-rw-r--r--.travis.yml14
-rw-r--r--include/minishell.h5
m---------minishell_test0
-rw-r--r--src/eval/operation.c3
-rw-r--r--src/parser/parser.c4
6 files changed, 8 insertions, 39 deletions
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
deleted file mode 100644
index b93f06e..0000000
--- a/.github/workflows/c-cpp.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: C/C++ CI
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - name: libft
- run: git submodule update --init libft
- - name: make
- run: make
- - name: test
- run: ./minishell_test/run
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 934731a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: c
-python:
- - "3.6"
-
-compiler:
- - gcc
-
-before_script:
- - git submodule update --init libft
- - git submodule update --init minishell_test
-
-script:
- - make
- - cd minishell_test && ./run
diff --git a/include/minishell.h b/include/minishell.h
index b878f41..d205e29 100644
--- a/include/minishell.h
+++ b/include/minishell.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */
-/* Updated: 2020/10/09 13:45:24 by cacharle ### ########.fr */
+/* Updated: 2020/10/09 20:40:08 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -149,4 +149,7 @@ bool utils_strisblank(char *str);
bool setup(char *first_arg, t_env env);
+size_t interpolate(
+ char *str, size_t i, t_tok_lst **curr_addr, enum e_tok prev_tag, t_env env);
+
#endif
diff --git a/minishell_test b/minishell_test
-Subproject 9ce56e51327c1b8eb4ba09a3521ff9ff4079d28
+Subproject 9fe518540848f6c273fa749a06437aa7bb7459f
diff --git a/src/eval/operation.c b/src/eval/operation.c
index f1daa0b..826727a 100644
--- a/src/eval/operation.c
+++ b/src/eval/operation.c
@@ -6,7 +6,7 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/17 15:27:22 by charles #+# #+# */
-/* Updated: 2020/10/09 16:12:14 by cacharle ### ########.fr */
+/* Updated: 2020/10/09 20:39:33 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -69,6 +69,7 @@ int eval_pipeline(t_env env, t_ast *ast)
int pid;
pipes[PIPES_PREV_OUTPUT] = STDIN_FILENO;
+ pipes[FD_READ] = -1;
curr = ast->pipeline;
while (curr->next != NULL)
{
diff --git a/src/parser/parser.c b/src/parser/parser.c
index be71097..9493955 100644
--- a/src/parser/parser.c
+++ b/src/parser/parser.c
@@ -6,7 +6,7 @@
/* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/17 18:09:04 by nahaddac #+# #+# */
-/* Updated: 2020/10/09 16:10:31 by cacharle ### ########.fr */
+/* Updated: 2020/10/09 20:39:47 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -226,8 +226,8 @@ t_parsed *parse_expr(t_tok_lst *input)
tmp = parse_redir(input, &parsed->ast->redirs);
if (tmp == NULL || tmp->syntax_error)
return (tmp);
- free(tmp);
input = tmp->rest;
+ free(tmp);
}
parsed->rest = input;
return (parsed);