-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.h
65 lines (63 loc) · 2.04 KB
/
functions.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
57
58
59
60
61
62
63
64
65
#ifndef ISH_FUNCTIONS
#define ISH_FUNCTIONS
void pwd();
char *cd(char *command, char *path);
void Echo(char *command);
void ddir(char *path, int f_flag, int d_flag);
void dfile(char *path, char *filename, char *cwd, int f_flag, int d_flag);
void discover(char *path, char *command);
char *executeCommand(char *command, char *path);
int max(int a, int b);
void PrintStringArray(char** array, int n);
void PrintNumArray(char *array, int n);
int HasQuotes(char *word);
char *removeQuotes(char *word);
char *Dotify(char *path);
char *DeDotify(char *path);
char *AbsPathofDir(char *leading, char *pwd);
char *Dashify(char *command);
char *DeDashify(char *command);
int CheckValidDir(char *dir, char *path);
int CheckValidFile(char *file, char *path);
char *Tildify(char *path);
char *DeTildify(char *path);
char **AmpersandHandler(char *command);
void createHistory();
void history();
void AddHistory(char *command);
void init();
void jobs(char* command);
signed cmp(const void *a, const void *b);
char *lscolourblue(char *file);
char *lscolourwhite(char *file);
char *lscolourgreen(char *file);
char *lscolouryellow(char *file);
void lssize(char* dir, int lsl_flag, int lsa_flag);
void lsdir(char *dir, int lsl_flag, int lsa_flag);
void lsfile(char *file, int lsl_flag, int lsa_flag);
int lscmp(const void* x, const void* y);
void ls(char *path, char *command);
void pinfo(char *command);
void foregroundProcess(char *path, char *arguements[], int argc);
void backgroundProcess(char *path, char *arguements[], int argc);
void systemCommand(char *path, char *command);
int LookforBG();
void KillAllBG();
char* AmpersandSpacer(char * command);
void ResetStreams();
char* HandleRedirection(char* command);
void controlZ(int signum) ;
void controlC(int signum) ;
void bindSignals();
void sig(char* command);
void prompt(char* path);
void promptInit();
char **pipeLine(char *command, char* path );
void fg(char* command);
void bg(char* command);
void die(const char* s);
void disableRawMode();
void enableRawMode();
char* autocomplete(char *command, char* currpath);
char* get_line();
#endif