# # patch "ChangeLog" # from [89e394e55ee9d657e0296db5878a38b15745c466] # to [fe8427aca7eddf1eedd17e356ee600b8ae28786c] # # patch "win32/terminal.cc" # from [956b84cf7bf5fb26788e77b380935d00291f060e] # to [f747b2f947980bbf6561cd97441709b82159cf29] # --- ChangeLog +++ ChangeLog @@ -1,7 +1,11 @@ 2005-04-14 Olivier Andrieu * Makefile.am: silence cmp +2005-04-14 Matthew Gregan + + * win32/terminal.cc (have_smart_terminal): Implement for Win32. + 2005-04-13 Matthew Gregan * tests/t_netsync_largish_file.at: Add test for netsyncing largish --- win32/terminal.cc +++ win32/terminal.cc @@ -5,12 +5,25 @@ // see the file COPYING for details #include +#include +#include + #include "platform.hh" bool have_smart_terminal() { - return true; + std::string term; + if (const char* term_cstr = getenv("TERM")) + term = term_cstr; + else + term = ""; + + if (term == "" || term == "emacs" || term == "dumb" + || !_isatty(_fileno(stdout))) + return false; + else + return true; } unsigned int terminal_width()