From e451a1f0508c9c332ca31a5bed8cf25487b78df9 Mon Sep 17 00:00:00 2001 From: LuckyLaszlo Date: Wed, 13 Oct 2021 16:11:13 +0200 Subject: [PATCH] arg_test program + comment libncurses-dev install --- headers/minishell.h | 4 ++-- tests/arg_test.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/arg_test.c diff --git a/headers/minishell.h b/headers/minishell.h index 31dbb1c..47ea867 100644 --- a/headers/minishell.h +++ b/headers/minishell.h @@ -6,7 +6,7 @@ /* By: lperrey +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/03 19:14:46 by lperrey #+# #+# */ -/* Updated: 2021/10/10 03:37:29 by lperrey ### ########.fr */ +/* Updated: 2021/10/13 16:09:32 by lperrey ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,7 +26,7 @@ # include # include # include -# include +# include // sudo apt install libncurses-dev (OR libncurses5-dev) # include # include diff --git a/tests/arg_test.c b/tests/arg_test.c new file mode 100644 index 0000000..3bcd1cc --- /dev/null +++ b/tests/arg_test.c @@ -0,0 +1,16 @@ + +# include + +int main(int argc, char *argv[], char *envp[]) +{ + int i; + + printf("argc = %i\n", argc); + i = 0; + while (argv[i]) + { + printf("argv[%i] = |%s|\n", i, argv[i]); + i++; + } + return (0); +}