maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
exit_status_utils.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* exit_status_utils.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/09/06 11:33:18 by dmdemirk #+# #+# */
9/* Updated: 2024/09/06 11:34:28 by dmdemirk ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "exit_status.h"
14#include <stdio.h>
15#include <stdlib.h>
16#include "libft.h"
17
18int ft_perror(char *str)
19{
20 perror (str);
21 exit(EXIT_FAILURE);
22}
23
24int ft_isnumber(char *str)
25{
26 int i;
27
28 i = 0;
29 while (str[i])
30 {
31 if (!ft_isdigit(str[i]))
32 return (0);
33 i++;
34 }
35 return (1);
36}
#define EXIT_FAILURE
Definition exit_status.h:17
int ft_isnumber(char *str)
int ft_perror(char *str)
int ft_isdigit(int c)
Definition ft_isdigit.c:13