20 #ifndef MIRTK_Terminal_H 21 #define MIRTK_Terminal_H 23 #include "mirtk/CommonExport.h" 25 #include "mirtk/Config.h" 26 #include "mirtk/Stream.h" 62 inline bool StdOutIsRedirected()
67 return !isatty(fileno(stdout));
77 MIRTK_Common_EXPORT
extern const char *
xreset;
79 MIRTK_Common_EXPORT
extern const char *xblack;
80 MIRTK_Common_EXPORT
extern const char *xred;
81 MIRTK_Common_EXPORT
extern const char *xgreen;
82 MIRTK_Common_EXPORT
extern const char *xyellow;
83 MIRTK_Common_EXPORT
extern const char *xblue;
84 MIRTK_Common_EXPORT
extern const char *xmagenta;
85 MIRTK_Common_EXPORT
extern const char *xcyan;
86 MIRTK_Common_EXPORT
extern const char *xwhite;
88 MIRTK_Common_EXPORT
extern const char *xbrightblack;
89 MIRTK_Common_EXPORT
extern const char *xbrightred;
90 MIRTK_Common_EXPORT
extern const char *xbrightgreen;
91 MIRTK_Common_EXPORT
extern const char *xbrightyellow;
92 MIRTK_Common_EXPORT
extern const char *xbrightblue;
93 MIRTK_Common_EXPORT
extern const char *xbrightmagenta;
94 MIRTK_Common_EXPORT
extern const char *xbrightcyan;
95 MIRTK_Common_EXPORT
extern const char *xbrightwhite;
97 MIRTK_Common_EXPORT
extern const char *xboldblack;
98 MIRTK_Common_EXPORT
extern const char *xboldred;
99 MIRTK_Common_EXPORT
extern const char *xboldgreen;
100 MIRTK_Common_EXPORT
extern const char *xboldyellow;
101 MIRTK_Common_EXPORT
extern const char *xboldblue;
102 MIRTK_Common_EXPORT
extern const char *xboldmagenta;
103 MIRTK_Common_EXPORT
extern const char *xboldcyan;
104 MIRTK_Common_EXPORT
extern const char *xboldwhite;
105 MIRTK_Common_EXPORT
extern const char *xboldbrightblack;
106 MIRTK_Common_EXPORT
extern const char *xboldbrightred;
107 MIRTK_Common_EXPORT
extern const char *xboldbrightgreen;
108 MIRTK_Common_EXPORT
extern const char *xboldbrightyellow;
109 MIRTK_Common_EXPORT
extern const char *xboldbrightblue;
110 MIRTK_Common_EXPORT
extern const char *xboldbrightmagenta;
111 MIRTK_Common_EXPORT
extern const char *xboldbrightcyan;
112 MIRTK_Common_EXPORT
extern const char *xboldbrightwhite;
117 #endif // MIRTK_Terminal_H MIRTK_Common_EXPORT bool stdout_color
Whether to use color output to STDOUT.
bool IsTerminalOption(const char *)
Check if given option is a terminal option.
void PrintTerminalOptions(ostream &)
Print terminal command-line options.
void ParseTerminalOption(int &, int &, char *[])
Parse terminal option.
MIRTK_Common_EXPORT const char * xreset
Color escape sequences.