-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[+] Add about.c (missing in the first commit)
- Loading branch information
1 parent
76a9aea
commit 198dc10
Showing
1 changed file
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** 42sh | ||
** File description: | ||
** The file containing the about builtin | ||
*/ | ||
/** | ||
* @file about.c | ||
* @brief The file containing the about builtin | ||
*/ | ||
|
||
#include "../../include/myshell.h" | ||
|
||
/** | ||
* @brief Print the informations about Arthur WARIN | ||
* @return <b>void</b> | ||
*/ | ||
static void arthurwarin(void) | ||
{ | ||
my_printf("\033[1m\033[34m----------------------------------------------" | ||
"\033[0m\n"); | ||
my_printf("π€ \033[1m\033[31mArthur WARIN\033[0m\n"); | ||
my_printf("π Student class of 2028\n"); | ||
my_printf("π Programme Grande Ecole\n"); | ||
my_printf("π Epitech Nice\n"); | ||
my_printf("π§ \033[4m\033[[email protected]\033[0m\n"); | ||
} | ||
|
||
/** | ||
* @brief Print the informations about Christophe VANDEVOIR | ||
* @return <b>void</b> | ||
*/ | ||
static void christophevandevoir(void) | ||
{ | ||
my_printf("\033[1m\033[34m----------------------------------------------" | ||
"\033[0m\n"); | ||
my_printf("π€ \033[1m\033[31mChristophe VANDEVOIR\033[0m\n"); | ||
my_printf("π Student class of 2028\n"); | ||
my_printf("π Programme Grande Ecole\n"); | ||
my_printf("π Epitech Nice\n"); | ||
my_printf("π§ \033[4m\033[[email protected]\033[0m\n"); | ||
} | ||
|
||
/** | ||
* @brief Print the informations about Gianni TUERO | ||
* @return <b>void</b> | ||
*/ | ||
static void giannituero(void) | ||
{ | ||
my_printf("\033[1m\033[34m----------------------------------------------" | ||
"\033[0m\n"); | ||
my_printf("π€ \033[1m\033[31mGianni TUERO\033[0m\n"); | ||
my_printf("π Student class of 2028\n"); | ||
my_printf("π Programme Grande Ecole\n"); | ||
my_printf("π Epitech Nice\n"); | ||
my_printf("π§ \033[4m\033[[email protected]\033[0m\n"); | ||
} | ||
|
||
/** | ||
* @brief Print the informations about Nicolas TORO | ||
* @return <b>void</b> | ||
*/ | ||
static void nicolastoro(void) | ||
{ | ||
my_printf("\033[1m\033[34m----------------------------------------------" | ||
"\033[0m\n"); | ||
my_printf("π€ \033[1m\033[31mNicolas TORO\033[0m\n"); | ||
my_printf("π Student class of 2028\n"); | ||
my_printf("π Programme Grande Ecole\n"); | ||
my_printf("π Epitech Nice\n"); | ||
my_printf("π§ \033[4m\033[[email protected]\033[0m\n"); | ||
} | ||
|
||
/** | ||
* @brief Print the informations about Raphael ROSSIGNOL | ||
* @return <b>void</b> | ||
*/ | ||
static void raphaelrossignol(void) | ||
{ | ||
my_printf("\033[1m\033[34m----------------------------------------------" | ||
"\033[0m\n"); | ||
my_printf("π€ \033[1m\033[31mRaphael ROSSIGNOL\033[0m\n"); | ||
my_printf("π Student class of 2028\n"); | ||
my_printf("π Programme Grande Ecole\n"); | ||
my_printf("π Epitech Nice\n"); | ||
my_printf("π§ \033[4m\033[[email protected]\033[0m\n"); | ||
} | ||
|
||
/** | ||
* @brief The about builtin | ||
* @param mysh The shell structure | ||
* @return <b>int</b> <u>0</u> if the command succeed, <u>1</u> otherwise | ||
*/ | ||
int exec_about(mysh_t *mysh) | ||
{ | ||
if (mysh->args[1] != NULL) { | ||
my_printf("about: Too many arguments.\n"); | ||
return 1; | ||
} | ||
my_printf("It is a simple shell that can execute commands.\n\n"); | ||
my_printf("It was made by:\n"); | ||
arthurwarin(); | ||
christophevandevoir(); | ||
giannituero(); | ||
nicolastoro(); | ||
raphaelrossignol(); | ||
my_printf("\033[1m\033[34m----------------------------------------------" | ||
"\033[0m\n"); | ||
return 0; | ||
} |