diff options
author | Max <mparisi@stevens.edu> | 2020-09-20 23:13:47 -0400 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-09-20 23:13:47 -0400 |
commit | d57113ba791de4a4edaccb1d9b3ee53316f88032 (patch) | |
tree | 219f7044400f6afa9532875a0d386a4fe5c4d07d | |
parent | 3caf86eee2da7bf65a4ce785e79bc872cf2a5955 (diff) |
updated calcrom changelog, removed unused Glob class
-rw-r--r-- | .travis/calcrom/calcrom.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/.travis/calcrom/calcrom.cpp b/.travis/calcrom/calcrom.cpp index 9b429b2..c16a958 100644 --- a/.travis/calcrom/calcrom.cpp +++ b/.travis/calcrom/calcrom.cpp @@ -23,6 +23,8 @@ * Account for diamond/pearl split * - 0.1.4 (19 Sep 2020): * Modify for PowerPC development + * - 0.1.5 (20 Sep 2020): + * Use nftw instead of glob to recursively search directory trees */ #include <iostream> @@ -30,7 +32,6 @@ #include <sstream> #include <regex> #include <elf.h> -#include <glob.h> #include <ftw.h> #include <string.h> #include <vector> @@ -38,23 +39,6 @@ using namespace std; -struct Glob : public vector<char const *> { - glob_t glob_result; -public: - Glob(string const & pattern) { - int result = glob(pattern.c_str(), GLOB_TILDE | GLOB_BRACE, NULL, &glob_result); - if (result) { - stringstream ss; - ss << "Glob(" << pattern << ") failed with error " << result << endl; - throw runtime_error(ss.str()); - } - assign(glob_result.gl_pathv, glob_result.gl_pathv + glob_result.gl_pathc); - }; - void operator~() { - globfree(&glob_result); - } -}; - static vector<string> files; static int @@ -131,10 +115,9 @@ void analyze(string basedir, string version) { builddir << "/build/" << version; stringstream basebuilddir; basebuilddir << basedir << builddir.str(); - pattern << basedir << "/{src,asm}/**/*.{c,s,cpp}"; - // Recursively search the src/ and asm/ directories for - // .c, .cpp, and .s files, accumulating them all into files + // Recursively search the /src and /asm directories for + // .c, .cpp, and .s files, accumulating them all into the files vector string srcdir = basedir + "/src"; string asmdir = basedir + "/asm"; if (nftw(srcdir.c_str(), get_files, 20, 0) == -1) { |