-
Notifications
You must be signed in to change notification settings - Fork 2
/
custom_header.h
77 lines (62 loc) · 1.6 KB
/
custom_header.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
66
67
68
69
70
71
72
73
74
75
76
77
#include<dirent.h>
#include<sys/stat.h>
#include<pwd.h>
#include<grp.h>
#include<time.h>
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<string.h>
#include<errno.h>
#include<stdio.h>
#include<sys/utsname.h>
#include<fcntl.h>
#include<signal.h>
//Functions in argumentize.c
char ** argumentize(char * cmd);
int argCount(char ** args);
//functions in builtin_pk_ls.c
char * formatDate(char *str,time_t val);
int cmd_pk_ls(char *path);
int cmd_pk_ls_a(char *path);
int print_pk_ls_l(char *path,char *fileName);
int cmd_pk_ls_l(char *path);
int cmd_pk_ls_l_a(char *path);
//functions in exec_clock.c
int exec_clock(int interval,int times);
//functions in commandParser.c
char * parseCommand(char * cmd);
//fuctions in display.c
char * dirName();
void display();
//functions in execCmd.c
int findCmdNo(char *cmd);
int exec_pk_ls(char *cmd);
int exec_pk_pwd();
int exec_pk_cd(char *cmd);
int exec_pk_echo(char *cmd);
int exec_pk_pinfo(char *cmd);
int exec_pk_clock(char *cmd);
int launch_cmd(char *cmd);
int checkBackgroud();
int execCmd(char *cmd);
//functions in input.c
char **input();
//fuctions in lineParser.c
char ** tokanize(char * ptr);
//functions in pinfo.c
int exec_pinfo(int pid);
//functions in exec_reminder.c
int exec_reminder(char *cmd);
//functions in redirect.c
char* checkInputRedirection(char *cmd);
char* checkOutputRedirection(char *cmd);
char* checkAppendRedirection(char *cmd);
//functions in pipe.c
int pipeExec(char *cmd);
//functions in signal.c
void CtrlCHandler(int sig_num);
void CtrlZHandler(int sig_num);
//some interfile variables
pid_t CURR_FOREGROUND;
char * CURR_FOREGROUND_NAME;