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