diff options
author | Brad King <brad.king@kitware.com> | 2008-05-17 15:42:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-05-17 15:42:11 (GMT) |
commit | b9ede3c86d046baa36c79111f0d7ab4b42bdc8dc (patch) | |
tree | fecc88bfc67f126282fd52e4ca297c488c1f5576 /Source | |
parent | 7ed8deeac2e6cf5ffc0151590f1270fa0da43f45 (diff) | |
download | CMake-b9ede3c86d046baa36c79111f0d7ab4b42bdc8dc.zip CMake-b9ede3c86d046baa36c79111f0d7ab4b42bdc8dc.tar.gz CMake-b9ede3c86d046baa36c79111f0d7ab4b42bdc8dc.tar.bz2 |
BUG: Fix previous change to file(STRINGS) command.
- Previous change added form-feed as a string terminator.
- Instead it should just be recognized as a valid string character.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 23272f7..be2bf65 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -533,16 +533,12 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args) (limit_input < 0 || static_cast<int>(fin.tellg()) < limit_input) && (c = fin.get(), fin)) { - if(c == '\0' || c == '\f') + if(c == '\0') { - // A terminating character has been found. In most cases it is - // a NULL character, but at least one compiler (Portland Group - // Fortran) produces binaries that terminate strings with a form - // feed. - - // Check if the current string matches the requirements. Since - // it was terminated by a null character, we require that the - // length be at least one no matter what the user specified. + // A terminating null character has been found. Check if the + // current string matches the requirements. Since it was + // terminated by a null character, we require that the length be + // at least one no matter what the user specified. if(s.length() >= minlen && s.length() >= 1 && (!have_regex || regex.find(s.c_str()))) { @@ -582,7 +578,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args) { // Ignore CR character to make output always have UNIX newlines. } - else if(c >= 0x20 && c < 0x7F || c == '\t' || + else if(c >= 0x20 && c < 0x7F || c == '\t' || c == '\f' || (c == '\n' && newline_consume)) { // This is an ASCII character that may be part of a string. |