little fixes
This commit is contained in:
parent
d72d88bded
commit
5b751b22fa
3 changed files with 7 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/06/27 14:36:14 by jschaft ### ########.fr */
|
||||
/* Updated: 2024/06/28 11:35:07 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -24,6 +24,7 @@ int exec_builtin(t_call call, char *const envp[]);
|
|||
// Execute echo builtin
|
||||
int echo_builtin(const char **argv);
|
||||
|
||||
// Execute cd builtin
|
||||
int cd_builtin(char *const *path, char *const envp[]);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/03 12:02:45 by jschaft #+# #+# */
|
||||
/* Updated: 2024/06/27 13:52:00 by jschaft ### ########.fr */
|
||||
/* Updated: 2024/06/28 11:37:24 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -26,7 +26,7 @@ bool is_builtin(const char *str)
|
|||
|| ft_strncmp(str, "unset", 6) == 0);
|
||||
}
|
||||
|
||||
//Execute the builtin pwd for the current directory.
|
||||
// Execute the builtin pwd for the current directory.
|
||||
// Return 0 for the sake of returning something for exec_builtin
|
||||
static int pwd_builtin(void)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/23 14:33:45 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/06/27 14:09:18 by jschaft ### ########.fr */
|
||||
/* Updated: 2024/06/28 11:39:45 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -81,8 +81,8 @@ int main(const int argc, const char *argv[], char *const envp[])
|
|||
(void)argv;
|
||||
if (argc != 1)
|
||||
{
|
||||
printf("Error: No argument needed\n");
|
||||
return (0);
|
||||
minishell_error("Takes no argument");
|
||||
return (2);
|
||||
}
|
||||
env.exit = false;
|
||||
env.mc_global = mem_newclass(fatal_error);
|
||||
|
|
Loading…
Add table
Reference in a new issue