"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "projects/CodeThorn/src/Miscellaneous.C" between
rose-0.11.49.0.tar.gz and rose-0.11.50.0.tar.gz

About: ROSE is a compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C, C++, UPC, Fortran, OpenMP, Java, Python and PHP applications.

Miscellaneous.C  (rose-0.11.49.0):Miscellaneous.C  (rose-0.11.50.0)
skipping to change at line 163 skipping to change at line 163
} }
} }
fclose(statm); fclose(statm);
#endif #endif
if (physicalMemoryUsedUnix == -1) { if (physicalMemoryUsedUnix == -1) {
cerr << "ERROR: Physical memory consumption could not be determined." << end l; cerr << "ERROR: Physical memory consumption could not be determined." << end l;
ROSE_ASSERT(0); ROSE_ASSERT(0);
} }
return physicalMemoryUsedUnix; return physicalMemoryUsedUnix;
} }
bool CodeThorn::checkRoseVersionNumber(const std::string &need) {
string have=string(ROSE_PACKAGE_VERSION);
return CodeThorn::checkVersionNumber(need,have);
}
bool CodeThorn::checkCodeThornLibraryVersionNumber(const std::string &need) {
string have = CodeThorn::CodeThornLib::getCodeThornLibraryVersionNumber();
return CodeThorn::checkVersionNumber(need,have);
}
bool CodeThorn::checkVersionNumber(const std::string &need, const std::string &h
ave) {
std::vector<std::string> needParts = Rose::StringUtility::split('.', need);
std::vector<std::string> haveParts = Rose::StringUtility::split('.', have);
for (size_t i=0; i < needParts.size() && i < haveParts.size(); ++i) {
int needPartInt=std::stoi(needParts[i]);
int havePartInt=std::stoi(haveParts[i]);
if (needPartInt != havePartInt)
return needPartInt < havePartInt;
}
// E.g., need = "1.2" and have = "1.2.x", or vice versa
return true;
}
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)