CO-CODE Hugo-Luke

+ last_exit_status set/get functions for here_doc
+ TODO : replace all occurences of last_exit_status
+ **environ fix
+ builtin_unset() fix
This commit is contained in:
LuckyLaszlo
2021-11-26 20:44:29 +01:00
parent 3465354af5
commit 18d430c5cb
13 changed files with 119 additions and 239 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
/* Updated: 2021/11/25 19:48:07 by hulamy ### ########.fr */
/* Updated: 2021/11/26 20:33:54 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -16,17 +16,15 @@
int main(int argc, char *argv[])
{
t_all c;
extern char **environ;
(void)argc;
(void)argv;
// if (!init(&c, envp))
if (!init(&c, environ))
if (!init(&c))
free_exit(&c, EXIT_FAILURE);
//putenv("VAR=W1 W2 W3"); // TEMP TEST
//if (isatty(STDIN_FILENO))
shell_loop(&c);
//else
// shell_script(&c);
// if (argv[1] || !isatty(STDIN_FILENO))
// shell_script(&c);
// else
shell_loop(&c);
return (0);
}