summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBZR.cxx14
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx18
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx16
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx23
-rw-r--r--Source/CTest/cmCTestCVS.cxx5
-rw-r--r--Source/CTest/cmCTestCommand.h4
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx17
-rw-r--r--Source/CTest/cmCTestCoverageCommand.cxx2
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx10
-rw-r--r--Source/CTest/cmCTestCurl.cxx2
-rw-r--r--Source/CTest/cmCTestGIT.cxx39
-rw-r--r--Source/CTest/cmCTestGenericHandler.cxx4
-rw-r--r--Source/CTest/cmCTestHG.cxx11
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx4
-rw-r--r--Source/CTest/cmCTestLaunch.cxx12
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx18
-rw-r--r--Source/CTest/cmCTestP4.cxx14
-rw-r--r--Source/CTest/cmCTestRunTest.cxx6
-rw-r--r--Source/CTest/cmCTestSVN.cxx2
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx16
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx6
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx4
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx14
-rw-r--r--Source/CTest/cmCTestSubmitHandler.h2
-rw-r--r--Source/CTest/cmCTestTestCommand.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx15
-rw-r--r--Source/CTest/cmCTestUpdateCommand.cxx4
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx2
-rw-r--r--Source/CTest/cmCTestUploadCommand.cxx2
-rw-r--r--Source/CTest/cmCTestVC.cxx2
-rw-r--r--Source/CTest/cmCTestVC.h8
-rw-r--r--Source/CTest/cmParseMumpsCoverage.cxx4
-rw-r--r--Source/CTest/cmProcess.cxx4
33 files changed, 160 insertions, 146 deletions
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index 17d4eef..0e08e1c 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -139,13 +139,13 @@ std::string cmCTestBZR::LoadInfo()
{
// Run "bzr info" to get the repository info from the work tree.
const char* bzr = this->CommandLineTool.c_str();
- const char* bzr_info[] = { bzr, "info", 0 };
+ const char* bzr_info[] = { bzr, "info", CM_NULLPTR };
InfoParser iout(this, "info-out> ");
OutputLogger ierr(this->Log, "info-err> ");
this->RunChild(bzr_info, &iout, &ierr);
// Run "bzr revno" to get the repository revision number from the work tree.
- const char* bzr_revno[] = { bzr, "revno", 0 };
+ const char* bzr_revno[] = { bzr, "revno", CM_NULLPTR };
std::string rev;
RevnoParser rout(this, "revno-out> ", rev);
OutputLogger rerr(this->Log, "revno-err> ");
@@ -190,7 +190,8 @@ public:
int res = cmXMLParser::InitializeParser();
if (res) {
XML_SetUnknownEncodingHandler(static_cast<XML_Parser>(this->Parser),
- cmBZRXMLParserUnknownEncodingHandler, 0);
+ cmBZRXMLParserUnknownEncodingHandler,
+ CM_NULLPTR);
}
return res;
}
@@ -380,7 +381,7 @@ bool cmCTestBZR::UpdateImpl()
bzr_update.push_back(this->URL.c_str());
- bzr_update.push_back(0);
+ bzr_update.push_back(CM_NULLPTR);
// For some reason bzr uses stderr to display the update status.
OutputLogger out(this->Log, "pull-out> ");
@@ -408,7 +409,8 @@ void cmCTestBZR::LoadRevisions()
// Run "bzr log" to get all global revisions of interest.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_log[] = {
- bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(), 0
+ bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(),
+ CM_NULLPTR
};
{
LogParser out(this, "log-out> ");
@@ -465,7 +467,7 @@ void cmCTestBZR::LoadModifications()
{
// Run "bzr status" which reports local modifications.
const char* bzr = this->CommandLineTool.c_str();
- const char* bzr_status[] = { bzr, "status", "-SV", 0 };
+ const char* bzr_status[] = { bzr, "status", "-SV", CM_NULLPTR };
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(bzr_status, &out, &err);
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 632f452..eddbddc 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -72,7 +72,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
args.push_back(toolset);
}
- const char* config = 0;
+ const char* config = CM_NULLPTR;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
@@ -158,10 +158,10 @@ public:
}
~cmCTestBuildAndTestCaptureRAII()
{
- this->CM.SetProgressCallback(0, 0);
- cmSystemTools::SetStderrCallback(0, 0);
- cmSystemTools::SetStdoutCallback(0, 0);
- cmSystemTools::SetMessageCallback(0, 0);
+ this->CM.SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
+ cmSystemTools::SetStderrCallback(CM_NULLPTR, CM_NULLPTR);
+ cmSystemTools::SetStdoutCallback(CM_NULLPTR, CM_NULLPTR);
+ cmSystemTools::SetMessageCallback(CM_NULLPTR, CM_NULLPTR);
}
};
@@ -247,7 +247,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
std::string output;
- const char* config = 0;
+ const char* config = CM_NULLPTR;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
@@ -321,7 +321,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
for (size_t k = 0; k < this->TestCommandArgs.size(); ++k) {
testCommand.push_back(this->TestCommandArgs[k].c_str());
}
- testCommand.push_back(0);
+ testCommand.push_back(CM_NULLPTR);
std::string outs;
int retval = 0;
// run the test from the this->BuildRunDir if set
@@ -347,8 +347,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
- int runTestRes =
- this->CTest->RunTest(testCommand, &outs, &retval, 0, remainingTime, 0);
+ int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval,
+ CM_NULLPTR, remainingTime, CM_NULLPTR);
if (runTestRes != cmsysProcess_State_Exited || retval != 0) {
out << "Test command failed: " << testCommand[0] << "\n";
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 05cccbf..408a1a8 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -19,14 +19,14 @@
cmCTestBuildCommand::cmCTestBuildCommand()
{
- this->GlobalGenerator = 0;
+ this->GlobalGenerator = CM_NULLPTR;
this->Arguments[ctb_NUMBER_ERRORS] = "NUMBER_ERRORS";
this->Arguments[ctb_NUMBER_WARNINGS] = "NUMBER_WARNINGS";
this->Arguments[ctb_TARGET] = "TARGET";
this->Arguments[ctb_CONFIGURATION] = "CONFIGURATION";
this->Arguments[ctb_FLAGS] = "FLAGS";
this->Arguments[ctb_PROJECT_NAME] = "PROJECT_NAME";
- this->Arguments[ctb_LAST] = 0;
+ this->Arguments[ctb_LAST] = CM_NULLPTR;
this->Last = ctb_LAST;
}
@@ -34,7 +34,7 @@ cmCTestBuildCommand::~cmCTestBuildCommand()
{
if (this->GlobalGenerator) {
delete this->GlobalGenerator;
- this->GlobalGenerator = 0;
+ this->GlobalGenerator = CM_NULLPTR;
}
}
@@ -43,7 +43,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("build");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate build handler");
- return 0;
+ return CM_NULLPTR;
}
this->Handler = (cmCTestBuildHandler*)handler;
@@ -91,7 +91,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
if (this->GlobalGenerator) {
if (this->GlobalGenerator->GetName() != cmakeGeneratorName) {
delete this->GlobalGenerator;
- this->GlobalGenerator = 0;
+ this->GlobalGenerator = CM_NULLPTR;
}
}
if (!this->GlobalGenerator) {
@@ -104,11 +104,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
e += "\"";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
cmSystemTools::SetFatalErrorOccured();
- return 0;
+ return CM_NULLPTR;
}
}
if (strlen(cmakeBuildConfiguration) == 0) {
- const char* config = 0;
+ const char* config = CM_NULLPTR;
#ifdef CMAKE_INTDIR
config = CMAKE_INTDIR;
#endif
@@ -145,7 +145,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
"with a custom command line.";
/* clang-format on */
this->SetError(ostr.str());
- return 0;
+ return CM_NULLPTR;
}
}
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index a4d9dee..f96ef6d 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -92,7 +92,7 @@ static const char* cmCTestErrorMatches[] = {
"^The project cannot be built\\.",
"^\\[ERROR\\]",
"^Command .* failed with exit code",
- 0
+ CM_NULLPTR
};
static const char* cmCTestErrorExceptions[] = {
@@ -107,7 +107,7 @@ static const char* cmCTestErrorExceptions[] = {
":[ \\t]+Where:",
"([^ :]+):([0-9]+): Warning",
"------ Build started: .* ------",
- 0
+ CM_NULLPTR
};
static const char* cmCTestWarningMatches[] = {
@@ -132,7 +132,7 @@ static const char* cmCTestWarningMatches[] = {
"cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*",
"^CMake Warning.*:",
"^\\[WARNING\\]",
- 0
+ CM_NULLPTR
};
static const char* cmCTestWarningExceptions[] = {
@@ -152,7 +152,7 @@ static const char* cmCTestWarningExceptions[] = {
"ld32: WARNING 85: definition of dataKey in",
"cc: warning 422: Unknown option \"\\+b",
"_with_warning_C",
- 0
+ CM_NULLPTR
};
struct cmCTestBuildCompileErrorWarningRex
@@ -170,7 +170,7 @@ static cmCTestBuildCompileErrorWarningRex cmCTestWarningErrorFileLine[] = {
{ "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 },
{ "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2 },
- { 0, 0, 0 }
+ { CM_NULLPTR, 0, 0 }
};
cmCTestBuildHandler::cmCTestBuildHandler()
@@ -521,7 +521,7 @@ public:
{
}
FragmentCompare()
- : FTC(0)
+ : FTC(CM_NULLPTR)
{
}
bool operator()(std::string const& l, std::string const& r)
@@ -799,7 +799,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
a != args.end(); ++a) {
argv.push_back(a->c_str());
}
- argv.push_back(0);
+ argv.push_back(CM_NULLPTR);
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
this->Quiet);
@@ -851,7 +851,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
// For every chunk of data
int res;
- while ((res = cmsysProcess_WaitForData(cp, &data, &length, 0))) {
+ while ((res = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR))) {
// Replace '\0' with '\n', since '\0' does not really make sense. This is
// for Visual Studio output
for (int cc = 0; cc < length; ++cc) {
@@ -870,8 +870,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
}
}
- this->ProcessBuffer(0, 0, tick, tick_len, ofs, &this->BuildProcessingQueue);
- this->ProcessBuffer(0, 0, tick, tick_len, ofs,
+ this->ProcessBuffer(CM_NULLPTR, 0, tick, tick_len, ofs,
+ &this->BuildProcessingQueue);
+ this->ProcessBuffer(CM_NULLPTR, 0, tick, tick_len, ofs,
&this->BuildProcessingErrorQueue);
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size of output: "
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
@@ -879,7 +880,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
this->Quiet);
// Properly handle output of the build command
- cmsysProcess_WaitForExit(cp, 0);
+ cmsysProcess_WaitForExit(cp, CM_NULLPTR);
int result = cmsysProcess_GetState(cp);
if (result == cmsysProcess_State_Exited) {
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
index df19685..37bdf9a 100644
--- a/Source/CTest/cmCTestCVS.cxx
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -103,7 +103,7 @@ bool cmCTestCVS::UpdateImpl()
ai != args.end(); ++ai) {
cvs_update.push_back(ai->c_str());
}
- cvs_update.push_back(0);
+ cvs_update.push_back(CM_NULLPTR);
UpdateParser out(this, "up-out> ");
UpdateParser err(this, "up-err> ");
@@ -229,7 +229,8 @@ void cmCTestCVS::LoadRevisions(std::string const& file, const char* branchFlag,
// Run "cvs log" to get revisions of this file on this branch.
const char* cvs = this->CommandLineTool.c_str();
- const char* cvs_log[] = { cvs, "log", "-N", branchFlag, file.c_str(), 0 };
+ const char* cvs_log[] = { cvs, "log", "-N",
+ branchFlag, file.c_str(), CM_NULLPTR };
LogParser out(this, "log-out> ", revisions);
OutputLogger err(this->Log, "log-err> ");
diff --git a/Source/CTest/cmCTestCommand.h b/Source/CTest/cmCTestCommand.h
index 22a2c8e..b0c9206 100644
--- a/Source/CTest/cmCTestCommand.h
+++ b/Source/CTest/cmCTestCommand.h
@@ -29,8 +29,8 @@ class cmCTestCommand : public cmCommand
public:
cmCTestCommand()
{
- this->CTest = 0;
- this->CTestScriptHandler = 0;
+ this->CTest = CM_NULLPTR;
+ this->CTestScriptHandler = CM_NULLPTR;
}
cmCTest* CTest;
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index a90f27a..a823704 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -18,7 +18,7 @@
cmCTestConfigureCommand::cmCTestConfigureCommand()
{
this->Arguments[ctc_OPTIONS] = "OPTIONS";
- this->Arguments[ctc_LAST] = 0;
+ this->Arguments[ctc_LAST] = CM_NULLPTR;
this->Last = ctc_LAST;
}
@@ -35,7 +35,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
"Build directory not specified. Either use BUILD "
"argument to CTEST_CONFIGURE command or set CTEST_BINARY_DIRECTORY "
"variable");
- return 0;
+ return CM_NULLPTR;
}
const char* ctestConfigureCommand =
@@ -55,7 +55,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
"Source directory not specified. Either use SOURCE "
"argument to CTEST_CONFIGURE command or set CTEST_SOURCE_DIRECTORY "
"variable");
- return 0;
+ return CM_NULLPTR;
}
const std::string cmakelists_file = source_dir + "/CMakeLists.txt";
@@ -63,7 +63,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
std::ostringstream e;
e << "CMakeLists.txt file does not exist [" << cmakelists_file << "]";
this->SetError(e.str());
- return 0;
+ return CM_NULLPTR;
}
bool multiConfig = false;
@@ -90,8 +90,9 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
cmakeConfigureCommand += option;
cmakeConfigureCommand += "\"";
- if ((0 != strstr(option.c_str(), "CMAKE_BUILD_TYPE=")) ||
- (0 != strstr(option.c_str(), "CMAKE_BUILD_TYPE:STRING="))) {
+ if ((CM_NULLPTR != strstr(option.c_str(), "CMAKE_BUILD_TYPE=")) ||
+ (CM_NULLPTR !=
+ strstr(option.c_str(), "CMAKE_BUILD_TYPE:STRING="))) {
cmakeBuildTypeInOptions = true;
}
}
@@ -134,7 +135,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
"Configure command is not specified. If this is a "
"\"built with CMake\" project, set CTEST_CMAKE_GENERATOR. If not, "
"set CTEST_CONFIGURE_COMMAND.");
- return 0;
+ return CM_NULLPTR;
}
}
@@ -143,7 +144,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
if (!handler) {
this->SetError(
"internal CTest error. Cannot instantiate configure handler");
- return 0;
+ return CM_NULLPTR;
}
handler->SetQuiet(this->Quiet);
return handler;
diff --git a/Source/CTest/cmCTestCoverageCommand.cxx b/Source/CTest/cmCTestCoverageCommand.cxx
index 223d010..86e3ce4 100644
--- a/Source/CTest/cmCTestCoverageCommand.cxx
+++ b/Source/CTest/cmCTestCoverageCommand.cxx
@@ -30,7 +30,7 @@ cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
this->CTest->GetInitializedHandler("coverage"));
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate test handler");
- return 0;
+ return CM_NULLPTR;
}
// If a LABELS option was given, select only files with the labels.
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index a631db9..7102533 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -76,7 +76,7 @@ public:
i != this->CommandLineStrings.end(); ++i) {
args.push_back(i->c_str());
}
- args.push_back(0); // null terminate
+ args.push_back(CM_NULLPTR); // null terminate
cmsysProcess_SetCommand(this->Process, &*args.begin());
if (!this->WorkingDirectory.empty()) {
cmsysProcess_SetWorkingDirectory(this->Process,
@@ -101,7 +101,7 @@ public:
{
cmsysProcess_SetPipeFile(this->Process, cmsysProcess_Pipe_STDERR, fname);
}
- int WaitForExit(double* timeout = 0)
+ int WaitForExit(double* timeout = CM_NULLPTR)
{
this->PipeState = cmsysProcess_WaitForExit(this->Process, timeout);
return this->PipeState;
@@ -1781,7 +1781,7 @@ const char* bullseyeHelp[] = {
" condition evaluated true or false, respectively.",
" * A k indicates a constant decision or condition.",
" * The slash / means this probe is excluded from summary results. ",
- 0
+ CM_NULLPTR
};
}
@@ -1809,7 +1809,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"run covbr: " << std::endl, this->Quiet);
- if (!this->RunBullseyeCommand(cont, "covbr", 0, outputFile)) {
+ if (!this->RunBullseyeCommand(cont, "covbr", CM_NULLPTR, outputFile)) {
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for."
<< "\n");
return -1;
@@ -1882,7 +1882,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
covLogXML.StartElement("Report");
// write the bullseye header
line = 0;
- for (int k = 0; bullseyeHelp[k] != 0; ++k) {
+ for (int k = 0; bullseyeHelp[k] != CM_NULLPTR; ++k) {
covLogXML.StartElement("Line");
covLogXML.Attribute("Number", line);
covLogXML.Attribute("Count", -1);
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx
index 4818324..6b8e5b5 100644
--- a/Source/CTest/cmCTestCurl.cxx
+++ b/Source/CTest/cmCTestCurl.cxx
@@ -147,7 +147,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
::curl_easy_setopt(this->Curl, CURLOPT_DEBUGFUNCTION, curlDebugCallback);
// Be sure to set Content-Type to satisfy fussy modsecurity rules
struct curl_slist* headers =
- ::curl_slist_append(NULL, "Content-Type: text/xml");
+ ::curl_slist_append(CM_NULLPTR, "Content-Type: text/xml");
::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, headers);
std::vector<char> responseData;
std::vector<char> debugData;
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 36a781e..61dbe33 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -64,7 +64,8 @@ std::string cmCTestGIT::GetWorkingRevision()
{
// Run plumbing "git rev-list" to get work tree revision.
const char* git = this->CommandLineTool.c_str();
- const char* git_rev_list[] = { git, "rev-list", "-n", "1", "HEAD", "--", 0 };
+ const char* git_rev_list[] = { git, "rev-list", "-n", "1",
+ "HEAD", "--", CM_NULLPTR };
std::string rev;
OneLineParser out(this, "rl-out> ", rev);
OutputLogger err(this->Log, "rl-err> ");
@@ -93,7 +94,7 @@ std::string cmCTestGIT::FindGitDir()
// Run "git rev-parse --git-dir" to locate the real .git directory.
const char* git = this->CommandLineTool.c_str();
- char const* git_rev_parse[] = { git, "rev-parse", "--git-dir", 0 };
+ char const* git_rev_parse[] = { git, "rev-parse", "--git-dir", CM_NULLPTR };
std::string git_dir_line;
OneLineParser rev_parse_out(this, "rev-parse-out> ", git_dir_line);
OutputLogger rev_parse_err(this->Log, "rev-parse-err> ");
@@ -135,7 +136,8 @@ std::string cmCTestGIT::FindTopDir()
// Run "git rev-parse --show-cdup" to locate the top of the tree.
const char* git = this->CommandLineTool.c_str();
- char const* git_rev_parse[] = { git, "rev-parse", "--show-cdup", 0 };
+ char const* git_rev_parse[] = { git, "rev-parse", "--show-cdup",
+ CM_NULLPTR };
std::string cdup;
OneLineParser rev_parse_out(this, "rev-parse-out> ", cdup);
OutputLogger rev_parse_err(this->Log, "rev-parse-err> ");
@@ -169,7 +171,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
}
// Sentinel argument.
- git_fetch.push_back(0);
+ git_fetch.push_back(CM_NULLPTR);
// Fetch upstream refs.
OutputLogger fetch_out(this->Log, "fetch-out> ");
@@ -204,7 +206,8 @@ bool cmCTestGIT::UpdateByFetchAndReset()
}
// Reset the local branch to point at that tracked from upstream.
- char const* git_reset[] = { git, "reset", "--hard", sha1.c_str(), 0 };
+ char const* git_reset[] = { git, "reset", "--hard", sha1.c_str(),
+ CM_NULLPTR };
OutputLogger reset_out(this->Log, "reset-out> ");
OutputLogger reset_err(this->Log, "reset-err> ");
return this->RunChild(&git_reset[0], &reset_out, &reset_err);
@@ -219,7 +222,7 @@ bool cmCTestGIT::UpdateByCustom(std::string const& custom)
i != git_custom_command.end(); ++i) {
git_custom.push_back(i->c_str());
}
- git_custom.push_back(0);
+ git_custom.push_back(CM_NULLPTR);
OutputLogger custom_out(this->Log, "custom-out> ");
OutputLogger custom_err(this->Log, "custom-err> ");
@@ -248,7 +251,7 @@ bool cmCTestGIT::UpdateImpl()
// Git < 1.6.5 did not support submodule --recursive
if (this->GetGitVersion() < cmCTestGITVersion(1, 6, 5, 0)) {
- recursive = 0;
+ recursive = CM_NULLPTR;
// No need to require >= 1.6.5 if there are no submodules.
if (cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str())) {
this->Log << "Git < 1.6.5 cannot update submodules recursively\n";
@@ -257,7 +260,7 @@ bool cmCTestGIT::UpdateImpl()
// Git < 1.8.1 did not support sync --recursive
if (this->GetGitVersion() < cmCTestGITVersion(1, 8, 1, 0)) {
- sync_recursive = 0;
+ sync_recursive = CM_NULLPTR;
// No need to require >= 1.8.1 if there are no submodules.
if (cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str())) {
this->Log << "Git < 1.8.1 cannot synchronize submodules recursively\n";
@@ -272,7 +275,8 @@ bool cmCTestGIT::UpdateImpl()
std::string init_submodules =
this->CTest->GetCTestConfiguration("GITInitSubmodules");
if (cmSystemTools::IsOn(init_submodules.c_str())) {
- char const* git_submodule_init[] = { git, "submodule", "init", 0 };
+ char const* git_submodule_init[] = { git, "submodule", "init",
+ CM_NULLPTR };
ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
top_dir.c_str());
@@ -282,7 +286,7 @@ bool cmCTestGIT::UpdateImpl()
}
char const* git_submodule_sync[] = { git, "submodule", "sync",
- sync_recursive, 0 };
+ sync_recursive, CM_NULLPTR };
ret = this->RunChild(git_submodule_sync, &submodule_out, &submodule_err,
top_dir.c_str());
@@ -290,7 +294,8 @@ bool cmCTestGIT::UpdateImpl()
return false;
}
- char const* git_submodule[] = { git, "submodule", "update", recursive, 0 };
+ char const* git_submodule[] = { git, "submodule", "update", recursive,
+ CM_NULLPTR };
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
top_dir.c_str());
}
@@ -299,7 +304,7 @@ unsigned int cmCTestGIT::GetGitVersion()
{
if (!this->CurrentGitVersion) {
const char* git = this->CommandLineTool.c_str();
- char const* git_version[] = { git, "--version", 0 };
+ char const* git_version[] = { git, "--version", CM_NULLPTR };
std::string version;
OneLineParser version_out(this, "version-out> ", version);
OutputLogger version_err(this->Log, "version-err> ");
@@ -611,10 +616,10 @@ void cmCTestGIT::LoadRevisions()
std::string range = this->OldRevision + ".." + this->NewRevision;
const char* git = this->CommandLineTool.c_str();
const char* git_rev_list[] = { git, "rev-list", "--reverse",
- range.c_str(), "--", 0 };
+ range.c_str(), "--", CM_NULLPTR };
const char* git_diff_tree[] = {
git, "diff-tree", "--stdin", "--always", "-z",
- "-r", "--pretty=raw", "--encoding=utf-8", 0
+ "-r", "--pretty=raw", "--encoding=utf-8", CM_NULLPTR
};
this->Log << this->ComputeCommandLine(git_rev_list) << " | "
<< this->ComputeCommandLine(git_diff_tree) << "\n";
@@ -639,13 +644,15 @@ void cmCTestGIT::LoadModifications()
const char* git = this->CommandLineTool.c_str();
// Use 'git update-index' to refresh the index w.r.t. the work tree.
- const char* git_update_index[] = { git, "update-index", "--refresh", 0 };
+ const char* git_update_index[] = { git, "update-index", "--refresh",
+ CM_NULLPTR };
OutputLogger ui_out(this->Log, "ui-out> ");
OutputLogger ui_err(this->Log, "ui-err> ");
this->RunChild(git_update_index, &ui_out, &ui_err);
// Use 'git diff-index' to get modified files.
- const char* git_diff_index[] = { git, "diff-index", "-z", "HEAD", "--", 0 };
+ const char* git_diff_index[] = { git, "diff-index", "-z",
+ "HEAD", "--", CM_NULLPTR };
DiffParser out(this, "di-out> ");
OutputLogger err(this->Log, "di-err> ");
this->RunChild(git_diff_index, &out, &err);
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx
index 18caabe..7755ee9 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -19,7 +19,7 @@
cmCTestGenericHandler::cmCTestGenericHandler()
{
this->HandlerVerbose = cmSystemTools::OUTPUT_NONE;
- this->CTest = 0;
+ this->CTest = CM_NULLPTR;
this->SubmitIndex = 0;
this->AppendXML = false;
this->Quiet = false;
@@ -77,7 +77,7 @@ const char* cmCTestGenericHandler::GetOption(const std::string& op)
cmCTestGenericHandler::t_StringToString::iterator remit =
this->Options.find(op);
if (remit == this->Options.end()) {
- return 0;
+ return CM_NULLPTR;
}
return remit->second.c_str();
}
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index 298804b..eb3d611 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -101,7 +101,7 @@ std::string cmCTestHG::GetWorkingRevision()
{
// Run plumbing "hg identify" to get work tree revision.
const char* hg = this->CommandLineTool.c_str();
- const char* hg_identify[] = { hg, "identify", "-i", 0 };
+ const char* hg_identify[] = { hg, "identify", "-i", CM_NULLPTR };
std::string rev;
IdentifyParser out(this, "rev-out> ", rev);
OutputLogger err(this->Log, "rev-err> ");
@@ -129,7 +129,7 @@ bool cmCTestHG::UpdateImpl()
// Use "hg pull" followed by "hg update" to update the working tree.
{
const char* hg = this->CommandLineTool.c_str();
- const char* hg_pull[] = { hg, "pull", "-v", 0 };
+ const char* hg_pull[] = { hg, "pull", "-v", CM_NULLPTR };
OutputLogger out(this->Log, "pull-out> ");
OutputLogger err(this->Log, "pull-err> ");
this->RunChild(&hg_pull[0], &out, &err);
@@ -154,7 +154,7 @@ bool cmCTestHG::UpdateImpl()
}
// Sentinel argument.
- hg_update.push_back(0);
+ hg_update.push_back(CM_NULLPTR);
OutputLogger out(this->Log, "update-out> ");
OutputLogger err(this->Log, "update-err> ");
@@ -288,7 +288,8 @@ void cmCTestHG::LoadRevisions()
" <file_dels>{file_dels}</file_dels>\n"
"</logentry>\n";
const char* hg_log[] = {
- hg, "log", "--removed", "-r", range.c_str(), "--template", hgXMLTemplate, 0
+ hg, "log", "--removed", "-r", range.c_str(),
+ "--template", hgXMLTemplate, CM_NULLPTR
};
LogParser out(this, "log-out> ");
@@ -303,7 +304,7 @@ void cmCTestHG::LoadModifications()
{
// Use 'hg status' to get modified files.
const char* hg = this->CommandLineTool.c_str();
- const char* hg_status[] = { hg, "status", 0 };
+ const char* hg_status[] = { hg, "status", CM_NULLPTR };
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(hg_status, &out, &err);
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 76f971d..e1361a1 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -20,7 +20,7 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
size_t cc;
this->Arguments.reserve(INIT_SIZE);
for (cc = 0; cc < INIT_SIZE; ++cc) {
- this->Arguments.push_back(0);
+ this->Arguments.push_back(CM_NULLPTR);
}
this->Arguments[ct_RETURN_VALUE] = "RETURN_VALUE";
this->Arguments[ct_SOURCE] = "SOURCE";
@@ -36,7 +36,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
{
// Allocate space for argument values.
this->Values.clear();
- this->Values.resize(this->Last, 0);
+ this->Values.resize(this->Last, CM_NULLPTR);
// Process input arguments.
this->ArgumentDoing = ArgumentDoingNone;
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 99fa9e7..477f16e 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -30,7 +30,7 @@
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
{
this->Passthru = true;
- this->Process = 0;
+ this->Process = CM_NULLPTR;
this->ExitCode = 1;
this->CWD = cmSystemTools::GetCurrentWorkingDirectory();
@@ -128,7 +128,7 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
return true;
} else {
this->RealArgC = 0;
- this->RealArgV = 0;
+ this->RealArgV = CM_NULLPTR;
std::cerr << "No launch/command separator ('--') found!\n";
return false;
}
@@ -227,9 +227,9 @@ void cmCTestLaunch::RunChild()
// Record child stdout and stderr if necessary.
if (!this->Passthru) {
- char* data = 0;
+ char* data = CM_NULLPTR;
int length = 0;
- while (int p = cmsysProcess_WaitForData(cp, &data, &length, 0)) {
+ while (int p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
if (p == cmsysProcess_Pipe_STDOUT) {
fout.write(data, length);
std::cout.write(data, length);
@@ -243,7 +243,7 @@ void cmCTestLaunch::RunChild()
}
// Wait for the real command to finish.
- cmsysProcess_WaitForExit(cp, 0);
+ cmsysProcess_WaitForExit(cp, CM_NULLPTR);
this->ExitCode = cmsysProcess_GetExitValue(cp);
}
@@ -384,7 +384,7 @@ void cmCTestLaunch::WriteXMLAction(cmXMLWriter& xml)
}
// OutputType
- const char* outputType = 0;
+ const char* outputType = CM_NULLPTR;
if (!this->OptionTargetType.empty()) {
if (this->OptionTargetType == "EXECUTABLE") {
outputType = "executable";
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 6f1a2c4..dfa8a1a 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -42,7 +42,7 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = {
{ "Allocation Conflict", cmCTestMemCheckHandler::FMM },
{ "Bad Pointer Use", cmCTestMemCheckHandler::FMW },
{ "Dangling Pointer", cmCTestMemCheckHandler::FMR },
- { 0, 0 }
+ { CM_NULLPTR, 0 }
};
static void xmlReportError(int line, const char* msg, void* data)
@@ -72,7 +72,7 @@ public:
std::ostringstream ostr;
ostr << name << ":\n";
int i = 0;
- for (; atts[i] != 0; i += 2) {
+ for (; atts[i] != CM_NULLPTR; i += 2) {
ostr << " " << atts[i] << " - " << atts[i + 1] << "\n";
}
ostr << "\n";
@@ -83,12 +83,12 @@ public:
const char* GetAttribute(const char* name, const char** atts)
{
int i = 0;
- for (; atts[i] != 0; ++i) {
+ for (; atts[i] != CM_NULLPTR; ++i) {
if (strcmp(name, atts[i]) == 0) {
return atts[i + 1];
}
}
- return 0;
+ return CM_NULLPTR;
}
void ParseError(const char** atts)
{
@@ -241,9 +241,9 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
// define the standard set of errors
//----------------------------------------------------------------------
static const char* cmCTestMemCheckResultStrings[] = {
- "ABR", "ABW", "ABWL", "COR", "EXU", "FFM", "FIM", "FMM",
- "FMR", "FMW", "FUM", "IPR", "IPW", "MAF", "MLK", "MPK",
- "NPR", "ODS", "PAR", "PLK", "UMC", "UMR", 0
+ "ABR", "ABW", "ABWL", "COR", "EXU", "FFM", "FIM", "FMM",
+ "FMR", "FMW", "FUM", "IPR", "IPW", "MAF", "MLK", "MPK",
+ "NPR", "ODS", "PAR", "PLK", "UMC", "UMR", CM_NULLPTR
};
static const char* cmCTestMemCheckResultLongStrings[] = {
"Threading Problem",
@@ -268,10 +268,10 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
"PLK",
"Uninitialized Memory Conditional",
"Uninitialized Memory Read",
- 0
+ CM_NULLPTR
};
this->GlobalResults.clear();
- for (int i = 0; cmCTestMemCheckResultStrings[i] != 0; ++i) {
+ for (int i = 0; cmCTestMemCheckResultStrings[i] != CM_NULLPTR; ++i) {
this->ResultStrings.push_back(cmCTestMemCheckResultStrings[i]);
this->ResultStringsLong.push_back(cmCTestMemCheckResultLongStrings[i]);
this->GlobalResults.push_back(0);
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index 072da29..d4a32f1 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -163,7 +163,7 @@ cmCTestP4::User cmCTestP4::GetUserData(const std::string& username)
p4_users.push_back("-m");
p4_users.push_back("1");
p4_users.push_back(username.c_str());
- p4_users.push_back(0);
+ p4_users.push_back(CM_NULLPTR);
UserParser out(this, "users-out> ");
OutputLogger err(this->Log, "users-err> ");
@@ -358,7 +358,7 @@ std::string cmCTestP4::GetWorkingRevision()
std::string source = this->SourceDirectory + "/...#have";
p4_identify.push_back(source.c_str());
- p4_identify.push_back(0);
+ p4_identify.push_back(CM_NULLPTR);
std::string rev;
IdentifyParser out(this, "p4_changes-out> ", rev);
@@ -418,7 +418,7 @@ void cmCTestP4::LoadRevisions()
p4_changes.push_back("changes");
p4_changes.push_back(range.c_str());
- p4_changes.push_back(0);
+ p4_changes.push_back(CM_NULLPTR);
ChangesParser out(this, "p4_changes-out> ");
OutputLogger err(this->Log, "p4_changes-err> ");
@@ -438,7 +438,7 @@ void cmCTestP4::LoadRevisions()
p4_describe.push_back("describe");
p4_describe.push_back("-s");
p4_describe.push_back(i->c_str());
- p4_describe.push_back(0);
+ p4_describe.push_back(CM_NULLPTR);
DescribeParser outDescribe(this, "p4_describe-out> ");
OutputLogger errDescribe(this->Log, "p4_describe-err> ");
@@ -457,7 +457,7 @@ void cmCTestP4::LoadModifications()
p4_diff.push_back("-dn");
std::string source = this->SourceDirectory + "/...";
p4_diff.push_back(source.c_str());
- p4_diff.push_back(0);
+ p4_diff.push_back(CM_NULLPTR);
DiffParser out(this, "p4_diff-out> ");
OutputLogger err(this->Log, "p4_diff-err> ");
@@ -474,7 +474,7 @@ bool cmCTestP4::UpdateCustom(const std::string& custom)
i != p4_custom_command.end(); ++i) {
p4_custom.push_back(i->c_str());
}
- p4_custom.push_back(0);
+ p4_custom.push_back(CM_NULLPTR);
OutputLogger custom_out(this->Log, "p4_customsync-out> ");
OutputLogger custom_err(this->Log, "p4_customsync-err> ");
@@ -525,7 +525,7 @@ bool cmCTestP4::UpdateImpl()
}
p4_sync.push_back(source.c_str());
- p4_sync.push_back(0);
+ p4_sync.push_back(CM_NULLPTR);
OutputLogger out(this->Log, "p4_sync-out> ");
OutputLogger err(this->Log, "p4_sync-err> ");
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 48582c9..9e3802a 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -24,12 +24,12 @@ cmCTestRunTest::cmCTestRunTest(cmCTestTestHandler* handler)
{
this->CTest = handler->CTest;
this->TestHandler = handler;
- this->TestProcess = 0;
+ this->TestProcess = CM_NULLPTR;
this->TestResult.ExecutionTime = 0;
this->TestResult.ReturnValue = 0;
this->TestResult.Status = cmCTestTestHandler::NOT_RUN;
this->TestResult.TestCount = 0;
- this->TestResult.Properties = 0;
+ this->TestResult.Properties = CM_NULLPTR;
this->ProcessOutput = "";
this->CompressedOutput = "";
this->CompressionRatio = 2;
@@ -577,7 +577,7 @@ double cmCTestRunTest::ResolveTimeout()
return timeout;
}
struct tm* lctime;
- time_t current_time = time(0);
+ time_t current_time = time(CM_NULLPTR);
lctime = gmtime(&current_time);
int gm_hour = lctime->tm_hour;
time_t gm_time = mktime(lctime);
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index e4b6e25..eae0c6c 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -291,7 +291,7 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters,
args.push_back(i->c_str());
}
- args.push_back(0);
+ args.push_back(CM_NULLPTR);
if (strcmp(parameters[0], "update") == 0) {
return RunUpdateCommand(&args[0], out, err);
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 44b6b93..b747c64 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -82,9 +82,9 @@ cmCTestScriptHandler::cmCTestScriptHandler()
this->Backup = false;
this->EmptyBinDir = false;
this->EmptyBinDirOnce = false;
- this->Makefile = 0;
- this->CMake = 0;
- this->GlobalGenerator = 0;
+ this->Makefile = CM_NULLPTR;
+ this->CMake = CM_NULLPTR;
+ this->GlobalGenerator = CM_NULLPTR;
this->ScriptStartTime = 0;
@@ -121,10 +121,10 @@ void cmCTestScriptHandler::Initialize()
this->ScriptStartTime = 0;
delete this->Makefile;
- this->Makefile = 0;
+ this->Makefile = CM_NULLPTR;
delete this->GlobalGenerator;
- this->GlobalGenerator = 0;
+ this->GlobalGenerator = CM_NULLPTR;
delete this->CMake;
}
@@ -200,7 +200,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
for (size_t i = 1; i < initArgs.size(); ++i) {
argv.push_back(initArgs[i].c_str());
}
- argv.push_back(0);
+ argv.push_back(CM_NULLPTR);
// Now create process object
cmsysProcess* cp = cmsysProcess_New();
@@ -226,7 +226,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
}
// Properly handle output of the build command
- cmsysProcess_WaitForExit(cp, 0);
+ cmsysProcess_WaitForExit(cp, CM_NULLPTR);
int result = cmsysProcess_GetState(cp);
int retVal = 0;
bool failed = false;
@@ -863,7 +863,7 @@ bool cmCTestScriptHandler::WriteInitialCache(const char* directory,
return false;
}
- if (text != 0) {
+ if (text != CM_NULLPTR) {
fout.write(text, strlen(text));
}
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 99d431a..c64d16b 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -32,12 +32,12 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
size_t cnt = 0;
const char* smodel = args[cnt].c_str();
- const char* src_dir = 0;
- const char* bld_dir = 0;
+ const char* src_dir = CM_NULLPTR;
+ const char* bld_dir = CM_NULLPTR;
cnt++;
- this->CTest->SetSpecificTrack(0);
+ this->CTest->SetSpecificTrack(CM_NULLPTR);
if (cnt < args.size() - 1) {
if (args[cnt] == "TRACK") {
cnt++;
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index 664552a..54da383 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -88,7 +88,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
extraFiles.end());
if (!this->CTest->SubmitExtraFiles(newExtraFiles)) {
this->SetError("problem submitting extra files.");
- return 0;
+ return CM_NULLPTR;
}
}
@@ -96,7 +96,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->CTest->GetInitializedHandler("submit");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate submit handler");
- return 0;
+ return CM_NULLPTR;
}
// If no FILES or PARTS given, *all* PARTS are submitted by default.
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 3aacde0..67388ad 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -150,7 +150,7 @@ void cmCTestSubmitHandler::Initialize()
this->HTTPProxyAuth = "";
this->FTPProxy = "";
this->FTPProxyType = 0;
- this->LogFile = 0;
+ this->LogFile = CM_NULLPTR;
this->Files.clear();
}
@@ -308,7 +308,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
FILE* ftpfile;
char error_buffer[1024];
struct curl_slist* headers =
- ::curl_slist_append(NULL, "Content-Type: text/xml");
+ ::curl_slist_append(CM_NULLPTR, "Content-Type: text/xml");
/* In windows, this will init the winsock stuff */
::curl_global_init(CURL_GLOBAL_ALL);
@@ -507,10 +507,10 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
// If curl failed for any reason, or checksum fails, wait and retry
//
if (res != CURLE_OK || this->HasErrors) {
- std::string retryDelay = this->GetOption("RetryDelay") == NULL
+ std::string retryDelay = this->GetOption("RetryDelay") == CM_NULLPTR
? ""
: this->GetOption("RetryDelay");
- std::string retryCount = this->GetOption("RetryCount") == NULL
+ std::string retryCount = this->GetOption("RetryCount") == CM_NULLPTR
? ""
: this->GetOption("RetryCount");
@@ -776,7 +776,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
argv.push_back(scp_command.c_str()); // Scp command
argv.push_back(scp_command.c_str()); // Dummy string for file
argv.push_back(scp_command.c_str()); // Dummy string for remote url
- argv.push_back(0);
+ argv.push_back(CM_NULLPTR);
cmsysProcess* cp = cmsysProcess_New();
cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1);
@@ -807,12 +807,12 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
char* data;
int length;
- while (cmsysProcess_WaitForData(cp, &data, &length, 0)) {
+ while (cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
cmCTestLogWrite(data, length), this->Quiet);
}
- cmsysProcess_WaitForExit(cp, 0);
+ cmsysProcess_WaitForExit(cp, CM_NULLPTR);
int result = cmsysProcess_GetState(cp);
diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h
index c2c9a85..4cca6eb 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -26,7 +26,7 @@ public:
cmTypeMacro(cmCTestSubmitHandler, cmCTestGenericHandler);
cmCTestSubmitHandler();
- ~cmCTestSubmitHandler() CM_OVERRIDE { this->LogFile = 0; }
+ ~cmCTestSubmitHandler() CM_OVERRIDE { this->LogFile = CM_NULLPTR; }
/*
* The main entry point for this class
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index 7b437c6..1d064db 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -27,7 +27,7 @@ cmCTestTestCommand::cmCTestTestCommand()
this->Arguments[ctt_SCHEDULE_RANDOM] = "SCHEDULE_RANDOM";
this->Arguments[ctt_STOP_TIME] = "STOP_TIME";
this->Arguments[ctt_TEST_LOAD] = "TEST_LOAD";
- this->Arguments[ctt_LAST] = 0;
+ this->Arguments[ctt_LAST] = CM_NULLPTR;
this->Last = ctt_LAST;
}
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 3ee9c5f..1b6b442 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -336,7 +336,7 @@ cmCTestTestHandler::cmCTestTestHandler()
this->MemCheck = false;
- this->LogFile = 0;
+ this->LogFile = CM_NULLPTR;
// regex to detect <DartMeasurement>...</DartMeasurement>
this->DartStuff.compile("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)");
@@ -550,7 +550,7 @@ int cmCTestTestHandler::ProcessHandler()
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create "
<< (this->MemCheck ? "memory check" : "testing")
<< " XML file" << std::endl);
- this->LogFile = 0;
+ this->LogFile = CM_NULLPTR;
return 1;
}
cmXMLWriter xml(xmlfile);
@@ -558,15 +558,15 @@ int cmCTestTestHandler::ProcessHandler()
}
if (!this->PostProcessHandler()) {
- this->LogFile = 0;
+ this->LogFile = CM_NULLPTR;
return -1;
}
if (!failed.empty()) {
- this->LogFile = 0;
+ this->LogFile = CM_NULLPTR;
return -1;
}
- this->LogFile = 0;
+ this->LogFile = CM_NULLPTR;
return 0;
}
@@ -936,7 +936,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<std::string>& passed,
bool randomSchedule = this->CTest->GetScheduleType() == "Random";
if (randomSchedule) {
- srand((unsigned)time(0));
+ srand((unsigned)time(CM_NULLPTR));
}
for (ListOfTests::iterator it = this->TestList.begin();
@@ -1154,7 +1154,8 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<std::string>& vec)
int retVal = 0;
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Run command: " << *it << std::endl, this->Quiet);
- if (!cmSystemTools::RunSingleCommand(it->c_str(), 0, 0, &retVal, 0,
+ if (!cmSystemTools::RunSingleCommand(it->c_str(), CM_NULLPTR, CM_NULLPTR,
+ &retVal, CM_NULLPTR,
cmSystemTools::OUTPUT_MERGE
/*this->Verbose*/) ||
retVal != 0) {
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx
index f1bae5d..bc06da6 100644
--- a/Source/CTest/cmCTestUpdateCommand.cxx
+++ b/Source/CTest/cmCTestUpdateCommand.cxx
@@ -83,12 +83,12 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
this->CTest->GetInitializedHandler("update");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate update handler");
- return 0;
+ return CM_NULLPTR;
}
handler->SetCommand(this);
if (source_dir.empty()) {
this->SetError("source directory not specified. Please use SOURCE tag");
- return 0;
+ return CM_NULLPTR;
}
handler->SetOption("SourceDirectory", source_dir.c_str());
handler->SetQuiet(this->Quiet);
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 4eaa16b..8131c90 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -334,7 +334,7 @@ bool cmCTestUpdateHandler::SelectVCS()
// If no update command was specified, lookup one for this VCS tool.
if (this->UpdateCommand.empty()) {
- const char* key = 0;
+ const char* key = CM_NULLPTR;
switch (this->UpdateType) {
case e_CVS:
key = "CVSCommand";
diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx
index c85db02..7393d21 100644
--- a/Source/CTest/cmCTestUploadCommand.cxx
+++ b/Source/CTest/cmCTestUploadCommand.cxx
@@ -21,7 +21,7 @@ cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler()
this->CTest->GetInitializedHandler("upload");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate upload handler");
- return 0;
+ return CM_NULLPTR;
}
static_cast<cmCTestUploadHandler*>(handler)->SetFiles(this->Files);
diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx
index e9934e5..3376588 100644
--- a/Source/CTest/cmCTestVC.cxx
+++ b/Source/CTest/cmCTestVC.cxx
@@ -65,7 +65,7 @@ bool cmCTestVC::InitialCheckout(const char* command)
ai != args.end(); ++ai) {
vc_co.push_back(ai->c_str());
}
- vc_co.push_back(0);
+ vc_co.push_back(CM_NULLPTR);
// Run the initial checkout command and log its output.
this->Log << "--- Begin Initial Checkout ---\n";
diff --git a/Source/CTest/cmCTestVC.h b/Source/CTest/cmCTestVC.h
index 4ae38eb..eb85a236 100644
--- a/Source/CTest/cmCTestVC.h
+++ b/Source/CTest/cmCTestVC.h
@@ -104,8 +104,8 @@ protected:
Revision const* PriorRev;
File()
: Status(PathUpdated)
- , Rev(0)
- , PriorRev(0)
+ , Rev(CM_NULLPTR)
+ , PriorRev(CM_NULLPTR)
{
}
File(PathStatus status, Revision const* rev, Revision const* priorRev)
@@ -121,11 +121,11 @@ protected:
/** Run a command line and send output to given parsers. */
bool RunChild(char const* const* cmd, OutputParser* out, OutputParser* err,
- const char* workDir = 0);
+ const char* workDir = CM_NULLPTR);
/** Run VC update command line and send output to given parsers. */
bool RunUpdateCommand(char const* const* cmd, OutputParser* out,
- OutputParser* err = 0);
+ OutputParser* err = CM_NULLPTR);
/** Write xml element for one file. */
void WriteXMLEntry(cmXMLWriter& xml, std::string const& path,
diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx
index e5dd74a..d786d79 100644
--- a/Source/CTest/cmParseMumpsCoverage.cxx
+++ b/Source/CTest/cmParseMumpsCoverage.cxx
@@ -130,8 +130,8 @@ bool cmParseMumpsCoverage::FindMumpsFile(std::string const& routine,
return true;
} else {
// try some alternate names
- const char* tryname[] = { "GUX", "GTM", "ONT", 0 };
- for (int k = 0; tryname[k] != 0; k++) {
+ const char* tryname[] = { "GUX", "GTM", "ONT", CM_NULLPTR };
+ for (int k = 0; tryname[k] != CM_NULLPTR; k++) {
std::string routine2 = routine + tryname[k];
i = this->RoutineToDirectory.find(routine2);
if (i != this->RoutineToDirectory.end()) {
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index db5151c..92fe642 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -16,7 +16,7 @@
cmProcess::cmProcess()
{
- this->Process = 0;
+ this->Process = CM_NULLPTR;
this->Timeout = 0;
this->TotalTime = 0;
this->ExitValue = 0;
@@ -52,7 +52,7 @@ bool cmProcess::StartProcess()
i != this->Arguments.end(); ++i) {
this->ProcessArgs.push_back(i->c_str());
}
- this->ProcessArgs.push_back(0); // null terminate the list
+ this->ProcessArgs.push_back(CM_NULLPTR); // null terminate the list
this->Process = cmsysProcess_New();
cmsysProcess_SetCommand(this->Process, &*this->ProcessArgs.begin());
if (!this->WorkingDirectory.empty()) {