mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 11:26:51 +01:00
「🔨」 fix: fixed some things.
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/07/03 10:50:52 by mmoussou #+# #+# */
|
/* Created: 2024/07/03 10:50:52 by mmoussou #+# #+# */
|
||||||
/* Updated: 2024/07/04 10:09:03 by mmoussou ### ########.fr */
|
/* Updated: 2024/07/04 12:08:01 by mmoussou ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -120,23 +120,23 @@ int format_quotes_cmd(t_cmd *cmd)
|
|||||||
char *new_cmd;
|
char *new_cmd;
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
printf("before : %s\n", cmd->cmd);
|
//printf("before : %s\n", cmd->cmd);
|
||||||
new_cmd = format_quotes_string(cmd->cmd);
|
new_cmd = format_quotes_string(cmd->cmd);
|
||||||
if (!new_cmd)
|
if (!new_cmd)
|
||||||
return (-1);
|
return (-1);
|
||||||
free(cmd->cmd);
|
free(cmd->cmd);
|
||||||
cmd->cmd = new_cmd;
|
cmd->cmd = new_cmd;
|
||||||
printf("after : %s\n", cmd->cmd);
|
//printf("after : %s\n", cmd->cmd);
|
||||||
i = 0;
|
i = 0;
|
||||||
while (cmd->argv[i])
|
while (cmd->argv[i])
|
||||||
{
|
{
|
||||||
printf("before : %s\n", cmd->argv[i]);
|
//printf("before : %s\n", cmd->argv[i]);
|
||||||
new_cmd = format_quotes_string(cmd->argv[i]);
|
new_cmd = format_quotes_string(cmd->argv[i]);
|
||||||
if (!new_cmd)
|
if (!new_cmd)
|
||||||
return (-1);
|
return (-1);
|
||||||
free(cmd->argv[i]);
|
free(cmd->argv[i]);
|
||||||
cmd->argv[i] = new_cmd;
|
cmd->argv[i] = new_cmd;
|
||||||
printf("after : %s\n", cmd->argv[i]);
|
//printf("after : %s\n", cmd->argv[i]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
@ -144,7 +144,7 @@ int format_quotes_cmd(t_cmd *cmd)
|
|||||||
|
|
||||||
int format_quotes(t_list *list_cmd)
|
int format_quotes(t_list *list_cmd)
|
||||||
{
|
{
|
||||||
printf("aled\n");
|
//printf("aled\n");
|
||||||
if (!list_cmd)
|
if (!list_cmd)
|
||||||
return (0);
|
return (0);
|
||||||
while (list_cmd)
|
while (list_cmd)
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/04/24 11:18:04 by adjoly #+# #+# */
|
/* Created: 2024/04/24 11:18:04 by adjoly #+# #+# */
|
||||||
/* Updated: 2024/07/04 10:49:59 by mmoussou ### ########.fr */
|
/* Updated: 2024/07/04 12:07:26 by mmoussou ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ int main(int ac, char **av, char **env)
|
|||||||
if (check_pipe(test))
|
if (check_pipe(test))
|
||||||
continue ;
|
continue ;
|
||||||
piped = tokenizer(test);
|
piped = tokenizer(test);
|
||||||
if (check_redir(((t_token *)(piped->content))->redirection))
|
if (check_argv(((t_token *)(piped->content))->redirection))
|
||||||
continue ;
|
continue ;
|
||||||
cmd_list = get_cmd_list(piped);
|
cmd_list = get_cmd_list(piped);
|
||||||
format_quotes(cmd_list);
|
format_quotes(cmd_list);
|
||||||
|
Reference in New Issue
Block a user