maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
exit_status_utils.c File Reference
#include "exit_status.h"
#include <stdio.h>
#include <stdlib.h>
#include "libft.h"
Include dependency graph for exit_status_utils.c:

Go to the source code of this file.

Functions

int ft_perror (char *str)
 
int ft_isnumber (char *str)
 

Function Documentation

◆ ft_isnumber()

int ft_isnumber ( char *  str)

Definition at line 24 of file exit_status_utils.c.

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}
int ft_isdigit(int c)
Definition ft_isdigit.c:13

References ft_isdigit().

Referenced by builtin_exit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ft_perror()

int ft_perror ( char *  str)

Definition at line 18 of file exit_status_utils.c.

19{
20 perror (str);
21 exit(EXIT_FAILURE);
22}
#define EXIT_FAILURE
Definition exit_status.h:17

References EXIT_FAILURE.

Referenced by builtin_pipe(), execute(), execute_child(), execute_child(), new_process(), and open_tmp_file().

Here is the caller graph for this function: