-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshell.h
More file actions
65 lines (39 loc) · 893 Bytes
/
shell.h
File metadata and controls
65 lines (39 loc) · 893 Bytes
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef SHELL_H
#define SHELL_H
extern char **environ;
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <stddef.h>
#include <wait.h>
#include <stddef.h>
#include <errno.h>
#include <dirent.h>
/**
* struct builtin - the shell builtins
* @s: name of builtins
* @f: what the builtins do (or function)
**/
typedef struct builtin
{
char *s;
int (*f)(char **av);
} builtin;
int _env(char **av);
int _cd(char **av);
int fexit(char **av);
char **str_split(const char *str, const char del);
void free_arr(char **tow);
char *_getenv(const char *name);
char *_match(char **s);
int _path(char *s);
void execute_line(char *line);
void *_realloc(void *ptr, unsigned int old_size, unsigned int new_size);
#endif