Skip to content

Commit

Permalink
Use Windows enum instead of magic number
Browse files Browse the repository at this point in the history
Use the named value from Windows.h rather than the equivalent magic
number.

Source:
https://docs.microsoft.com/en-us/windows/console/setconsolemode
  • Loading branch information
bartecargo committed Nov 13, 2018
1 parent 282af0f commit 7b80562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlgrep/sqlgrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void configure_console_for_ansi_escape_sequences()
auto const console_window = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD startup_console_mode;
GetConsoleMode(console_window, &startup_console_mode);
SetConsoleMode(console_window, startup_console_mode | 0x0004);
SetConsoleMode(console_window, startup_console_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
}

int main(int argc, char** argv)
Expand Down

0 comments on commit 7b80562

Please sign in to comment.