Mon builtins est parfait, tout personne disant l'inverse mérité la pénitence à vie et faire tomber le savon
This commit is contained in:
parent
6a81705b98
commit
94f55af0be
@ -6,7 +6,7 @@
|
||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/20 14:27:36 by erey-bet #+# #+# */
|
||||
/* Updated: 2023/03/21 13:16:24 by erey-bet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:04:09 by erey-bet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -24,7 +24,7 @@ int make_move(char *path, int fd)
|
||||
return (0);
|
||||
}
|
||||
free(join);
|
||||
write(2, "No such file or directory\n", 26);
|
||||
write(2, "cd: No such file or directory\n", 30);
|
||||
return (1);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ int move_folder(char **args, int fd)
|
||||
{
|
||||
if (chdir(path) == 0)
|
||||
return (0);
|
||||
write(2, "No such file or directory\n", 26);
|
||||
write(2, "cd: No such file or directory\n", 30);
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/14 14:56:02 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/03/09 15:04:47 by erey-bet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:15:04 by erey-bet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -30,12 +30,3 @@ int print_env(t_list **env, int fd)
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*int main(int argc, char *argv[], char **env)
|
||||
{
|
||||
t_list **be;
|
||||
|
||||
be = init_env(env);
|
||||
print_env(be, 1);
|
||||
return (0);
|
||||
}*/
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/24 10:17:59 by erey-bet #+# #+# */
|
||||
/* Updated: 2023/03/10 14:52:22 by erey-bet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:04:47 by erey-bet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -35,11 +35,11 @@ int ft_exit(char **args)
|
||||
}
|
||||
err = ft_atoi_check(args[0]);
|
||||
if (err == 1)
|
||||
return (error(err, "numeric argument required", args[0]));
|
||||
return (error(err, "exit: numeric argument required", args[0]));
|
||||
if (args[1] != NULL)
|
||||
return (error(1, "too many arguments", NULL));
|
||||
return (error(1, "exit: too many arguments", NULL));
|
||||
if (err > 0)
|
||||
return (error(err, "numeric argument required", args[0]));
|
||||
return (error(err, "exit: numeric argument required", args[0]));
|
||||
write(1, "exit\n", 6);
|
||||
return ((ft_atoi(args[0]) % 256 + 256) % 256);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/14 14:27:08 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/03/30 13:04:53 by erey-bet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:05:25 by erey-bet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
static int error(char *str)
|
||||
{
|
||||
write(2, "bash: export: `", 15);
|
||||
write(2, "bozoshell: export: `", 20);
|
||||
write(2, str, ft_strlen(str));
|
||||
write(2, "': not a valid identifier\n", 26);
|
||||
return (1);
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/22 13:28:27 by erey-bet #+# #+# */
|
||||
/* Updated: 2023/02/23 15:49:21 by erey-bet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:07:10 by erey-bet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
int error(char *str, int fd)
|
||||
{
|
||||
write(fd, "bash: unset: `", 14);
|
||||
write(fd, "bozoshell: unset: `", 19);
|
||||
write(fd, str, ft_strlen(str));
|
||||
write(fd, "': not a valid identifier", 25);
|
||||
return (1);
|
||||
|
Loading…
Reference in New Issue
Block a user