-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
98 lines (82 loc) · 2.09 KB
/
main.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
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
#include "main.h"
int main(int argc, char **argv)
{
int True = 1;
char *text = NULL;
char **args = NULL;
char *name_program = argv[0];
/* status exe */
int hold_on = 0;
int count_loop = 0;
/* im big pointing */
char *pnt1 = NULL;
char **env_adrrses = NULL;
int env_counter = 0;
int ol = 0;
/* cd */
char *pwd = NULL;
int cd_cn = 0;
char **dirctures_two = NULL;
char *path_f_time = NULL;
int c_cd_adv = 0;
int cn_null = 0;
char *home_path = NULL;
(void)argc;
while (True)
{
count_loop++;
text = display_AND_get_line();
new_line_and_status(text);
if (text == NULL) /* EOF */
{
if (env_adrrses != NULL)
{
while (env_adrrses[ol] != NULL)
{
free(env_adrrses[ol]);
ol++;
}
free(env_adrrses);
}
if (pwd != NULL)
{
free(pwd);
}
if (path_f_time != NULL)
{
free(path_f_time);
}
if (dirctures_two != NULL)
{
free(dirctures_two);
}
if (home_path != NULL)
{
free(home_path);
}
return (hold_on);
}
/* zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz */
if (z_check_others(text, argv[0], &hold_on, &text))
{
free(text);
text = NULL;
continue;
}
/* zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz */
args = _split_str(text); /* text will be free here */
if (args == NULL)
{
continue;
}
if (cheacking_if_beild_in_func(args, &hold_on, argv[0], count_loop, &pnt1, &env_adrrses, &env_counter, &pwd, &cd_cn, &dirctures_two, &path_f_time, &c_cd_adv, &cn_null, &home_path))
{
/* pnt1 = NULL; */
}
else
{
hold_on = my_z_executing_func(args, name_program, count_loop);
}
}
return (0);
}