diff --git a/functions.c b/functions.c index d458546..48d6970 100644 --- a/functions.c +++ b/functions.c @@ -1,7 +1,7 @@ #include "functions.h" void printError(const wchar_t *msg) { - fwprintf(stderr, L"%lsERROR: %ls%ls%ls\n", CHARCOLOR_RED, CHARCOLOR_WHITE, msg, COLOR_DEFAULT); + fwprintf(stderr, L"%lsERROR: %ls%ls%ls\n\n", CHARCOLOR_RED, CHARCOLOR_WHITE, msg, COLOR_DEFAULT); } wchar_t **parseArguments(int count, const wchar_t *arguments[], wchar_t *destination[]) { diff --git a/main.c b/main.c index d910a22..d561489 100644 --- a/main.c +++ b/main.c @@ -35,12 +35,19 @@ int wmain(int argc, const wchar_t *argv[]) { getInputFromConsole(arguments, options); } - if (options[OPT_DISPLAYHELP] == true) { + if (options[OPT_DISPLAYHELP] == true && inputMode == ARGUMENTS) { displayHelp(); return EXIT_SUCCESS; } if (handleErrors(arguments) == EXIT_FAILURE) { + wprintf_s(L" %ls(Press any key to exit) %ls", CHARCOLOR_WHITE, COLOR_DEFAULT); + + getwchar(); + + wprintf_s(L"\n"); + SetConsoleTitleW(originalConsoleWindowTitle); + return EXIT_FAILURE; }