summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-08 09:28:15 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-08 09:28:15 (GMT)
commit9f240cff8ad14832dbc5472917b3b2e3fe813e46 (patch)
tree9a508ee19594912062ab1afd22506db702da7b93 /Source
parent5d8da06d60138c18eb68fab01b9b6e736ecd4914 (diff)
parentc22f3cf7153fcf766d0ecc17d72e93bf4209e0b2 (diff)
downloadCMake-9f240cff8ad14832dbc5472917b3b2e3fe813e46.zip
CMake-9f240cff8ad14832dbc5472917b3b2e3fe813e46.tar.gz
CMake-9f240cff8ad14832dbc5472917b3b2e3fe813e46.tar.bz2
Merge branch 'update-kwsys' into release
Diffstat (limited to 'Source')
-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