summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-10 14:23:30 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-10 14:23:30 (GMT)
commite8cdbec45e757352580476a329f4998074d1b10a (patch)
tree153c5ef5d7df9babfdbf71f8439af36f668bdcdf
parentd3f1fcf6d19d4f4384861b4f342b632d249e1449 (diff)
parentc22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 (diff)
downloadCMake-e8cdbec45e757352580476a329f4998074d1b10a.zip
CMake-e8cdbec45e757352580476a329f4998074d1b10a.tar.gz
CMake-e8cdbec45e757352580476a329f4998074d1b10a.tar.bz2
Merge topic 'update-kwsys'
c22f3cf7 Merge branch 'upstream-KWSys' into update-kwsys bf28a387 KWSys 2016-10-07 (dfe9b386)
-rw-r--r--Source/kwsys/SystemTools.cxx20
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