[Cmake-commits] [cmake-commits] king committed cmFileCommand.cxx 1.108 1.109

cmake-commits at cmake.org cmake-commits at cmake.org
Sat May 17 11:42:14 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1269/Source

Modified Files:
	cmFileCommand.cxx 
Log Message:
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.


Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.108
retrieving revision 1.109
diff -C 2 -d -r1.108 -r1.109
*** cmFileCommand.cxx	16 May 2008 21:50:24 -0000	1.108
--- cmFileCommand.cxx	17 May 2008 15:42:11 -0000	1.109
***************
*** 534,547 ****
          (c = fin.get(), fin))
      {
!     if(c == '\0' || c == '\f')
        {
!       // 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.
        if(s.length() >= minlen && s.length() >= 1 &&
           (!have_regex || regex.find(s.c_str())))
--- 534,543 ----
          (c = fin.get(), fin))
      {
!     if(c == '\0')
        {
!       // 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())))
***************
*** 583,587 ****
        // Ignore CR character to make output always have UNIX newlines.
        }
!     else if(c >= 0x20 && c < 0x7F || c == '\t' ||
              (c == '\n' && newline_consume))
        {
--- 579,583 ----
        // Ignore CR character to make output always have UNIX newlines.
        }
!     else if(c >= 0x20 && c < 0x7F || c == '\t' || c == '\f' ||
              (c == '\n' && newline_consume))
        {



More information about the Cmake-commits mailing list