summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesMainForm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CursesDialog/cmCursesMainForm.cxx')
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index b740eb0..9ae38d6 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -36,8 +36,8 @@ cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args,
, InitialWidth(initWidth)
{
this->NumberOfPages = 0;
- this->Fields = 0;
- this->Entries = 0;
+ this->Fields = CM_NULLPTR;
+ this->Entries = CM_NULLPTR;
this->AdvancedMode = false;
this->NumberOfVisibleEntries = 0;
this->OkToGenerate = false;
@@ -64,7 +64,7 @@ cmCursesMainForm::~cmCursesMainForm()
if (this->Form) {
unpost_form(this->Form);
free_form(this->Form);
- this->Form = 0;
+ this->Form = CM_NULLPTR;
}
delete[] this->Fields;
@@ -75,7 +75,7 @@ cmCursesMainForm::~cmCursesMainForm()
delete this->Entries;
if (this->CMakeInstance) {
delete this->CMakeInstance;
- this->CMakeInstance = 0;
+ this->CMakeInstance = CM_NULLPTR;
}
}
@@ -185,7 +185,7 @@ void cmCursesMainForm::RePost()
if (this->Form) {
unpost_form(this->Form);
free_form(this->Form);
- this->Form = 0;
+ this->Form = CM_NULLPTR;
}
delete[] this->Fields;
if (this->AdvancedMode) {
@@ -215,7 +215,7 @@ void cmCursesMainForm::RePost()
this->Fields = new FIELD*[3 * this->NumberOfVisibleEntries + 1];
size_t cc;
for (cc = 0; cc < 3 * this->NumberOfVisibleEntries + 1; cc++) {
- this->Fields[cc] = 0;
+ this->Fields[cc] = CM_NULLPTR;
}
// Assign fields
@@ -244,7 +244,7 @@ void cmCursesMainForm::RePost()
this->NumberOfVisibleEntries = 1;
}
// Has to be null terminated.
- this->Fields[3 * this->NumberOfVisibleEntries] = 0;
+ this->Fields[3 * this->NumberOfVisibleEntries] = CM_NULLPTR;
}
void cmCursesMainForm::Render(int left, int top, int width, int height)
@@ -263,7 +263,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
// Delete the previous form
unpost_form(this->Form);
free_form(this->Form);
- this->Form = 0;
+ this->Form = CM_NULLPTR;
}
// Wrong window size
@@ -345,7 +345,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
}
// Give the current widget (if it exists), a chance to print keys
- cmCursesWidget* cw = 0;
+ cmCursesWidget* cw = CM_NULLPTR;
if (this->Form) {
FIELD* currentField = current_field(this->Form);
cw = reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
@@ -434,7 +434,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
// Get the key of the current entry
FIELD* cur = current_field(this->Form);
int findex = field_index(cur);
- cmCursesWidget* lbl = 0;
+ cmCursesWidget* lbl = CM_NULLPTR;
if (findex >= 0) {
lbl = reinterpret_cast<cmCursesWidget*>(
field_userptr(this->Fields[findex - 2]));
@@ -566,7 +566,7 @@ int cmCursesMainForm::Configure(int noconfigure)
this->FillCacheManagerFromUI();
this->CMakeInstance->SaveCache(
this->CMakeInstance->GetHomeOutputDirectory());
- this->LoadCache(0);
+ this->LoadCache(CM_NULLPTR);
// Get rid of previous errors
this->Errors = std::vector<std::string>();
@@ -583,7 +583,7 @@ int cmCursesMainForm::Configure(int noconfigure)
} else {
retVal = this->CMakeInstance->Configure();
}
- this->CMakeInstance->SetProgressCallback(0, 0);
+ this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
keypad(stdscr, TRUE); /* Use key symbols as
KEY_DOWN*/
@@ -638,7 +638,7 @@ int cmCursesMainForm::Generate()
// run the generate process
int retVal = this->CMakeInstance->Generate();
- this->CMakeInstance->SetProgressCallback(0, 0);
+ this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
keypad(stdscr, TRUE); /* Use key symbols as
KEY_DOWN*/
@@ -888,7 +888,7 @@ void cmCursesMainForm::HandleInput()
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(
field_userptr(this->Fields[findex - 2]));
const char* curField = lbl->GetValue();
- const char* helpString = 0;
+ const char* helpString = CM_NULLPTR;
const char* existingValue =
this->CMakeInstance->GetState()->GetCacheEntryValue(curField);
@@ -973,7 +973,7 @@ void cmCursesMainForm::HandleInput()
// (findex always corresponds to the value field)
FIELD* nextCur;
if (findex == 2) {
- nextCur = 0;
+ nextCur = CM_NULLPTR;
} else if (findex == 3 * this->NumberOfVisibleEntries - 1) {
nextCur = this->Fields[findex - 5];
} else {
@@ -1003,7 +1003,7 @@ void cmCursesMainForm::HandleInput()
if (nextCur) {
// make the next or prev. current field after deletion
- nextCur = 0;
+ nextCur = CM_NULLPTR;
std::vector<cmCursesCacheEntryComposite*>::iterator it;
for (it = this->Entries->begin(); it != this->Entries->end();
++it) {
@@ -1052,7 +1052,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr)
int findex = start_index;
for (;;) {
if (!str.empty()) {
- cmCursesWidget* lbl = 0;
+ cmCursesWidget* lbl = CM_NULLPTR;
if (findex >= 0) {
lbl = reinterpret_cast<cmCursesWidget*>(
field_userptr(this->Fields[findex - 2]));