From 28d1a2d6848d5abe555fd0ddae8b57cec6f900ca Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 28 Mar 2016 15:22:20 +0000 Subject: Rewrite Fl_abort.cxx under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_System_Driver.cxx | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/Fl_System_Driver.cxx') diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx index 711d9abaa..9a372885d 100644 --- a/src/Fl_System_Driver.cxx +++ b/src/Fl_System_Driver.cxx @@ -19,6 +19,8 @@ #include #include +#include +#include const int Fl_System_Driver::flNoValue = 0x0000; const int Fl_System_Driver::flWidthValue = 0x0004; @@ -38,6 +40,46 @@ Fl_System_Driver::~Fl_System_Driver() { } +void Fl_System_Driver::warning(const char* format, ...) { + va_list args; + va_start(args, format); + driver()->warning(format, args); + va_end(args); +} + +void Fl_System_Driver::warning(const char* format, va_list args) { + vfprintf(stderr, format, args); + fputc('\n', stderr); + fflush(stderr); +} + +void Fl_System_Driver::error(const char* format, ...) { + va_list args; + va_start(args, format); + driver()->error(format, args); + va_end(args); +} + +void Fl_System_Driver::error(const char *format, va_list args) { + vfprintf(stderr, format, args); + fputc('\n', stderr); + fflush(stderr); +} + +void Fl_System_Driver::fatal(const char* format, ...) { + va_list args; + va_start(args, format); + driver()->fatal(format, args); + va_end(args); +} + +void Fl_System_Driver::fatal(const char *format, va_list args) { + vfprintf(stderr, format, args); + fputc('\n', stderr); + fflush(stderr); + exit(1); +} + /* the following function was stolen from the X sources as indicated. */ /* Copyright Massachusetts Institute of Technology 1985, 1986, 1987 */ -- cgit v1.2.3