summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/ccmake.cxx27
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx6
-rw-r--r--Source/CursesDialog/cmCursesForm.cxx4
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.cxx8
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx36
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h2
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesWidget.cxx2
8 files changed, 43 insertions, 44 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 28a0e95..768c460 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -18,30 +18,29 @@
#include <vector>
static const char* cmDocumentationName[][2] = {
- { CM_NULLPTR, " ccmake - Curses Interface for CMake." },
- { CM_NULLPTR, CM_NULLPTR }
+ { nullptr, " ccmake - Curses Interface for CMake." },
+ { nullptr, nullptr }
};
static const char* cmDocumentationUsage[][2] = {
- { CM_NULLPTR, " ccmake <path-to-source>\n"
- " ccmake <path-to-existing-build>" },
- { CM_NULLPTR,
- "Specify a source directory to (re-)generate a build system for "
- "it in the current working directory. Specify an existing build "
- "directory to re-generate its build system." },
- { CM_NULLPTR, CM_NULLPTR }
+ { nullptr, " ccmake <path-to-source>\n"
+ " ccmake <path-to-existing-build>" },
+ { nullptr, "Specify a source directory to (re-)generate a build system for "
+ "it in the current working directory. Specify an existing build "
+ "directory to re-generate its build system." },
+ { nullptr, nullptr }
};
static const char* cmDocumentationUsageNote[][2] = {
- { CM_NULLPTR, "Run 'ccmake --help' for more information." },
- { CM_NULLPTR, CM_NULLPTR }
+ { nullptr, "Run 'ccmake --help' for more information." },
+ { nullptr, nullptr }
};
static const char* cmDocumentationOptions[]
[2] = { CMAKE_STANDARD_OPTIONS_TABLE,
- { CM_NULLPTR, CM_NULLPTR } };
+ { nullptr, nullptr } };
-cmCursesForm* cmCursesForm::CurrentForm = CM_NULLPTR;
+cmCursesForm* cmCursesForm::CurrentForm = nullptr;
extern "C" {
@@ -169,7 +168,7 @@ int main(int argc, char const* const* argv)
touchwin(stdscr);
endwin();
delete cmCursesForm::CurrentForm;
- cmCursesForm::CurrentForm = CM_NULLPTR;
+ cmCursesForm::CurrentForm = nullptr;
std::cout << std::endl << std::endl;
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index d071c91..8596281 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -25,7 +25,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
{
this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key);
this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " ");
- this->Entry = CM_NULLPTR;
+ this->Entry = nullptr;
this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1);
}
@@ -43,7 +43,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " ");
}
- this->Entry = CM_NULLPTR;
+ this->Entry = nullptr;
const char* value = cm->GetState()->GetCacheEntryValue(key);
assert(value);
switch (cm->GetState()->GetCacheEntryType(key)) {
@@ -104,5 +104,5 @@ const char* cmCursesCacheEntryComposite::GetValue()
if (this->Label) {
return this->Label->GetValue();
}
- return CM_NULLPTR;
+ return nullptr;
}
diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx
index 06c1e9c..bd65c4a 100644
--- a/Source/CursesDialog/cmCursesForm.cxx
+++ b/Source/CursesDialog/cmCursesForm.cxx
@@ -7,7 +7,7 @@ bool cmCursesForm::Debug = false;
cmCursesForm::cmCursesForm()
{
- this->Form = CM_NULLPTR;
+ this->Form = nullptr;
}
cmCursesForm::~cmCursesForm()
@@ -15,7 +15,7 @@ cmCursesForm::~cmCursesForm()
if (this->Form) {
unpost_form(this->Form);
free_form(this->Form);
- this->Form = CM_NULLPTR;
+ this->Form = nullptr;
}
}
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 7fb065d..9bd1c11 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -26,8 +26,8 @@ cmCursesLongMessageForm::cmCursesLongMessageForm(
this->Messages += "\n\n";
}
this->Title = title;
- this->Fields[0] = CM_NULLPTR;
- this->Fields[1] = CM_NULLPTR;
+ this->Fields[0] = nullptr;
+ this->Fields[1] = nullptr;
}
cmCursesLongMessageForm::~cmCursesLongMessageForm()
@@ -105,7 +105,7 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
if (this->Form) {
unpost_form(this->Form);
free_form(this->Form);
- this->Form = CM_NULLPTR;
+ this->Form = nullptr;
}
const char* msg = this->Messages.c_str();
@@ -114,7 +114,7 @@ void cmCursesLongMessageForm::Render(int /*left*/, int /*top*/, int /*width*/,
if (this->Fields[0]) {
free_field(this->Fields[0]);
- this->Fields[0] = CM_NULLPTR;
+ this->Fields[0] = nullptr;
}
this->Fields[0] = new_field(y - 6, x - 2, 1, 1, 0, 0);
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 026320a..6bcc5bd 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -31,8 +31,8 @@ cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args,
, InitialWidth(initWidth)
{
this->NumberOfPages = 0;
- this->Fields = CM_NULLPTR;
- this->Entries = CM_NULLPTR;
+ this->Fields = nullptr;
+ this->Entries = nullptr;
this->AdvancedMode = false;
this->NumberOfVisibleEntries = 0;
this->OkToGenerate = false;
@@ -59,7 +59,7 @@ cmCursesMainForm::~cmCursesMainForm()
if (this->Form) {
unpost_form(this->Form);
free_form(this->Form);
- this->Form = CM_NULLPTR;
+ this->Form = nullptr;
}
delete[] this->Fields;
@@ -70,7 +70,7 @@ cmCursesMainForm::~cmCursesMainForm()
delete this->Entries;
if (this->CMakeInstance) {
delete this->CMakeInstance;
- this->CMakeInstance = CM_NULLPTR;
+ this->CMakeInstance = nullptr;
}
}
@@ -180,7 +180,7 @@ void cmCursesMainForm::RePost()
if (this->Form) {
unpost_form(this->Form);
free_form(this->Form);
- this->Form = CM_NULLPTR;
+ this->Form = nullptr;
}
delete[] this->Fields;
if (this->AdvancedMode) {
@@ -210,7 +210,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] = CM_NULLPTR;
+ this->Fields[cc] = nullptr;
}
// Assign fields
@@ -239,7 +239,7 @@ void cmCursesMainForm::RePost()
this->NumberOfVisibleEntries = 1;
}
// Has to be null terminated.
- this->Fields[3 * this->NumberOfVisibleEntries] = CM_NULLPTR;
+ this->Fields[3 * this->NumberOfVisibleEntries] = nullptr;
}
void cmCursesMainForm::Render(int left, int top, int width, int height)
@@ -259,7 +259,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 = CM_NULLPTR;
+ this->Form = nullptr;
}
// Wrong window size
@@ -341,14 +341,14 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
}
// Give the current widget (if it exists), a chance to print keys
- cmCursesWidget* cw = CM_NULLPTR;
+ cmCursesWidget* cw = nullptr;
if (this->Form) {
FIELD* currentField = current_field(this->Form);
cw = reinterpret_cast<cmCursesWidget*>(field_userptr(currentField));
}
char fmt_s[] = "%s";
- if (cw == CM_NULLPTR || !cw->PrintKeys()) {
+ if (cw == nullptr || !cw->PrintKeys()) {
char firstLine[512] = "";
char secondLine[512] = "";
char thirdLine[512] = "";
@@ -425,7 +425,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 = CM_NULLPTR;
+ cmCursesWidget* lbl = nullptr;
if (findex >= 0) {
lbl = reinterpret_cast<cmCursesWidget*>(
field_userptr(this->Fields[findex - 2]));
@@ -557,7 +557,7 @@ int cmCursesMainForm::Configure(int noconfigure)
this->FillCacheManagerFromUI();
this->CMakeInstance->SaveCache(
this->CMakeInstance->GetHomeOutputDirectory());
- this->LoadCache(CM_NULLPTR);
+ this->LoadCache(nullptr);
// Get rid of previous errors
this->Errors = std::vector<std::string>();
@@ -574,7 +574,7 @@ int cmCursesMainForm::Configure(int noconfigure)
} else {
retVal = this->CMakeInstance->Configure();
}
- this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
+ this->CMakeInstance->SetProgressCallback(nullptr, nullptr);
keypad(stdscr, true); /* Use key symbols as KEY_DOWN */
@@ -628,7 +628,7 @@ int cmCursesMainForm::Generate()
// run the generate process
int retVal = this->CMakeInstance->Generate();
- this->CMakeInstance->SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
+ this->CMakeInstance->SetProgressCallback(nullptr, nullptr);
keypad(stdscr, true); /* Use key symbols as KEY_DOWN */
if (retVal != 0 || !this->Errors.empty()) {
@@ -877,7 +877,7 @@ void cmCursesMainForm::HandleInput()
cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>(
field_userptr(this->Fields[findex - 2]));
const char* curField = lbl->GetValue();
- const char* helpString = CM_NULLPTR;
+ const char* helpString = nullptr;
const char* existingValue =
this->CMakeInstance->GetState()->GetCacheEntryValue(curField);
@@ -962,7 +962,7 @@ void cmCursesMainForm::HandleInput()
// (findex always corresponds to the value field)
FIELD* nextCur;
if (findex == 2) {
- nextCur = CM_NULLPTR;
+ nextCur = nullptr;
} else if (findex == 3 * this->NumberOfVisibleEntries - 1) {
nextCur = this->Fields[findex - 5];
} else {
@@ -992,7 +992,7 @@ void cmCursesMainForm::HandleInput()
if (nextCur) {
// make the next or prev. current field after deletion
- nextCur = CM_NULLPTR;
+ nextCur = nullptr;
std::vector<cmCursesCacheEntryComposite*>::iterator it;
for (it = this->Entries->begin(); it != this->Entries->end();
++it) {
@@ -1041,7 +1041,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr)
int findex = start_index;
for (;;) {
if (!str.empty()) {
- cmCursesWidget* lbl = CM_NULLPTR;
+ cmCursesWidget* lbl = nullptr;
if (findex >= 0) {
lbl = reinterpret_cast<cmCursesWidget*>(
field_userptr(this->Fields[findex - 2]));
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index e35cf3e..404a971 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -64,7 +64,7 @@ public:
* exception is during a resize. The optional argument specifies the
* string to be displayed in the status bar.
*/
- void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(CM_NULLPTR); }
+ void UpdateStatusBar() CM_OVERRIDE { this->UpdateStatusBar(nullptr); }
virtual void UpdateStatusBar(const char* message);
/**
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index ff189f0..8cb9c1f 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -74,7 +74,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
return false;
}
- this->OriginalString = CM_NULLPTR;
+ this->OriginalString = nullptr;
this->Done = false;
char debugMessage[128];
diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx
index 054f27e..cc07411 100644
--- a/Source/CursesDialog/cmCursesWidget.cxx
+++ b/Source/CursesDialog/cmCursesWidget.cxx
@@ -14,7 +14,7 @@ cmCursesWidget::~cmCursesWidget()
{
if (this->Field) {
free_field(this->Field);
- this->Field = CM_NULLPTR;
+ this->Field = nullptr;
}
}