diff options
author | Brad King <brad.king@kitware.com> | 2016-10-08 09:25:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-10-08 09:25:35 (GMT) |
commit | c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 (patch) | |
tree | 161a6bca70be48a38cdea303d70315277f9684fd /Source/kwsys | |
parent | b99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (diff) | |
parent | bf28a3873d633d233991f14e8e4d10c76f410deb (diff) | |
download | CMake-c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2.zip CMake-c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2.tar.gz CMake-c22f3cf7153fcf766d0ecc17d72e93bf4209e0b2.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2016-10-07 (dfe9b386)
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index c97af25..5da715f 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -2716,17 +2716,15 @@ unsigned long SystemTools::FileLength(const std::string& filename) return length; } -int SystemTools::Strucmp(const char *s1, const char *s2) -{ - // lifted from Graphvis http://www.graphviz.org - while ((*s1 != '\0') - && (tolower(*s1) == tolower(*s2))) - { - s1++; - s2++; - } - - return tolower(*s1) - tolower(*s2); +int SystemTools::Strucmp(const char* l, const char* r) +{ + int lc; + int rc; + do { + lc = tolower(*l++); + rc = tolower(*r++); + } while(lc == rc && lc); + return lc - rc; } // return file's modified time |