Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
** EPITECH PROJECT, 2024 |
3 |
|
|
** 42sh |
4 |
|
|
** File description: |
5 |
|
|
** The file containing the endif builtin |
6 |
|
|
*/ |
7 |
|
|
/** |
8 |
|
|
* @file endif.c |
9 |
|
|
* @brief The file containing the endif builtin |
10 |
|
|
*/ |
11 |
|
|
|
12 |
|
|
#include "../../include/myshell.h" |
13 |
|
|
|
14 |
|
|
/** |
15 |
|
|
* @brief The endif builtin |
16 |
|
|
* @param mysh The shell structure |
17 |
|
|
* @return <b>int</b> <u>0</u> if the command succeed, <u>1</u> otherwise |
18 |
|
|
*/ |
19 |
|
✗ |
int exec_endif(mysh_t *mysh) |
20 |
|
|
{ |
21 |
|
✗ |
if (mysh->args[1] != NULL) { |
22 |
|
✗ |
my_putstr_error("endif: Too many arguments.\n"); |
23 |
|
✗ |
return 1; |
24 |
|
|
} |
25 |
|
✗ |
return 0; |
26 |
|
|
} |
27 |
|
|
|