diff options
| author | ian.macarthur <ian.macarthur@leonardocompany.com> | 2022-03-23 11:19:24 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-03-23 19:46:35 +0100 |
| commit | 29c6d6c679d873988581e878f395399a6c4bb369 (patch) | |
| tree | efa031c450d31385ddd98815b71d09feae23ba29 /src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | |
| parent | 54ecae9bda20ac0788525d793c8107c8de7dee40 (diff) | |
Remove vsscanf_l() call from Win32 driver (it appears to be a BSD-ism and unsupported by the MS tools) and rename several clocale specific methods from "name" to "vname" since they take a va_list not a variable list of arguments.
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index 18f6b3e3e..b6a435d02 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -450,7 +450,7 @@ unsigned Fl_WinAPI_System_Driver::utf8from_mb(char *dst, unsigned dstlen, const static _locale_t c_locale = NULL; #endif -int Fl_WinAPI_System_Driver::clocale_printf(FILE *output, const char *format, va_list args) { +int Fl_WinAPI_System_Driver::clocale_vprintf(FILE *output, const char *format, va_list args) { #if defined(_MSC_VER) && (_MSC_VER >= 1400 /*Visual Studio 2005*/) if (!c_locale) c_locale = _create_locale(LC_NUMERIC, "C"); @@ -464,7 +464,7 @@ int Fl_WinAPI_System_Driver::clocale_printf(FILE *output, const char *format, va return retval; } -int Fl_WinAPI_System_Driver::clocale_snprintf(char *output, size_t output_size, const char *format, va_list args) { +int Fl_WinAPI_System_Driver::clocale_vsnprintf(char *output, size_t output_size, const char *format, va_list args) { #if defined(_MSC_VER) && (_MSC_VER >= 1400 /*Visual Studio 2005*/) if (!c_locale) c_locale = _create_locale(LC_NUMERIC, "C"); @@ -478,17 +478,11 @@ int Fl_WinAPI_System_Driver::clocale_snprintf(char *output, size_t output_size, return retval; } -int Fl_WinAPI_System_Driver::clocale_sscanf(const char *input, const char *format, va_list args) { -#if defined(_MSC_VER) && (_MSC_VER >= 1400 /*Visual Studio 2005*/) - if (!c_locale) - c_locale = _create_locale(LC_NUMERIC, "C"); - int retval = _vsscanf_l(input, format, c_locale, args); -#else +int Fl_WinAPI_System_Driver::clocale_vsscanf(const char *input, const char *format, va_list args) { char *saved_locale = setlocale(LC_NUMERIC, NULL); setlocale(LC_NUMERIC, "C"); int retval = vsscanf(input, format, args); setlocale(LC_NUMERIC, saved_locale); -#endif return retval; } |
