mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-22 06:07:36 +02:00
display: add warning message
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user