-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshell.h
45 lines (38 loc) · 1.02 KB
/
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
#ifndef SHELL_H
#define SHELL_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
/*DECLARATIONS*/
extern char **environ;
/*INCLUDED FUNCTIONS*/
char **string_storage(char *line);
void path_finder(char **array);
int execute_line(char *con, char **array);
/*******CHECKS*******/
void exit_check(char **array, char *line, int exit_stat);
void env_check(char **array);
int clear_check(char **array);
void sigint_check(int sign);
int spaces_tabs_check(char *line);
/*******************/
/*****ALLOCATION******/
void *_realloc(void *ptr, unsigned int size);
/*********************/
void free_2D(char **array);
/*******STRING*******/
int _putchar(char c);
char *_strcpy(char *dest, char *src);
char *_strcat(char *dest, char *src);
int _strlen(char *s);
int _strcmp(char *s1, char *s2);
/********************/
/****ADVANCED FUNCTION*****/
ssize_t _getline(char **line, size_t *len, FILE *stream);
/**************************/
#endif