forked from leinefran/simple_shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.h
More file actions
47 lines (43 loc) · 1.07 KB
/
Copy pathshell.h
File metadata and controls
47 lines (43 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _SHELL_H_
#define _SHELL_H_
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <signal.h>
/**
* struct environ_list - singly linked list
* @str: string - (malloc'ed string)
* @next: points to the next node
*
* Description: singly linked list node structure
* for Holberton project
*/
typedef struct environ_list
{
char *str;
struct environ_list *next;
} env_list;
void sighand(int signum);
extern char **environ;
void print_env(void);
void error(char *str, int line_counter, int flag);
int _strlen(char *s);
void rev_string(char *s);
char *_itoa(int n);
unsigned int get_pid(void);
unsigned int get_ppid(void);
char *stringdup(const char *str);
int toksize(char *str);
char **tokenize(char *str);
int few(pid_t c_pid, char **arr, int line_counter);
int str_comp(char **arr, int size);
char *_getenv(const char *name);
int _which(char *file);
char *str_concat(char *s1, char *s2, int flag);
int path(char **arr, int line_counter);
#endif /* _SHELL_H_ */