-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLauncherEzBuild
More file actions
60 lines (50 loc) · 859 Bytes
/
Copy pathLauncherEzBuild
File metadata and controls
60 lines (50 loc) · 859 Bytes
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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
int my_rand();
void config();
void autoconfig();
int main(int argc, char *argv[], char *envp[])
{
int execNb;
printf("Running ExiaSaver . . . ");
if(argc>1)
{
if(strcmp(argv[1], "-cfg") == 0)
{
printf("Config avancee !\n");
config();
}
else
{
printf("option introuvable !");
}
}
else
{
printf("Auto config !!\n");
autoconfig();
}
execNb = my_rand();
printf("[%d]\n", execNb);
return 0;
}
int my_rand()
{
srand(time(NULL));
int randomValue;
randomValue = rand()%3+1;
return(randomValue);
}
void config()
{
printf(" ");
}
void autoconfig()
{
char *path = getenv("PATH");
//putenv ("EXIASAVER_HOME=path");
printf("%s", path);
}