From f1b00c6637ad5752fa70eb1a8c1ac8ba274210f7 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 21 Mar 2022 17:16:14 +0100 Subject: Fix driver definitions of vsnprintf() and vsscanf() These two functions are fully defined in the platform specific driver methods, there's no need to define them in the base class. This quick fix returns 0 from the base class method. The main reason was to avoid a compiler error of MSVC 2010 and earlier, i.e. before MSVC 2012. Todo: int Fl_WinAPI_System_Driver::clocale_sscanf() needs to be fixed because '_vsscanf_l()' (with lower case 'L' for 'locale') does not exist in MSVC 2010 and earlier. It is not clear yet in which version it was added - current MS docs show it in MSVC 2015 and later. --- src/Fl_System_Driver.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Fl_System_Driver.cxx') diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx index f207ed8b8..143585b72 100644 --- a/src/Fl_System_Driver.cxx +++ b/src/Fl_System_Driver.cxx @@ -406,11 +406,11 @@ int Fl_System_Driver::clocale_printf(FILE *output, const char *format, va_list a } int Fl_System_Driver::clocale_snprintf(char *output, size_t output_size, const char *format, va_list args) { - return vsnprintf(output, output_size, format, args); + return 0; // overridden in platform drivers } int Fl_System_Driver::clocale_sscanf(const char *input, const char *format, va_list args) { - return vsscanf(input, format, args); + return 0; // overridden in platform drivers } int Fl_System_Driver::filename_expand(char *to,int tolen, const char *from) { -- cgit v1.2.3