-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheaders.h
More file actions
102 lines (81 loc) · 1.77 KB
/
headers.h
File metadata and controls
102 lines (81 loc) · 1.77 KB
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
92
93
94
95
96
97
98
99
100
101
102
#ifndef HEADER_H
#define HEADER_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <dirent.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <signal.h>
#include <sys/stat.h>
#include <grp.h>
#include <time.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/utsname.h>
#define ll long long int
#define MotherDirct_Symbl '~'
char cwd[20000];
char pseudo_home[1024];
char Dest_Path[290];
char Directory_Present;
char Sysname[30];
char Username[30];
char history[10][1000];
char *token[10000];
char transitfile[100000];
char Permissions[11];
char HistoryBox[21][256];
int pid_arr[100000];
int child_flag;
int curid;
int kjobkill;
int overkillflag;
int redflag;
int pipingflag;
int flg_a;
int flg_l;
int HistoryIndex;
int transitfd;
int childid;
int status;
int k;
FILE *fp1;
struct utsname SystemProperties;
struct dirent *FileList;
struct stat fileDetails;
typedef struct jobs{
char name[10000];
pid_t pid;
}job;
ll job_count;
struct jobs job_arr[100000];
struct jobs current_fore;
void loop(void);
void promptprint();
void Implement_commands();
void foreground(char *token[]);
void back(char *token[]);
void pwd();
void cd(char *token[], ll k);
void echo(char *token[], ll k);
void Trigger_ls(ll k, char *token[]);
void pinfo(ll k, char *token[]);
void repeat(int k, char *token[]);
void redirection(char *token[], ll k, char list_com[], int redflag);
void overkill();
void settingenv(char *token[],ll k);
void unsettingenv(char *token[], ll k) ;
void del_process(int id);
int pipecheck();
void piping(char *commands[], ll k);
void alljobs();
void kjob(char *token[],ll k);
void fg(char *token[]);
void bg(char *token[]);
void history_command(ll k, char *token[]);
extern int alphasort();
#endif