maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
exit_status.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* exit_status.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/09/06 12:29:24 by dmdemirk #+# #+# */
9/* Updated: 2024/09/09 13:20:14 by dmdemirk ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef EXIT_STATUS_H
14# define EXIT_STATUS_H
15
16# define EXIT_SUCCESS 0
17# define EXIT_FAILURE 1
18# define EXIT_MISUSE 2
19
20# define IS_DIRECTORY 256
21# define NUMERIC_REQUIRED 257
22# define TOO_MANY_ARGS 258
23# define UNKNOWN_COMMAND 259
24# define INVALID_ARGUMENT 260
25# define PERMISSION_DENIED 261
26# define ERROR_EXIT 262
27# define NOT_VALID_IDENTIFIER 263
28# define INVALID_OPTION 264
29
30# include "shell.h"
31# include <errno.h>
32
33/* exit status */
34void exit_status_handler(t_ms_data *data, int status_code, char *err_arg);
35void set_exit_status(int *exit_status, int status_code);
37
38/* exit_status_utils */
39int ft_perror(char *str);
40int ft_isnumber(char *str);
41void free_shell_var_list(t_env *shell_var);
42
43#endif
void free_shell_var_list(t_env *shell_var)
int ft_isnumber(char *str)
void exit_status_handler(t_ms_data *data, int status_code, char *err_arg)
Definition exit_status.c:25
void set_shell_var_handler(t_ms_data *data)
Definition exit_status.c:53
void set_exit_status(int *exit_status, int status_code)
Definition exit_status.c:78
int ft_perror(char *str)
Definition env.h:17