[ADD] clear screen at start of minishell
This commit is contained in:
parent
149bafef88
commit
581dad0146
1 changed files with 12 additions and 4 deletions
16
src/main.c
16
src/main.c
|
@ -6,15 +6,23 @@
|
|||
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/23 14:33:45 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/04/26 12:24:58 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/04/26 14:11:46 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "include.h"
|
||||
|
||||
// Clean the screen (TODO)
|
||||
static void execclear(void)
|
||||
// Clean the screen
|
||||
static void execclear(char *const envp[])
|
||||
{
|
||||
const t_memclass mc = mem_newclass(fatal_error);
|
||||
t_command command;
|
||||
|
||||
command = parse_command(mc, "clear");
|
||||
if (command.error)
|
||||
return ;
|
||||
execute_command(mc, command, envp);
|
||||
mem_freeall(mc);
|
||||
}
|
||||
|
||||
// Print hi :D
|
||||
|
@ -55,7 +63,7 @@ int main(const int argc, const char *argv[], char *const envp[])
|
|||
(void)argv;
|
||||
(void)path;
|
||||
(void)command;
|
||||
execclear();
|
||||
execclear(envp);
|
||||
print_hi();
|
||||
errorstatus = 0;
|
||||
while (true)
|
||||
|
|
Loading…
Add table
Reference in a new issue