[Cmake-commits] CMake branch, next, updated. v3.3.1-2833-g12eaeeb

Brad King brad.king at kitware.com
Thu Sep 10 10:03:33 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  12eaeeb08d00f001b8471dc0f2fe011966c1e923 (commit)
       via  745f0dc5076a91e021df968a5fa820879b235c26 (commit)
      from  18a1e129f5f68ecc33af8a4b7b634d34c95ada91 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12eaeeb08d00f001b8471dc0f2fe011966c1e923
commit 12eaeeb08d00f001b8471dc0f2fe011966c1e923
Merge: 18a1e12 745f0dc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 10 10:03:32 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 10 10:03:32 2015 -0400

    Merge topic 'fix-TrimWhitespace' into next
    
    745f0dc5 fixup! cmSystemTools: Fix TrimWhitespace for non-ascii strings (#15735)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=745f0dc5076a91e021df968a5fa820879b235c26
commit 745f0dc5076a91e021df968a5fa820879b235c26
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 10 10:03:09 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 10 10:03:09 2015 -0400

    fixup! cmSystemTools: Fix TrimWhitespace for non-ascii strings (#15735)

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 1fe76ef..005a803 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -68,6 +68,11 @@
 # include "cmMachO.h"
 #endif
 
+static bool cm_isspace(char c)
+{
+  return ((c & 0x80) == 0) && isspace(c);
+}
+
 class cmSystemToolsFileTime
 {
 public:
@@ -228,13 +233,13 @@ std::string cmSystemTools::HelpFileName(std::string name)
 std::string cmSystemTools::TrimWhitespace(const std::string& s)
 {
   std::string::const_iterator start = s.begin();
-  while (start != s.end() && ((*start & 0x80) == 0 ) && isspace(*start))
+  while (start != s.end() && cm_isspace(*start))
     ++start;
   if (start == s.end())
     return "";
 
   std::string::const_iterator stop = s.end()-1;
-  while ( ((*start & 0x80) == 0 ) && isspace(*stop))
+  while (cm_isspace(*stop))
     --stop;
   return std::string(start, stop+1);
 }
@@ -496,7 +501,7 @@ void cmSystemTools::ParseWindowsCommandLine(const char* command,
       {
       arg.append(backslashes, '\\');
       backslashes = 0;
-      if(((*c & 0x80) == 0 ) && isspace(*c))
+      if (cm_isspace(*c))
         {
         if(in_quotes)
           {

-----------------------------------------------------------------------

Summary of changes:
 Source/cmSystemTools.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list