MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / is_stdin_a_terminal

Function is_stdin_a_terminal

smallthinker/tools/run/run.cpp:1102–1110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100}
1101
1102static bool is_stdin_a_terminal() {
1103#if defined(_WIN32)
1104 HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
1105 DWORD mode;
1106 return GetConsoleMode(hStdin, &mode);
1107#else
1108 return isatty(STDIN_FILENO);
1109#endif
1110}
1111
1112static bool is_stdout_a_terminal() {
1113#if defined(_WIN32)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected