diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-05 16:04:53 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-05 16:04:53 +0000 |
| commit | 80b1529ef4d69d9e34a48a419a018d7f4d64054b (patch) | |
| tree | 7c743dc2f7f17654f1535314f6b0e6c5eadfc21b /src/Fl_abort.cxx | |
| parent | 60399e3945dcfe9a2bb9f00f794d9e8634dd6bd9 (diff) | |
Multiple patches from Bill:
- Double-buffered window fixes.
- Tabs fixes.
- X/WIN32 fixes.
- Fl_Input fixes.
- Support for vsnprintf and friends.
- Support for printf-style arguments in utility functions.
git-svn-id: file:///fltk/svn/fltk/trunk@52 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_abort.cxx')
| -rw-r--r-- | src/Fl_abort.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Fl_abort.cxx b/src/Fl_abort.cxx index 05ae00e27..b03df4eb6 100644 --- a/src/Fl_abort.cxx +++ b/src/Fl_abort.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_abort.cxx,v 1.3 1998/10/21 14:20:29 mike Exp $" +// "$Id: Fl_abort.cxx,v 1.4 1998/11/05 16:04:49 mike Exp $" // // Warning/error message code for the Fast Light Tool Kit (FLTK). // @@ -56,12 +56,15 @@ static void error(const char *format, ...) { #else #include <windows.h> +extern "C" { +int vsnprintf(char* str, size_t size, const char* fmt, va_list ap); +} static void warning(const char *format, ...) { va_list args; char buf[1024]; va_start(args, format); - vsprintf(buf, format, args); + vnsprintf(buf, 1024, format, args); va_end(args); MessageBox(0,buf,"Warning",MB_ICONEXCLAMATION|MB_OK); } @@ -70,7 +73,7 @@ static void error(const char *format, ...) { va_list args; char buf[1024]; va_start(args, format); - vsprintf(buf, format, args); + vnsprintf(buf, 1024, format, args); va_end(args); MessageBox(0,buf,"Error",MB_ICONSTOP|MB_SYSTEMMODAL); ::exit(1); @@ -83,5 +86,5 @@ void (*Fl::error)(const char* format, ...) = ::error; void (*Fl::fatal)(const char* format, ...) = ::error; // -// End of "$Id: Fl_abort.cxx,v 1.3 1998/10/21 14:20:29 mike Exp $". +// End of "$Id: Fl_abort.cxx,v 1.4 1998/11/05 16:04:49 mike Exp $". // |
