Merge remote-tracking branch 'origin/master' into refactor-table-reading

This commit is contained in:
Richard Berger
2020-06-05 12:09:57 -04:00
65 changed files with 647 additions and 837 deletions

View File

@ -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