🔨」 fix: fixed some things.

This commit is contained in:
2024-05-07 11:04:20 +02:00
parent cff9e40005
commit 44bcb15a33
7 changed files with 114 additions and 13 deletions

27
src/parsing/split_cmd.c Normal file
View File

@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* split_cmd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/04 15:00:32 by adjoly #+# #+# */
/* Updated: 2024/05/04 15:20:29 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "parsing.h"
#include "libft.h"
t_cmd split_cmd(char *cmd_av)
{
char **split;
char **tmp_split;
t_cmd cmd;
split = ft_split(cmd_av, 32);
tmp_split = split;
cmd.cmd = ft_strdup(*tmp_split);
cmd.argv = tmp_split;
return (cmd);
}