-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.h
More file actions
68 lines (66 loc) · 1.7 KB
/
Copy pathheader.h
File metadata and controls
68 lines (66 loc) · 1.7 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
#include<stdio.h>
#include<string.h>
#include<fcntl.h>
#include<errno.h>
#include<unistd.h>
#include<stdlib.h>
#include<dirent.h>
#include<time.h>
#include<sys/stat.h>
#include<sys/wait.h>
#include<pwd.h>
#include<grp.h>
#include<termios.h>
#include<sys/select.h>
struct node
{
int status,jobid;
pid_t pid;
char com[100];
};
extern int size,size1,histsize,jobsize;
extern char hist[25][10000],historypath[10000],path[10000],hostname[10000],path2[10000];
extern struct node jobs[10000];
extern char *user;
char *uid_to_name(uid_t uid);
char *gid_to_name(gid_t gid);
void addtohistory(char *c);
void historyexe(char **c);
void handler();
void getcwdstr(char *arr);
char *getusername();
void gethname(char *arr);
void printterm(char *usr,char *host,char *path);
int makerel(char *path,char *home,char *path2);
void printdir(char *c,int f);
void lsl(char *c,int f);
int pinfo(char **args,char *home);
void execothers(char **c,int bg);
int executecommand(char** c,char *path,char *path2,char *home);
void takeinp(char** c);
void resetinp(char** inp);
void makeinp(char *inp,char **c);
void gethome(char *from,char *to);
void echox(char **c);
int kbhit();
void nonblock(int state);
void dirty(char **c);
void finddirtysize();
void inithistory(char *home);
void checkbg();
void handler1(int sig_num);
void handler2(int sig_num);
void setenvv(char **c);
void unsetenvv(char **c);
void execute_fg(char **c);
void execute_bg(char **c);
void kjob(char **c);
int redirection(char **c);
int itsredirection(char **c);
void piping(char *c,char *path,char *path2,char *home);
int itspipe(char **c);
int isup(char **c);
void uparrowk(char *user,char *hostname,int k,char *path2,char *lel);
void cronjob(char **c);
void job();
void ovkill(int f);