-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple_shell.h
48 lines (34 loc) · 1017 Bytes
/
simple_shell.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
#ifndef SIMPLE_SHELL_H
#define SIMPLE_SHELL_H
#include <sys/stat.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
/* Shell_Prompt */
int main(int ac, char **av, char **env);
void prompt(void);
void handle(int signals);
void _EOF(char *buffer);
void shell_exit(char **command);
/* Child_Process */
void create_child(char **command, char *name, char **env, int cicles);
int change_dir(const char *path);
/* Execute */
void execute(char **command, char *name, char **env, int cicles);
void print_env(char **env);
char **_getPATH(char **env);
void msgerror(char *name, int cicles, char **command);
/* Str_Split */
char **tokening(char *buffer, const char *s);
/* Free Memory */
void free_dp(char **command);
void free_exit(char **command);
/* Functions_Helpers */
int _strcmp(char *s1, char *s2);
unsigned int _strlen(char *s);
char *_strcpy(char *dest, char *src);
int _atoi(char *s);
char *_strcat(char *dest, char *src);
#endif /* SIMPLE_SHELL_H */