-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheaders.c
64 lines (60 loc) · 815 Bytes
/
headers.c
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
#include "headers.h"
char USER[LOGIN_NAME_MAX];
char ROOT[HOST_NAME_MAX];
char INIT_DIR[DIR_NAME_MAX];
char PREV_DIR[DIR_NAME_MAX];
int S_INIT_DIR;
int num_cmmds;
int num_bg;
int stdin_cpy;
int stdout_cpy;
char* input_str;
time_t time_;
void printBLACK()
{
printf("\033[0;30m");
}
void printRED()
{
printf("\033[0;31m");
}
void printGREEN()
{
printf("\033[0;32m");
}
void printYELLOW()
{
printf("\033[0;33m");
}
void printBLUE()
{
printf("\033[0;34m");
}
void printPURPLE()
{
printf("\033[0;35m");
}
void printCYAN()
{
printf("\033[0;36m");
}
void printWHITE()
{
printf("\033[0;37m");
}
void printBOLD()
{
printf("\033[1m");
}
void printRESET()
{
printf("\033[0m");
}
int min(int a, int b)
{
return a > b ? b : a;
}
int max(int a, int b)
{
return a > b ? a : b;
}