MCPcopy Create free account
hub / github.com/bcndev/bytecoin / is_console_tty

Function is_console_tty

src/common/ConsoleTools.cpp:24–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace common { namespace console {
23
24bool is_console_tty() {
25#if defined(_WIN32)
26 static bool istty = 0 != _isatty(_fileno(stdout));
27#else
28 static bool istty = 0 != isatty(fileno(stdout));
29#endif
30 return istty;
31}
32
33void set_text_color(Color color) {
34 if (!is_console_tty()) {

Callers 1

set_text_colorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected