mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-10 22:58:45 +02:00
「✨」 feat: Parsing working but not handling error
This commit is contained in:
@ -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);
|
||||
}*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user