display: add warning message
This commit is contained in:
parent
dbc78f8c57
commit
71c4b32202
|
|
@ -42,6 +42,17 @@ void printError(std::string err, bool eol)
|
|||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
void printWarn(std::string warn, bool eol)
|
||||
{
|
||||
if (isatty(STDOUT_FILENO))
|
||||
std::cout << KYEL << warn << "\e[0m" << std::flush;
|
||||
else
|
||||
std::cout << warn;
|
||||
std::cout << std::flush;
|
||||
if (eol)
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
void printInfo(std::string info, bool eol)
|
||||
{
|
||||
if (isatty(STDOUT_FILENO))
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <string>
|
||||
|
||||
void printError(std::string err, bool eol = true);
|
||||
void printWarn(std::string warn, bool eol = true);
|
||||
void printInfo(std::string info, bool eol = true);
|
||||
void printSuccess(std::string success, bool eol = true);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue