summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax <mparisi@stevens.edu>2020-09-20 23:13:47 -0400
committerMax <mparisi@stevens.edu>2020-09-20 23:13:47 -0400
commitd57113ba791de4a4edaccb1d9b3ee53316f88032 (patch)
tree219f7044400f6afa9532875a0d386a4fe5c4d07d
parent3caf86eee2da7bf65a4ce785e79bc872cf2a5955 (diff)
updated calcrom changelog, removed unused Glob class
-rw-r--r--.travis/calcrom/calcrom.cpp25
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) {