-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.h
More file actions
36 lines (32 loc) · 799 Bytes
/
shell.h
File metadata and controls
36 lines (32 loc) · 799 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
#ifndef SHELL_H
#define SHELL_H
#include <dirent.h>
#include <unistd.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/wait.h>
extern char **environ;
char *_concat(char *s1, char *s2);
char *_strcpy(char *dest, char *src);
int shell_execute(char **args, char **dirs, char *line);
char **path_token(char *path);
int _strlen(char *s);
char *shell_getline(void);
void shell_loop(int argc, char *argv[]);
char *search_path(char temp[]);
char **shell_split(char *line);
int shell_launch(char **args);
int shell_exit(char **ar);
int shell_env(char **ar);
int _strcmp(char *s1, char *s2);
int _strncmp(char *s1, char *s2, int len);
typedef struct builtin
{
char *command;
int (*function)(char **);
} bt;
#endif