Merge remote-tracking branch 'origin/master' into refactor-table-reading
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "utils.h"
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cerrno>
|
||||
#include "lammps.h"
|
||||
#include "error.h"
|
||||
#include "tokenizer.h"
|
||||
@ -100,6 +101,14 @@ void utils::logmesg(LAMMPS *lmp, const std::string &mesg)
|
||||
if (lmp->logfile) fputs(mesg.c_str(), lmp->logfile);
|
||||
}
|
||||
|
||||
/* define this here, so we won't have to include the headers
|
||||
everywhere and utils.h will more likely be included anyway. */
|
||||
|
||||
std::string utils::getsyserror()
|
||||
{
|
||||
return std::string(strerror(errno));
|
||||
}
|
||||
|
||||
/** \brief try to detect pathname from FILE pointer. Currently only supported on Linux, otherwise will report "(unknown)".
|
||||
*
|
||||
* \param buf storage buffer for pathname. output will be truncated if not large enough
|
||||
|
||||
Reference in New Issue
Block a user