/** * @file tools.cc * @brief Implementation of miscellaneous tools. * @author Andreas Aardal Hanssen * @date 2002-2005 */ #include "tools.h" #include void Binc::Tools::setenv(const std::string &key, const std::string &value) { ::setenv(key.c_str(), value.c_str(), 1); } std::optional Binc::Tools::getenv(const std::string &key) { const char *c = ::getenv(key.c_str()); return c ? std::make_optional(c) : std::nullopt; }