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> +#+ +:+ +#+ */
|
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/06/18 13:41:32 by mcolonna #+# #+# */
|
/* 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
|
#ifndef COOL_READLINE_H
|
||||||
# define 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);
|
char *cool_readline(const char *prompt);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
|
/* 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.
|
// If error, return a t_command wth the value .error = true.
|
||||||
t_command parse_command(t_env *env, const char *command);
|
t_command parse_command(t_env *env, const char *command);
|
||||||
|
|
||||||
// TODO reorganize
|
|
||||||
const char *variables_get(t_list *variables, const char *name);
|
const char *variables_get(t_list *variables, const char *name);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/04/24 13:48:00 by jschaft #+# #+# */
|
/* 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:
|
// Execute a program with specific stdin and stdout:
|
||||||
// - inout[0] is stdin
|
// - inout[0] is stdin
|
||||||
// - inout[0] is stdout
|
// - inout[0] is stdout
|
||||||
// If call.program doesn't start with "./" or "/", find the program in $PATH.
|
// If call.program doesn't have any '/' in it, find the program in $PATH.
|
||||||
// (TODO)
|
|
||||||
// If the program wasn't to found in $PATH, or the fork didn't work,
|
// If the program wasn't to found in $PATH, or the fork didn't work,
|
||||||
// write the error and return the error status.
|
// write the error and return the error status.
|
||||||
static int execute_call(
|
static int execute_call(
|
||||||
|
@ -58,8 +57,7 @@ static int execute_call(
|
||||||
call.program);
|
call.program);
|
||||||
if (!program_path)
|
if (!program_path)
|
||||||
return (minishell_error(str_join(fatal_error, global->mc,
|
return (minishell_error(str_join(fatal_error, global->mc,
|
||||||
"command not found: ", str_join(fatal_error, global->mc,
|
"command not found: ", call.program)), 127);
|
||||||
call.program, "\n"))), 127);
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid < 0)
|
if (pid < 0)
|
||||||
return (minishell_error("errno"), errno);
|
return (minishell_error("errno"), errno);
|
||||||
|
@ -113,7 +111,6 @@ static int exec_each_call(t_exec_command_global *global,
|
||||||
return (r);
|
return (r);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME line jump if command not found
|
|
||||||
int execute_command(t_env *env, t_command command)
|
int execute_command(t_env *env, t_command command)
|
||||||
{
|
{
|
||||||
t_exec_command_global global;
|
t_exec_command_global global;
|
||||||
|
|
Loading…
Add table
Reference in a new issue