fix: TODO and FIXME in the files
This commit is contained in:
parent
79405df39d
commit
446a7655b6
3 changed files with 6 additions and 10 deletions
|
@ -6,14 +6,14 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/18 13:41:32 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/06/18 13:43:42 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/06/25 15:42:54 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef COOL_READLINE_H
|
||||
# define COOL_READLINE_H
|
||||
|
||||
// Same than readline, but (TODO)
|
||||
// Same than readline, but do not echo control characters like '^C'
|
||||
char *cool_readline(const char *prompt);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/06/21 16:22:20 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/06/25 15:43:15 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -50,7 +50,6 @@ typedef struct s_pipes
|
|||
// If error, return a t_command wth the value .error = true.
|
||||
t_command parse_command(t_env *env, const char *command);
|
||||
|
||||
// TODO reorganize
|
||||
const char *variables_get(t_list *variables, const char *name);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/24 13:48:00 by jschaft #+# #+# */
|
||||
/* Updated: 2024/06/25 13:40:07 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/06/25 15:45:58 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -43,8 +43,7 @@ static void close_all_pipes(t_exec_command_global *global)
|
|||
// Execute a program with specific stdin and stdout:
|
||||
// - inout[0] is stdin
|
||||
// - inout[0] is stdout
|
||||
// If call.program doesn't start with "./" or "/", find the program in $PATH.
|
||||
// (TODO)
|
||||
// If call.program doesn't have any '/' in it, find the program in $PATH.
|
||||
// If the program wasn't to found in $PATH, or the fork didn't work,
|
||||
// write the error and return the error status.
|
||||
static int execute_call(
|
||||
|
@ -58,8 +57,7 @@ static int execute_call(
|
|||
call.program);
|
||||
if (!program_path)
|
||||
return (minishell_error(str_join(fatal_error, global->mc,
|
||||
"command not found: ", str_join(fatal_error, global->mc,
|
||||
call.program, "\n"))), 127);
|
||||
"command not found: ", call.program)), 127);
|
||||
pid = fork();
|
||||
if (pid < 0)
|
||||
return (minishell_error("errno"), errno);
|
||||
|
@ -113,7 +111,6 @@ static int exec_each_call(t_exec_command_global *global,
|
|||
return (r);
|
||||
}
|
||||
|
||||
// FIXME line jump if command not found
|
||||
int execute_command(t_env *env, t_command command)
|
||||
{
|
||||
t_exec_command_global global;
|
||||
|
|
Loading…
Add table
Reference in a new issue