Added and improved exit pause
This commit is contained in:
parent
79b85a4b85
commit
6d740d21a3
12
main.c
12
main.c
|
@ -32,6 +32,12 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
void exitPause(){
|
||||||
|
printf(STR_EXIT_PAUSE);
|
||||||
|
fflush(stdout);
|
||||||
|
getch();
|
||||||
|
}
|
||||||
|
|
||||||
void setConsoleColor(int consoleColor){
|
void setConsoleColor(int consoleColor){
|
||||||
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
|
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
WORD wColor;
|
WORD wColor;
|
||||||
|
@ -51,12 +57,14 @@ int printLicense(int full){
|
||||||
FILE* flic = fopen(PATH_LICENSE, "r");
|
FILE* flic = fopen(PATH_LICENSE, "r");
|
||||||
if (flic == NULL){
|
if (flic == NULL){
|
||||||
printf("%s\n", STR_ERROR_LIC);
|
printf("%s\n", STR_ERROR_LIC);
|
||||||
|
exitPause();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
char c;
|
char c;
|
||||||
while ((c = fgetc(flic)) != EOF) {
|
while ((c = fgetc(flic)) != EOF) {
|
||||||
printf("%c", c);
|
printf("%c", c);
|
||||||
}
|
}
|
||||||
|
exitPause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,9 +246,7 @@ void getAdditionalDirs(bool safeMode){
|
||||||
printf(STR_TOTAL_DELETED_GIBIBYTES, gib);
|
printf(STR_TOTAL_DELETED_GIBIBYTES, gib);
|
||||||
}
|
}
|
||||||
setConsoleColor(RESET_CONSOLE_COLOR);
|
setConsoleColor(RESET_CONSOLE_COLOR);
|
||||||
printf(STR_EXIT_PAUSE);
|
exitPause();
|
||||||
fflush(stdout);
|
|
||||||
getch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void){
|
int main(void){
|
||||||
|
|
Reference in New Issue