to be debuged

This commit is contained in:
gazhonsepaskwa
2025-02-04 12:38:42 +01:00
parent a42eaf579a
commit eafa6c47b6
3 changed files with 78 additions and 33 deletions

View File

@@ -31,20 +31,20 @@ const char *translate_state(t_state state)
return (out);
}
const char *translate_redir(t_redir redir)
{
const char *out;
if (redir == _RED_L)
out = "redir : RED_L
";
else if (redir == _RED_R)
out = "redir : RED_R
";
else if (redir == _RED_DR)
out = "redir : _RED_DR 
";
else
out = "Not redirected 
";
return (out);
}
// const char *translate_redir(t_redir redir)
// {
// const char *out;
//
// if (redir == _RED_L)
// out = "redir : RED_L
";
// else if (redir == _RED_R)
// out = "redir : RED_R
";
// else if (redir == _RED_DR)
// out = "redir : _RED_DR 
";
// else
// out = "Not redirected 
";
// return (out);
// }
t_dio_node get_cmd_txt(t_ast_n *node)
{
@@ -59,9 +59,12 @@ t_dio_node get_cmd_txt(t_ast_n *node)
args = ft_tabstr(node->args);
txt.args = ft_sprintf("%s%s%s", NL, args, NL);
free(args);
txt.redir = translate_redir(node->redir);
txt.inf = ft_sprintf("Infile : %s%s", node->infile, NL);
txt.outf = ft_sprintf("Outfile : %s", node->outfile);
// txt.redir = translate_redir(node->redir);
// txt.inf = ft_sprintf("Infile : %s%s", node->infile, NL);
// txt.outf = ft_sprintf("Outfile : %s", node->outfile);
txt.redir = "";
txt.inf = ft_sprintf("Infile : UNCHECKED");
txt.outf = ft_sprintf("Outfile : UNCHECKED");
}
else
{