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 <math.h>
|
||||
|
||||
void exitPause(){
|
||||
printf(STR_EXIT_PAUSE);
|
||||
fflush(stdout);
|
||||
getch();
|
||||
}
|
||||
|
||||
void setConsoleColor(int consoleColor){
|
||||
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
WORD wColor;
|
||||
|
@ -51,12 +57,14 @@ int printLicense(int full){
|
|||
FILE* flic = fopen(PATH_LICENSE, "r");
|
||||
if (flic == NULL){
|
||||
printf("%s\n", STR_ERROR_LIC);
|
||||
exitPause();
|
||||
return -1;
|
||||
}
|
||||
char c;
|
||||
while ((c = fgetc(flic)) != EOF) {
|
||||
printf("%c", c);
|
||||
}
|
||||
exitPause();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,9 +246,7 @@ void getAdditionalDirs(bool safeMode){
|
|||
printf(STR_TOTAL_DELETED_GIBIBYTES, gib);
|
||||
}
|
||||
setConsoleColor(RESET_CONSOLE_COLOR);
|
||||
printf(STR_EXIT_PAUSE);
|
||||
fflush(stdout);
|
||||
getch();
|
||||
exitPause();
|
||||
}
|
||||
|
||||
int main(void){
|
||||
|
|
Reference in New Issue