Hack in Windows console coloring.

The code has suffered and needs refactoring/commenting. BUT... IT WORKS!
This commit is contained in:
Andrew Gallant
2016-09-07 21:54:28 -04:00
parent ca058d7584
commit 0042dce949
6 changed files with 215 additions and 31 deletions

View File

@@ -5,15 +5,15 @@ redirected to a file? etc... We use this information to tweak various default
configuration parameters such as colors and match formatting.
*/
use libc;
#[cfg(unix)]
pub fn stdin_is_atty() -> bool {
use libc;
0 < unsafe { libc::isatty(libc::STDIN_FILENO) }
}
#[cfg(unix)]
pub fn stdout_is_atty() -> bool {
use libc;
0 < unsafe { libc::isatty(libc::STDOUT_FILENO) }
}