-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.h
73 lines (48 loc) · 1.26 KB
/
header.h
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
66
67
68
69
70
71
72
73
#ifndef HEADER_H
#define HEADER_H
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <strings.h>
#include <stddef.h>
#include <dirent.h>
#include <signal.h>
/**
* struct builtins - struct with builtin commands
* @argv: arg passed as command
* @func: correlations function
* description: this is to handle the builtins
*/
typedef struct builtins
{
char *argv;
int (*func)();
} builtins;
char **tokenize(char *userinput);
int stringlength(char *s);
int shell_loop(int argc, char **argv);
int executor(char *asdf, char **argv);
int function_finder(char **argv, char *buffer);
int sh_exit(char **argv, char *buffer);
int sh_cd(char **argv);
int sh_env(void);
char *_strcat(char *dest, char *src);
char *dir_search(char **argv, char **path_tokens);
int _strcmp(char *s1, char *s2);
char *executable_maker(char *asdf, char **argv);
void dubbie_free(char **dubbie_pointie);
int _putchar(char c);
char _strchr(char *s, char c);
char *_strdup(char *str);
char **_env_parser(char *name);
char **_get_env(char *env);
extern char **environ;
int sh_setenv(char **argv);
int sh_unsetenv(char **argv);
int sh_alias(char **argv);
#endif /* HEADER_H */