diff --git a/src/display.cpp b/src/display.cpp index 4e5bbb9..c659ae7 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -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)) diff --git a/src/display.hpp b/src/display.hpp index 3e82fe5..3a0ddf3 100644 --- a/src/display.hpp +++ b/src/display.hpp @@ -22,6 +22,7 @@ #include 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);