Remove trailing whitespace from most CMake and C/C++ code

Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
This commit is contained in:
Kitware Robot
2012-08-13 13:42:58 -04:00
committed by Brad King
parent be9db98946
commit 7bbaa4283d
614 changed files with 3951 additions and 3951 deletions
+10 -10
View File
@@ -20,7 +20,7 @@ bool cmSetCommand
this->SetError("called with incorrect number of arguments");
return false;
}
// watch for ENV signatures
const char* variable = args[0].c_str(); // VAR is always first
if (!strncmp(variable,"ENV{",4) && strlen(variable) > 5)
@@ -31,7 +31,7 @@ bool cmSetCommand
varName[strlen(variable)-5] = '\0';
std::string putEnvArg = varName;
putEnvArg += "=";
// what is the current value if any
const char *currValue = getenv(varName);
delete [] varName;
@@ -47,7 +47,7 @@ bool cmSetCommand
}
return true;
}
// if it will be cleared, then clear it if it isn;t already clear
if (currValue)
{
@@ -55,7 +55,7 @@ bool cmSetCommand
}
return true;
}
// SET (VAR) // Removes the definition of VAR.
if (args.size() == 1)
{
@@ -63,7 +63,7 @@ bool cmSetCommand
return true;
}
// here are the remaining options
// here are the remaining options
// SET (VAR value )
// SET (VAR CACHE TYPE "doc String" [FORCE])
// SET (VAR value CACHE TYPE "doc string" [FORCE])
@@ -71,10 +71,10 @@ bool cmSetCommand
bool cache = false; // optional
bool force = false; // optional
bool parentScope = false;
cmCacheManager::CacheEntryType type
cmCacheManager::CacheEntryType type
= cmCacheManager::STRING; // required if cache
const char* docstring = 0; // required if cache
unsigned int ignoreLastArgs = 0;
// look for PARENT_SCOPE argument
if (args.size() > 1 && args[args.size()-1] == "PARENT_SCOPE")
@@ -136,7 +136,7 @@ bool cmSetCommand
this->SetError("given invalid arguments for CACHE mode.");
return false;
}
if(cache)
{
std::string::size_type cacheStart = args.size() - 3 - (force ? 1 : 0);
@@ -145,7 +145,7 @@ bool cmSetCommand
}
// see if this is already in the cache
cmCacheManager::CacheIterator it =
cmCacheManager::CacheIterator it =
this->Makefile->GetCacheManager()->GetCacheIterator(variable);
if(!it.IsAtEnd() && (it.GetType() != cmCacheManager::UNINITIALIZED))
{
@@ -158,7 +158,7 @@ bool cmSetCommand
return true;
}
}
// if it is meant to be in the cache then define it in the cache
if(cache)
{