-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsimishell.h
56 lines (50 loc) · 1.29 KB
/
simishell.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
#ifndef SIMISHELL_H
#define SIMISHELL_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
extern char **environ;
extern int errno;
/**
* struct selectfunction - a struct array of functions
* @command: a pointer to the caharacter of the command string
* @funcptr: a pointer to a function
*/
typedef struct selectfunction
{
char *command;
int (*funcptr)(char **line);
} selecte;
void sigintHandler(int sig_num __attribute__((unused)));
void printprompt(int i);
int exitor(char *line[]);
int cater(char *line[]);
int getstr(char *str);
int shellprocessor(char **line, char **argv);
char **strbrk(char *line, char c);
int _getline(char **line, size_t *len);
void farewell(void);
void description(void);
void printstar(void);
void printstr(char *s);
int strleng(char *s);
void strcopy(char *src, char *dest);
int strcomp(char *str, char *equ);
void strmix(char *src, char *dest);
int lister(char **line);
int (*getfunc(char *str))(char **line);
int echorr(char *line[]);
int builtincom(char **line);
int changedire(char **line);
int pwder(char *line[]);
int envir(char *line[]);
int maker(char *line[]);
char _getchar(void);
char *stringer(char *line, int i, char *str, char c);
#endif