2016-09-27 15:01:08 -04:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2001-11-04 18:05:21 -05:00
|
|
|
#include "cmCursesForm.h"
|
|
|
|
|
2016-09-01 21:55:09 +02:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2014-01-03 22:47:13 -07:00
|
|
|
cmsys::ofstream cmCursesForm::DebugFile;
|
2001-12-04 11:16:04 -05:00
|
|
|
bool cmCursesForm::Debug = false;
|
|
|
|
|
2001-11-04 18:05:21 -05:00
|
|
|
cmCursesForm::cmCursesForm()
|
|
|
|
{
|
2016-06-27 22:44:16 +02:00
|
|
|
this->Form = CM_NULLPTR;
|
2001-11-04 18:05:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
cmCursesForm::~cmCursesForm()
|
|
|
|
{
|
2016-05-16 10:34:04 -04:00
|
|
|
if (this->Form) {
|
2006-03-16 10:44:55 -05:00
|
|
|
unpost_form(this->Form);
|
|
|
|
free_form(this->Form);
|
2016-06-27 22:44:16 +02:00
|
|
|
this->Form = CM_NULLPTR;
|
2016-05-16 10:34:04 -04:00
|
|
|
}
|
2001-11-04 18:05:21 -05:00
|
|
|
}
|
2001-12-04 11:16:04 -05:00
|
|
|
|
|
|
|
void cmCursesForm::DebugStart()
|
|
|
|
{
|
|
|
|
cmCursesForm::Debug = true;
|
|
|
|
cmCursesForm::DebugFile.open("ccmakelog.txt");
|
|
|
|
}
|
|
|
|
|
|
|
|
void cmCursesForm::DebugEnd()
|
|
|
|
{
|
2016-05-16 10:34:04 -04:00
|
|
|
if (!cmCursesForm::Debug) {
|
2001-12-04 11:16:04 -05:00
|
|
|
return;
|
2016-05-16 10:34:04 -04:00
|
|
|
}
|
2001-12-04 11:16:04 -05:00
|
|
|
|
|
|
|
cmCursesForm::Debug = false;
|
|
|
|
cmCursesForm::DebugFile.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
void cmCursesForm::LogMessage(const char* msg)
|
|
|
|
{
|
2016-05-16 10:34:04 -04:00
|
|
|
if (!cmCursesForm::Debug) {
|
2001-12-04 11:16:04 -05:00
|
|
|
return;
|
2016-05-16 10:34:04 -04:00
|
|
|
}
|
2001-12-04 11:16:04 -05:00
|
|
|
|
|
|
|
cmCursesForm::DebugFile << msg << std::endl;
|
|
|
|
}
|