diff --git a/bin/base64.c b/bin/base64.c index 1e2ea44..68f3b58 100644 --- a/bin/base64.c +++ b/bin/base64.c @@ -360,26 +360,26 @@ static bool encode (const struct config *config, struct buffer *buf) { #ifdef WIN - DWORD fdwMode; + DWORD fdwMode = {}; // Get the standard output handle. HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); // Check for errors. if (hStdout == INVALID_HANDLE_VALUE) { - fprintf(stderr, "GetStdHandle: %d\n", GetLastError()); + fprintf(stderr, "GetStdHandle: err#%d\n", GetLastError()); return false; } // Save the current output mode. - if (!GetConsoleMode(hStdout, &fdwMode)) { - fprintf(stderr, "GetConsoleMode: %d\n", GetLastError()); - return false; - } +// if (!GetConsoleMode(hStdout, &fdwMode)) { +// fprintf(stderr, "GetConsoleMode: err#%d\n", GetLastError()); +// return false; +// } // Disable the mangling of newlines. if (!SetConsoleMode(hStdout, fdwMode | DISABLE_NEWLINE_AUTO_RETURN)) { - fprintf(stderr, "SetConsoleMode: %d\n", GetLastError()); + fprintf(stderr, "SetConsoleMode: err#%d\n", GetLastError()); return false; } #endif @@ -390,7 +390,7 @@ encode (const struct config *config, struct buffer *buf) // Restore the original console settings. if (!SetConsoleMode(hStdout, fdwMode)) { - fprintf(stderr, "SetConsoleMode: %d\n", GetLastError()); + fprintf(stderr, "SetConsoleMode: err#%d\n", GetLastError()); } #endif