Changeset 301 in pacpusframework for trunk/src/PacpusLib/ColorSeverityFormatter.hpp


Ignore:
Timestamp:
04/08/14 10:03:01 (10 years ago)
Author:
Marek Kurdej
Message:

Some Unix fixes

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11build
         2CMakeLists.txt.user*
  • trunk/src/PacpusLib/ColorSeverityFormatter.hpp

    r244 r301  
    2626#include <cstdlib>
    2727#include <sstream>
     28#include <string>
    2829
    2930// could use Boost.Predef with Boost >= 1.55
     
    141142#else
    142143    // On non-Windows platforms, we rely on the TERM variable.
    143     const char* const term = std::getenv("TERM");
     144    std::string const term = std::getenv("TERM");
    144145    const bool termSupportsColor = (term == "xterm")
    145             || (term, "xterm-color")
    146             || (term, "xterm-256color")
    147             || (term, "screen")
    148             || (term, "linux")
    149             || (term, "cygwin");
     146            || (term == "xterm-color")
     147            || (term == "xterm-256color")
     148            || (term == "screen")
     149            || (term == "linux")
     150            || (term == "cygwin");
    150151    return stdoutIsTty && termSupportsColor;
    151152#endif // defined(PACPUS_OS_WINDOWS) && !defined(PACPUS_OS_WINDOWS_MOBILE)
Note: See TracChangeset for help on using the changeset viewer.