-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.h
91 lines (48 loc) · 1.39 KB
/
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include <string.h>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include<fstream>
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h> //for passwd file sturcute
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#define f(i,a,b) for(int i=(int)a;i<=(int)b;i++)
using namespace std;
void executeHistoryCommand();
void printWecomeMessage();
void getArguments(string str,vector<string> &args);
int getArgumentsArray(vector<string> args_vector,char *args[]);
//isPipeCommands
bool pipecommand(vector<string> & cmd);
void separatePipe(vector<string> source,vector<string> &desti);
void getArgsFromString(string s, char *args[]);
void executePipeCommands(vector<string> cmd);
//assingment = commmands
bool isAssignmentCommand(string s);
bool executeAssignmentCommand(string s);
string checkForVar(string s);
//inintshell.cpp
void initShell();
void readShellRC();
//export.cpp
bool isExportCommand(string input);
void executeExportCommand(string input);
//alias
bool isAliasCommand(string s);
void executeAliasCommand(string input);
void printAlias();
string aliasFilter(string s);
//singnal
void executeOpenCommand(vector<string> input);
void startRecording();
//alarm
void alarmHandler(int x,string msg);
void checkAlarm(time_t alarmtime,string msg);
void checkMissedAlarms();
void alarmExit();