Merge branch 'master' of git.chauvet.pro:starnakin/minishell

This commit is contained in:
Camille Chauvet 2023-02-28 14:57:25 +01:00
commit 9cbb1e139a
3 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */ /* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */ /* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */
/* Updated: 2023/02/28 14:54:48 by erey-bet ### ########.fr */ /* Updated: 2023/02/28 14:55:39 by erey-bet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -24,7 +24,7 @@ static int error(int err, char *reason, char *problem)
return (err); return (err);
} }
int ft_exit(char **args, int fd) int ft_exit(char **args)
{ {
int err; int err;

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */ /* Created: 2023/02/21 12:45:16 by cchauvet #+# #+# */
/* Updated: 2023/02/28 13:15:23 by erey-bet ### ########.fr */ /* Updated: 2023/02/28 14:56:05 by erey-bet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -117,7 +117,7 @@ static int ft_own_cmd(t_data *data, t_cmd *cmd)
return_code = (echo(cmd->fd_out, cmd->args + 1)); return_code = (echo(cmd->fd_out, cmd->args + 1));
else if (ft_strcmp(cmd->executable, "exit") == 0) else if (ft_strcmp(cmd->executable, "exit") == 0)
{ {
exit_code = ft_exit(cmd->args + 1, cmd->fd_out); exit_code = ft_exit(cmd->args + 1);
if (exit_code != -1) if (exit_code != -1)
{ {
data->exit_code = exit_code; data->exit_code = exit_code;

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/14 13:45:30 by cchauvet #+# #+# */ /* Created: 2023/02/14 13:45:30 by cchauvet #+# #+# */
/* Updated: 2023/02/28 13:14:57 by erey-bet ### ########.fr */ /* Updated: 2023/02/28 14:55:52 by erey-bet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -85,7 +85,7 @@ int move_folder(char **args, int fd);
/* Unset */ /* Unset */
int unset(t_list **env, char **args, int fd); int unset(t_list **env, char **args, int fd);
/* Exit */ /* Exit */
int ft_exit(char **args, int fd); int ft_exit(char **args);
typedef struct s_cmd typedef struct s_cmd
{ {