summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-18 18:18:43 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-18 18:18:43 (GMT)
commit6769e8447291ab73cbf904a9470e4a7094c34e4d (patch)
tree0139f69c88217afb66567f20495b272f0562d1df /Source/CursesDialog
parenteab24670e3e2a8b2a7469ba418e183c363ff27d1 (diff)
downloadCMake-6769e8447291ab73cbf904a9470e4a7094c34e4d.zip
CMake-6769e8447291ab73cbf904a9470e4a7094c34e4d.tar.gz
CMake-6769e8447291ab73cbf904a9470e4a7094c34e4d.tar.bz2
Improve message handler to include client data.
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/ccmake.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index b852ca7..289ff75 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -52,9 +52,10 @@ void onsig(int)
}
-void CMakeErrorHandler(const char* message, const char* title, bool&)
+void CMakeErrorHandler(const char* message, const char* title, bool&, void* clientData)
{
- cmCursesForm::CurrentForm->AddError(message, title);
+ cmCursesForm* self = static_cast<cmCursesForm*>( clientData );
+ self->AddError(message, title);
}
int main(int argc, char** argv)
@@ -128,7 +129,7 @@ int main(int argc, char** argv)
myform = new cmCursesMainForm(args, x);
myform->LoadCache(cacheDir.c_str());
- cmSystemTools::SetErrorCallback(CMakeErrorHandler);
+ cmSystemTools::SetErrorCallback(CMakeErrorHandler, myform);
cmCursesForm::CurrentForm = myform;