summaryrefslogtreecommitdiff
path: root/src/Fl_abort.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_abort.cxx')
-rw-r--r--src/Fl_abort.cxx76
1 files changed, 4 insertions, 72 deletions
diff --git a/src/Fl_abort.cxx b/src/Fl_abort.cxx
index a54004155..f0125e905 100644
--- a/src/Fl_abort.cxx
+++ b/src/Fl_abort.cxx
@@ -16,83 +16,15 @@
// http://www.fltk.org/str.php
//
-// This method is in its own source file so that stdlib and stdio
-// do not need to be included in Fl.cxx:
// You can also override this by redefining all of these.
#include <FL/Fl.H>
-#include <stdio.h>
-#include <stdlib.h>
+#include <FL/Fl_System_Driver.H>
#include <stdarg.h>
-#include "flstring.h"
-#if defined(WIN32) || defined(__APPLE__) // PORTME: Fl_Screen_Driver - native message box
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: use native message box below if one is available"
-#else
-#endif
-
-#ifdef WIN32
-# include <windows.h>
-
-static void warning(const char *, ...) {
- // Show nothing for warnings under WIN32...
-}
-
-static void error(const char *format, ...) {
- va_list args;
- char buf[1024];
- va_start(args, format);
- vsnprintf(buf, 1024, format, args);
- va_end(args);
- MessageBox(0,buf,"Error",MB_ICONEXCLAMATION|MB_SYSTEMMODAL);
-}
-
-static void fatal(const char *format, ...) {
- va_list args;
- char buf[1024];
- va_start(args, format);
- vsnprintf(buf, 1024, format, args);
- va_end(args);
- MessageBox(0,buf,"Error",MB_ICONSTOP|MB_SYSTEMMODAL);
- ::exit(1);
-}
-
-#else
-
-static void warning(const char *format, ...) {
- va_list args;
- va_start(args, format);
- vfprintf(stderr, format, args);
- va_end(args);
- fputc('\n', stderr);
- fflush(stderr);
-}
-
-static void error(const char *format, ...) {
- va_list args;
- va_start(args, format);
- vfprintf(stderr, format, args);
- va_end(args);
- fputc('\n', stderr);
- fflush(stderr);
-}
-
-static void fatal(const char *format, ...) {
- va_list args;
- va_start(args, format);
- vfprintf(stderr, format, args);
- va_end(args);
- fputc('\n', stderr);
- fflush(stderr);
- ::exit(1);
-}
-
-#endif
-
-void (*Fl::warning)(const char* format, ...) = ::warning;
-void (*Fl::error)(const char* format, ...) = ::error;
-void (*Fl::fatal)(const char* format, ...) = ::fatal;
+void (*Fl::warning)(const char* format, ...) = Fl_System_Driver::warning;
+void (*Fl::error)(const char* format, ...) = Fl_System_Driver::error;
+void (*Fl::fatal)(const char* format, ...) = Fl_System_Driver::fatal;
//
// End of "$Id$".