」 feat: Parsing working but not handling error

This commit is contained in:
2024-05-31 19:26:09 +02:00
parent 6bbdef9d7c
commit 5a71c50897
7 changed files with 57 additions and 32 deletions

View File

@ -6,23 +6,24 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/04 15:00:32 by adjoly #+# #+# */
/* Updated: 2024/05/30 16:31:04 by adjoly ### ########.fr */
/* Updated: 2024/05/31 12:57:18 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "parsing.h"
#include "libft.h"
/*t_cmd *split_cmd(char *cmd_av)
t_cmd *split_cmd(char *cmd_av, t_cmd *cmd)
{
char *tmp;
char **split;
char **tmp_split;
t_cmd *cmd;
split = ft_split(cmd_av, 32);
tmp_split = split;
cmd = ft_calloc(sizeof(t_cmd), 1);
cmd->cmd = ft_strdup(*tmp_split);
cmd->argv = tmp_split;
tmp = cmd_av;
split = ft_split(cmd_av, ' ');
cmd->cmd = ft_strdup(*split);
ft_free("a", &split);
while (*tmp && *tmp == ' ')
tmp++;
cmd->argv = ft_strdup(tmp);
return (cmd);
}*/
}