mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
cmdlist_from_wordlist: make a copy of a wordlist
This commit is contained in:
parent
a79194de1a
commit
3778d0a7ee
4 changed files with 13 additions and 5 deletions
|
|
@ -19,6 +19,7 @@ int main(void)
|
|||
{
|
||||
t_wordlist *words = minishell_wordsplit("|");
|
||||
t_cmdlist *cmd = cmdlist_from_wordlist(words);
|
||||
wordlist_destroy(words);
|
||||
assert(cmd == NULL);
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/24 17:40:48 by khais #+# #+# */
|
||||
/* Updated: 2025/02/26 17:29:15 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/04 13:43:39 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -23,6 +23,7 @@ static t_cmdlist *parse_command_list(char *input)
|
|||
ft_dprintf(STDERR_FILENO, "Now checking command list with input [%s]\n", input);
|
||||
t_wordlist *words = minishell_wordsplit(input);
|
||||
t_cmdlist *cmd = cmdlist_from_wordlist(words);
|
||||
wordlist_destroy(words);
|
||||
return (cmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue