-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbigshell.h
56 lines (51 loc) · 1.25 KB
/
bigshell.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 BIGSHELL_H
#define BIGSHELL_H
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#include <signal.h>
#include <dirent.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#define PROMPT "BIGSHELL $ "
/**
* struct buil_s - Struct to the built-in functions
* @bcommand: built-in command
* @f: pointer to function
*/
typedef struct buil_s
{
char *bcommand;
void (*f)(char *);
} buil_t;
extern char **environ;
void checkinfo(char *, size_t, int, char **);
void new_command(char **, char *, int, char **);
char **maintoken(char *, const char *, int);
char **divtokens(int, char *, const char *);
int numtoken(char *, const char *);
char *lookpath(char *);
int lookenvpath(char *);
char **divpath(int, char *);
char *lookdir(char **, char *);
char *strpath(char *, char *);
int intfunct(char **, char *);
void (*intfunct_exe(char *))(char *);
void free_exit(char *);
void varenv(char *);
void changedir(char *);
int wrtnum(int);
char *_strdup(char *);
void printfun(char *, int);
int _put_char(char);
int _strcmp(char *, char *);
void freestr(int, ...);
void freeptr(char **);
void wrterrex(char *, int, char *);
void wrterror(char *, int, char *);
int _strlen(char *);
void sig_handler(int);
#endif