summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmSystemTools.cxx20
1 files changed, 3 insertions, 17 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5c36e69..44474a5 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -484,18 +484,6 @@ const char *cmSystemTools::ConvertToWindowsSlashesAndCleanUp(std::string& path)
return path.c_str();
}
-inline void CleanText(char* s)
-{
- while(*s != 0)
- {
- if(*s == '\r')
- {
- *s = ' ';
- }
- s++;
- }
-}
-
bool cmSystemTools::ParseFunction(std::ifstream& fin,
std::string& name,
std::vector<std::string>& arguments,
@@ -511,12 +499,11 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin,
}
if(fin.getline(inbuffer, BUFFER_SIZE ) )
{
- CleanText(&inbuffer[0]);
- cmRegularExpression blankLine("^[ \t]*$");
+ cmRegularExpression blankLine("^[ \t\r]*$");
cmRegularExpression comment("^[ \t]*#.*$");
- cmRegularExpression oneLiner("^[ \t]*([A-Za-z_0-9]*)[ \t]*\\((.*)\\)[ \t]*$");
+ cmRegularExpression oneLiner("^[ \t]*([A-Za-z_0-9]*)[ \t]*\\((.*)\\)[ \t\r]*$");
cmRegularExpression multiLine("^[ \t]*([A-Za-z_0-9]*)[ \t]*\\((.*)$");
- cmRegularExpression lastLine("^(.*)\\)[ \t]*$");
+ cmRegularExpression lastLine("^(.*)\\)[ \t\r]*$");
// check for black line or comment
if(blankLine.find(inbuffer) || comment.find(inbuffer))
@@ -546,7 +533,6 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin,
// read lines until the end paren is found
if(fin.getline(inbuffer, BUFFER_SIZE ) )
{
- CleanText(&inbuffer[0]);
// Check for comment lines and ignore them.
if(blankLine.find(inbuffer) || comment.find(inbuffer))
{ continue; }