|
|
@ -372,10 +372,12 @@ namespace spdlog
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string errno_to_string(char buf[256], int res)
|
|
|
|
inline std::string errno_to_string(char buf[256], int res)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (res == 0) {
|
|
|
|
if (res == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
return std::string(buf);
|
|
|
|
return std::string(buf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
return "Unknown error";
|
|
|
|
return "Unknown error";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -432,12 +434,14 @@ namespace spdlog
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const char *env_p = std::getenv("TERM");
|
|
|
|
const char *env_p = std::getenv("TERM");
|
|
|
|
if (env_p == nullptr) {
|
|
|
|
if (env_p == nullptr)
|
|
|
|
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static const bool result = std::any_of(
|
|
|
|
static const bool result = std::any_of(
|
|
|
|
std::begin(Terms), std::end(Terms), [&](const char* term) {
|
|
|
|
std::begin(Terms), std::end(Terms), [&](const char* term)
|
|
|
|
|
|
|
|
{
|
|
|
|
return std::strstr(env_p, term) != nullptr;
|
|
|
|
return std::strstr(env_p, term) != nullptr;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|