diff --git a/main.c b/main.c index a7dd13a..efd7e98 100644 --- a/main.c +++ b/main.c @@ -32,6 +32,12 @@ #include #include +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){