diff --git a/.gitattributes b/.gitattributes index 235e3805f13b25b0cf1ebf21a0725cd71949e966..8155c914276e07286091fba590f60971b8190c98 100644 --- a/.gitattributes +++ b/.gitattributes @@ -204,6 +204,8 @@ tools/transforms/integerbugtransform.cpp -text tools/transforms/nulltransform.cpp -text tools/transforms/p1transform.cpp -text tools/transforms/p1transform.h -text +tools/transforms/transformutils.cpp -text +tools/transforms/transformutils.h -text xform/Makefile -text xform/all.h -text xform/aspri.h -text diff --git a/tools/transforms/p1transform.cpp b/tools/transforms/p1transform.cpp index d18c2d4a1a35e89fc90fbe2610f60d1c438390c2..574549335588c4d2a2dda26762a9945df7535de1 100644 --- a/tools/transforms/p1transform.cpp +++ b/tools/transforms/p1transform.cpp @@ -5,31 +5,6 @@ using namespace libIRDB; using namespace std; -/* -static set<std::string> getFunctionList(char *p_filename) -{ - set<std::string> functionList; - - ifstream candidateFile; - candidateFile.open(p_filename); - - if(candidateFile.is_open()) - { - while(!candidateFile.eof()) - { - string functionName; - getline(candidateFile, functionName); - - functionList.insert(functionName); - } - - candidateFile.close(); - } - - return functionList; -} -*/ - P1Transform::P1Transform() { /* Initialize regular expressions */ diff --git a/tools/transforms/transformutils.cpp b/tools/transforms/transformutils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2adea8d13be7335e04b1c7d884dff459d07c86ab --- /dev/null +++ b/tools/transforms/transformutils.cpp @@ -0,0 +1,31 @@ +#include <iostream> +#include <fstream> +#include <string> + +#include "transformutils.h" + +using namespace std; + +set<string> getFunctionList(char *p_filename) +{ + set<string> functionList; + + ifstream candidateFile; + candidateFile.open(p_filename); + + if(candidateFile.is_open()) + { + while(!candidateFile.eof()) + { + string functionName; + getline(candidateFile, functionName); + + functionList.insert(functionName); + } + + candidateFile.close(); + } + + return functionList; +} + diff --git a/tools/transforms/transformutils.h b/tools/transforms/transformutils.h new file mode 100644 index 0000000000000000000000000000000000000000..b43cd6c09cc313582cdfa5809bf4c298743894a8 --- /dev/null +++ b/tools/transforms/transformutils.h @@ -0,0 +1,9 @@ +#ifndef _TRANSFORM_UTILS_ +#define _TRANSFORM_UTILS_ + +#include <string> +#include <set> + +extern std::set<std::string> getFunctionList(char *p_filename); + +#endif