summaryrefslogtreecommitdiffstats
path: root/src/ft_m_argv.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-25 16:40:34 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-25 16:40:34 +0200
commite42601eb5acc07417b217dfed4e9ab8cbb91794f (patch)
tree76e7dacd2e8d93012fecf2c29fcb4d14e6d1baed /src/ft_m_argv.c
parent(fd)>qwe fd agregation redir works (diff)
download42-minishell-e42601eb5acc07417b217dfed4e9ab8cbb91794f.tar.gz
42-minishell-e42601eb5acc07417b217dfed4e9ab8cbb91794f.tar.bz2
42-minishell-e42601eb5acc07417b217dfed4e9ab8cbb91794f.tar.xz
42-minishell-e42601eb5acc07417b217dfed4e9ab8cbb91794f.tar.zst
42-minishell-e42601eb5acc07417b217dfed4e9ab8cbb91794f.zip
Stupid bash rule
Diffstat (limited to '')
-rw-r--r--src/ft_m_argv.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/ft_m_argv.c b/src/ft_m_argv.c
new file mode 100644
index 0000000..a4da580
--- /dev/null
+++ b/src/ft_m_argv.c
@@ -0,0 +1,40 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_m_argv.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */
+/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
+#include <libft.h>
+#include <stdint.h>
+
+#include "ft_d_define.h"
+#include "ft_m_loop.h"
+#include "ft_s_struct.h"
+
+uint8_t
+ ft_m_argv(int argc,
+ const char *argv[],
+ t_msh *msh)
+{
+ int32_t i;
+
+ (void)argv;
+ if (argc == 1)
+ {
+ msh->ret = ft_m_loop(msh);
+ return (msh->ret);
+ }
+ i = 1;
+ while (i < argc)
+ {
+ /* if (ft_strncmp(*(argv + i), )) */
+ i++;
+ }
+ return (msh->ret);
+}