forked from mwanyambu/simple_shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
44 lines (40 loc) · 982 Bytes
/
main.h
File metadata and controls
44 lines (40 loc) · 982 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
#ifndef MAIN_H
#define MAIN_H
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <signal.h>
#include <fcntl.h>
#include <dirent.h>
#include <libgen.h>
#define MAX_INPUT_LENGTH 4096
#define BUFFER_SIZE 1024
#define AND 1
#define DELIMITER " \t\r\n\a"
#define OR 2
extern char **environ;
int _atoi(char *s);
int _strcmp(char *s1, char *s2);
int _strlen(const char *s);
void _prompt(void);
void print_env(void);
int status(char **arguments);
ssize_t _getline(char **lineptr, size_t *n, FILE *stream);
int _chdir(char **arguments);
int print_args(char **args);
int execute_env(char **args);
int run_builtins(char **args);
int pipe_builtin(char **cmd1, char **cmd2);
char **split_input(char *input);
char *read_input(void);
int process(char **args);
int main(int argc, char **argv);
int get_input(char *filename);
#endif