From 2ac2b506a8ea6e0656a8bb6f81a8f0c1887256b7 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 30 Mar 2016 15:47:23 +0000 Subject: Begin to rewrite Fl_PostScript.cxx under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Posix/Fl_Posix_System_Driver.H | 1 + src/drivers/Posix/Fl_Posix_System_Driver.cxx | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'src/drivers/Posix') diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H index 765d1100c..dc5fe83a2 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.H +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -63,6 +63,7 @@ public: virtual int unlink(const char* f) {return ::unlink(f);} virtual int rmdir(const char* f) {return ::rmdir(f);} virtual int rename(const char* f, const char *n) {return ::rename(f, n);} + virtual int clocale_printf(FILE *output, const char *format, va_list args); }; #endif // FL_POSIX_SYSTEM_DRIVER_H diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index ee3c70fe4..2d7abb575 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -20,6 +20,11 @@ #include "Fl_Posix_System_Driver.H" #include #include +#include +#include +#ifdef __APPLE_CC__ // allows Darwin + X11 +#include +#endif extern XIC fl_xim_ic; // in Fl_x.cxx @@ -63,6 +68,11 @@ void Fl_Posix_System_Driver::compose_reset() if (fl_xim_ic) XmbResetIC(fl_xim_ic); } +int Fl_Posix_System_Driver::clocale_printf(FILE *output, const char *format, va_list args) { + static locale_t postscript_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0); + return vfprintf_l(output, postscript_locale, format, args); +} + // // End of "$Id$". // -- cgit v1.2.3