summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesForm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CursesDialog/cmCursesForm.cxx')
-rw-r--r--Source/CursesDialog/cmCursesForm.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx
index 8d9c444..a91172f 100644
--- a/Source/CursesDialog/cmCursesForm.cxx
+++ b/Source/CursesDialog/cmCursesForm.cxx
@@ -1,5 +1,8 @@
#include "cmCursesForm.h"
+std::ofstream cmCursesForm::DebugFile;
+bool cmCursesForm::Debug = false;
+
cmCursesForm::cmCursesForm()
{
m_Form = 0;
@@ -14,3 +17,30 @@ cmCursesForm::~cmCursesForm()
m_Form = 0;
}
}
+
+void cmCursesForm::DebugStart()
+{
+ cmCursesForm::Debug = true;
+ cmCursesForm::DebugFile.open("ccmakelog.txt");
+}
+
+void cmCursesForm::DebugEnd()
+{
+ if (!cmCursesForm::Debug)
+ {
+ return;
+ }
+
+ cmCursesForm::Debug = false;
+ cmCursesForm::DebugFile.close();
+}
+
+void cmCursesForm::LogMessage(const char* msg)
+{
+ if (!cmCursesForm::Debug)
+ {
+ return;
+ }
+
+ cmCursesForm::DebugFile << msg << std::endl;
+}