Added SDL_vsscanf().
authorRyan C. Gordon <icculus@icculus.org>
Sun, 24 Nov 2013 23:35:38 -0500
changeset 8089de8b6fdf6544
parent 8088 e5d77d5e0fe2
child 8090 0098d4459b7a
Added SDL_vsscanf().
CMakeLists.txt
configure
configure.in
include/SDL_config.h.cmake
include/SDL_config.h.in
include/SDL_config_android.h
include/SDL_config_iphoneos.h
include/SDL_config_macosx.h
include/SDL_config_pandora.h
include/SDL_config_psp.h
include/SDL_config_windows.h
include/SDL_config_wiz.h
include/SDL_stdinc.h
premake/Linux/SDL_config_premake.h
premake/MinGW/SDL_config_premake.h
premake/VisualC/VS2008/SDL_config_premake.h
premake/VisualC/VS2010/SDL_config_premake.h
premake/VisualC/VS2012/SDL_config_premake.h
premake/Xcode-iOS/SDL_config_premake.h
premake/Xcode/Xcode3/SDL_config_premake.h
premake/Xcode/Xcode4/SDL_config_premake.h
premake/config/SDL_config_cygwin.template.h
premake/config/SDL_config_iphoneos.template.h
premake/config/SDL_config_linux.template.h
premake/config/SDL_config_macosx.template.h
premake/config/SDL_config_windows.template.h
src/stdlib/SDL_string.c
     1.1 --- a/CMakeLists.txt	Sun Nov 24 21:04:51 2013 -0500
     1.2 +++ b/CMakeLists.txt	Sun Nov 24 23:35:38 2013 -0500
     1.3 @@ -503,13 +503,14 @@
     1.4      check_c_source_compiles("#include <sys/types.h>
     1.5                               #include <sys/mman.h>
     1.6                               int main() { }" HAVE_MPROTECT)
     1.7 +    # FIXME: we don't care if you have snprintf, etc, any more. We only care if you have vsnprintf. Clean this up.
     1.8      foreach(_FN
     1.9              strtod malloc calloc realloc free getenv setenv putenv unsetenv
    1.10              qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
    1.11              strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
    1.12              _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
    1.13              atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
    1.14 -            sscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp
    1.15 +            vsscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp
    1.16              nanosleep sysconf sysctlbyname
    1.17              )
    1.18        string(TOUPPER ${_FN} _UPPER)
     2.1 --- a/configure	Sun Nov 24 21:04:51 2013 -0500
     2.2 +++ b/configure	Sun Nov 24 23:35:38 2013 -0500
     2.3 @@ -16581,7 +16581,7 @@
     2.4  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     2.5  fi
     2.6  
     2.7 -    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname
     2.8 +        for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname
     2.9  do :
    2.10    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
    2.11  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
     3.1 --- a/configure.in	Sun Nov 24 21:04:51 2013 -0500
     3.2 +++ b/configure.in	Sun Nov 24 23:35:38 2013 -0500
     3.3 @@ -268,7 +268,8 @@
     3.4          AC_DEFINE(HAVE_MPROTECT, 1, [ ])
     3.5          ]),
     3.6      )
     3.7 -    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname)
     3.8 +    dnl FIXME: we don't care if you have snprintf, etc, any more. We only care if you have vsnprintf. Clean this up.
     3.9 +    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname)
    3.10  
    3.11      AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
    3.12      AC_CHECK_FUNCS(atan atan2 acos asin ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt)
     4.1 --- a/include/SDL_config.h.cmake	Sun Nov 24 21:04:51 2013 -0500
     4.2 +++ b/include/SDL_config.h.cmake	Sun Nov 24 23:35:38 2013 -0500
     4.3 @@ -124,7 +124,7 @@
     4.4  #cmakedefine HAVE_STRCASECMP 1
     4.5  #cmakedefine HAVE__STRNICMP 1
     4.6  #cmakedefine HAVE_STRNCASECMP 1
     4.7 -#cmakedefine HAVE_SSCANF 1
     4.8 +#cmakedefine HAVE_VSSCANF 1
     4.9  #cmakedefine HAVE_SNPRINTF 1
    4.10  #cmakedefine HAVE_VSNPRINTF 1
    4.11  #cmakedefine HAVE_M_PI 1
     5.1 --- a/include/SDL_config.h.in	Sun Nov 24 21:04:51 2013 -0500
     5.2 +++ b/include/SDL_config.h.in	Sun Nov 24 23:35:38 2013 -0500
     5.3 @@ -128,6 +128,7 @@
     5.4  #undef HAVE__STRNICMP
     5.5  #undef HAVE_STRNCASECMP
     5.6  #undef HAVE_SSCANF
     5.7 +#undef HAVE_VSSCANF
     5.8  #undef HAVE_SNPRINTF
     5.9  #undef HAVE_VSNPRINTF
    5.10  #undef HAVE_M_PI
     6.1 --- a/include/SDL_config_android.h	Sun Nov 24 21:04:51 2013 -0500
     6.2 +++ b/include/SDL_config_android.h	Sun Nov 24 23:35:38 2013 -0500
     6.3 @@ -81,7 +81,7 @@
     6.4  #define HAVE_STRNCMP    1
     6.5  #define HAVE_STRCASECMP 1
     6.6  #define HAVE_STRNCASECMP 1
     6.7 -#define HAVE_SSCANF 1
     6.8 +#define HAVE_VSSCANF 1
     6.9  #define HAVE_SNPRINTF   1
    6.10  #define HAVE_VSNPRINTF  1
    6.11  #define HAVE_M_PI   1
     7.1 --- a/include/SDL_config_iphoneos.h	Sun Nov 24 21:04:51 2013 -0500
     7.2 +++ b/include/SDL_config_iphoneos.h	Sun Nov 24 23:35:38 2013 -0500
     7.3 @@ -79,7 +79,7 @@
     7.4  #define HAVE_STRNCMP    1
     7.5  #define HAVE_STRCASECMP 1
     7.6  #define HAVE_STRNCASECMP 1
     7.7 -#define HAVE_SSCANF 1
     7.8 +#define HAVE_VSSCANF 1
     7.9  #define HAVE_SNPRINTF   1
    7.10  #define HAVE_VSNPRINTF  1
    7.11  #define HAVE_M_PI   1
     8.1 --- a/include/SDL_config_macosx.h	Sun Nov 24 21:04:51 2013 -0500
     8.2 +++ b/include/SDL_config_macosx.h	Sun Nov 24 23:35:38 2013 -0500
     8.3 @@ -82,7 +82,7 @@
     8.4  #define HAVE_STRNCMP    1
     8.5  #define HAVE_STRCASECMP 1
     8.6  #define HAVE_STRNCASECMP 1
     8.7 -#define HAVE_SSCANF 1
     8.8 +#define HAVE_VSSCANF 1
     8.9  #define HAVE_SNPRINTF   1
    8.10  #define HAVE_VSNPRINTF  1
    8.11  #define HAVE_CEIL   1
     9.1 --- a/include/SDL_config_pandora.h	Sun Nov 24 21:04:51 2013 -0500
     9.2 +++ b/include/SDL_config_pandora.h	Sun Nov 24 23:35:38 2013 -0500
     9.3 @@ -81,7 +81,7 @@
     9.4  #define HAVE_STRNCMP 1
     9.5  #define HAVE_STRCASECMP 1
     9.6  #define HAVE_STRNCASECMP 1
     9.7 -#define HAVE_SSCANF 1
     9.8 +#define HAVE_VSSCANF 1
     9.9  #define HAVE_SNPRINTF 1
    9.10  #define HAVE_VSNPRINTF 1
    9.11  #define HAVE_M_PI 1
    10.1 --- a/include/SDL_config_psp.h	Sun Nov 24 21:04:51 2013 -0500
    10.2 +++ b/include/SDL_config_psp.h	Sun Nov 24 23:35:38 2013 -0500
    10.3 @@ -79,7 +79,7 @@
    10.4  #define HAVE_STRNCMP    1
    10.5  #define HAVE_STRCASECMP 1
    10.6  #define HAVE_STRNCASECMP 1
    10.7 -#define HAVE_SSCANF 1
    10.8 +#define HAVE_VSSCANF 1
    10.9  #define HAVE_SNPRINTF   1
   10.10  #define HAVE_VSNPRINTF  1
   10.11  #define HAVE_M_PI   1
    11.1 --- a/include/SDL_config_windows.h	Sun Nov 24 21:04:51 2013 -0500
    11.2 +++ b/include/SDL_config_windows.h	Sun Nov 24 23:35:38 2013 -0500
    11.3 @@ -132,7 +132,7 @@
    11.4  #define HAVE_SQRT 1
    11.5  #if _MSC_VER >= 1800
    11.6  #define HAVE_STRTOLL 1
    11.7 -#define HAVE_SSCANF 1
    11.8 +#define HAVE_VSSCANF 1
    11.9  #define HAVE_COPYSIGN 1
   11.10  #define HAVE_SCALBN 1
   11.11  #endif
    12.1 --- a/include/SDL_config_wiz.h	Sun Nov 24 21:04:51 2013 -0500
    12.2 +++ b/include/SDL_config_wiz.h	Sun Nov 24 23:35:38 2013 -0500
    12.3 @@ -75,7 +75,7 @@
    12.4  #define HAVE_STRNCMP 1
    12.5  #define HAVE_STRCASECMP 1
    12.6  #define HAVE_STRNCASECMP 1
    12.7 -#define HAVE_SSCANF 1
    12.8 +#define HAVE_VSSCANF 1
    12.9  #define HAVE_SNPRINTF 1
   12.10  #define HAVE_VSNPRINTF 1
   12.11  #define HAVE_M_PI 1
    13.1 --- a/include/SDL_stdinc.h	Sun Nov 24 21:04:51 2013 -0500
    13.2 +++ b/include/SDL_stdinc.h	Sun Nov 24 23:35:38 2013 -0500
    13.3 @@ -331,6 +331,7 @@
    13.4  extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
    13.5  
    13.6  extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
    13.7 +extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
    13.8  extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
    13.9  extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
   13.10  
    14.1 --- a/premake/Linux/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    14.2 +++ b/premake/Linux/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    14.3 @@ -128,7 +128,7 @@
    14.4  #define HAVE_STRCASECMP 1
    14.5  /* #undef HAVE__STRNICMP */
    14.6  #define HAVE_STRNCASECMP 1
    14.7 -#define HAVE_SSCANF 1
    14.8 +#define HAVE_VSSCANF 1
    14.9  #define HAVE_SNPRINTF 1
   14.10  #define HAVE_VSNPRINTF 1
   14.11  #define HAVE_M_PI /**/
    15.1 --- a/premake/MinGW/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    15.2 +++ b/premake/MinGW/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    15.3 @@ -118,7 +118,7 @@
    15.4  #define HAVE_STRNCMP 1
    15.5  #define HAVE__STRICMP 1
    15.6  #define HAVE__STRNICMP 1
    15.7 -#define HAVE_SSCANF 1
    15.8 +#define HAVE_VSSCANF 1
    15.9  #define HAVE_M_PI 1
   15.10  #define HAVE_ATAN 1
   15.11  #define HAVE_ATAN2 1
    16.1 --- a/premake/VisualC/VS2008/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    16.2 +++ b/premake/VisualC/VS2008/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    16.3 @@ -118,7 +118,7 @@
    16.4  #define HAVE_STRNCMP 1
    16.5  #define HAVE__STRICMP 1
    16.6  #define HAVE__STRNICMP 1
    16.7 -#define HAVE_SSCANF 1
    16.8 +#define HAVE_VSSCANF 1
    16.9  #define HAVE_M_PI 1
   16.10  #define HAVE_ATAN 1
   16.11  #define HAVE_ATAN2 1
    17.1 --- a/premake/VisualC/VS2010/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    17.2 +++ b/premake/VisualC/VS2010/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    17.3 @@ -118,7 +118,7 @@
    17.4  #define HAVE_STRNCMP 1
    17.5  #define HAVE__STRICMP 1
    17.6  #define HAVE__STRNICMP 1
    17.7 -#define HAVE_SSCANF 1
    17.8 +#define HAVE_VSSCANF 1
    17.9  #define HAVE_M_PI 1
   17.10  #define HAVE_ATAN 1
   17.11  #define HAVE_ATAN2 1
    18.1 --- a/premake/VisualC/VS2012/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    18.2 +++ b/premake/VisualC/VS2012/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    18.3 @@ -118,7 +118,7 @@
    18.4  #define HAVE_STRNCMP 1
    18.5  #define HAVE__STRICMP 1
    18.6  #define HAVE__STRNICMP 1
    18.7 -#define HAVE_SSCANF 1
    18.8 +#define HAVE_VSSCANF 1
    18.9  #define HAVE_M_PI 1
   18.10  #define HAVE_ATAN 1
   18.11  #define HAVE_ATAN2 1
    19.1 --- a/premake/Xcode-iOS/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    19.2 +++ b/premake/Xcode-iOS/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    19.3 @@ -79,7 +79,7 @@
    19.4  #define HAVE_STRNCMP    1
    19.5  #define HAVE_STRCASECMP 1
    19.6  #define HAVE_STRNCASECMP 1
    19.7 -#define HAVE_SSCANF 1
    19.8 +#define HAVE_VSSCANF 1
    19.9  #define HAVE_SNPRINTF   1
   19.10  #define HAVE_VSNPRINTF  1
   19.11  #define HAVE_M_PI   1
    20.1 --- a/premake/Xcode/Xcode3/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    20.2 +++ b/premake/Xcode/Xcode3/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    20.3 @@ -85,7 +85,7 @@
    20.4  #define HAVE_STRNCMP    1
    20.5  #define HAVE_STRCASECMP 1
    20.6  #define HAVE_STRNCASECMP 1
    20.7 -#define HAVE_SSCANF 1
    20.8 +#define HAVE_VSSCANF 1
    20.9  #define HAVE_SNPRINTF   1
   20.10  #define HAVE_VSNPRINTF  1
   20.11  #define HAVE_CEIL   1
    21.1 --- a/premake/Xcode/Xcode4/SDL_config_premake.h	Sun Nov 24 21:04:51 2013 -0500
    21.2 +++ b/premake/Xcode/Xcode4/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    21.3 @@ -85,7 +85,7 @@
    21.4  #define HAVE_STRNCMP    1
    21.5  #define HAVE_STRCASECMP 1
    21.6  #define HAVE_STRNCASECMP 1
    21.7 -#define HAVE_SSCANF 1
    21.8 +#define HAVE_VSSCANF 1
    21.9  #define HAVE_SNPRINTF   1
   21.10  #define HAVE_VSNPRINTF  1
   21.11  #define HAVE_CEIL   1
    22.1 --- a/premake/config/SDL_config_cygwin.template.h	Sun Nov 24 21:04:51 2013 -0500
    22.2 +++ b/premake/config/SDL_config_cygwin.template.h	Sun Nov 24 23:35:38 2013 -0500
    22.3 @@ -124,7 +124,7 @@
    22.4  #define HAVE_STRCASECMP 1
    22.5  /* #undef HAVE__STRNICMP */
    22.6  #define HAVE_STRNCASECMP 1
    22.7 -#define HAVE_SSCANF 1
    22.8 +#define HAVE_VSSCANF 1
    22.9  #define HAVE_SNPRINTF 1
   22.10  #define HAVE_VSNPRINTF 1
   22.11  #define HAVE_M_PI /**/
    23.1 --- a/premake/config/SDL_config_iphoneos.template.h	Sun Nov 24 21:04:51 2013 -0500
    23.2 +++ b/premake/config/SDL_config_iphoneos.template.h	Sun Nov 24 23:35:38 2013 -0500
    23.3 @@ -79,7 +79,7 @@
    23.4  #define HAVE_STRNCMP    1
    23.5  #define HAVE_STRCASECMP 1
    23.6  #define HAVE_STRNCASECMP 1
    23.7 -#define HAVE_SSCANF 1
    23.8 +#define HAVE_VSSCANF 1
    23.9  #define HAVE_SNPRINTF   1
   23.10  #define HAVE_VSNPRINTF  1
   23.11  #define HAVE_M_PI   1
    24.1 --- a/premake/config/SDL_config_linux.template.h	Sun Nov 24 21:04:51 2013 -0500
    24.2 +++ b/premake/config/SDL_config_linux.template.h	Sun Nov 24 23:35:38 2013 -0500
    24.3 @@ -128,7 +128,7 @@
    24.4  #define HAVE_STRCASECMP 1
    24.5  /* #undef HAVE__STRNICMP */
    24.6  #define HAVE_STRNCASECMP 1
    24.7 -#define HAVE_SSCANF 1
    24.8 +#define HAVE_VSSCANF 1
    24.9  #define HAVE_SNPRINTF 1
   24.10  #define HAVE_VSNPRINTF 1
   24.11  #define HAVE_M_PI /**/
    25.1 --- a/premake/config/SDL_config_macosx.template.h	Sun Nov 24 21:04:51 2013 -0500
    25.2 +++ b/premake/config/SDL_config_macosx.template.h	Sun Nov 24 23:35:38 2013 -0500
    25.3 @@ -85,7 +85,7 @@
    25.4  #define HAVE_STRNCMP    1
    25.5  #define HAVE_STRCASECMP 1
    25.6  #define HAVE_STRNCASECMP 1
    25.7 -#define HAVE_SSCANF 1
    25.8 +#define HAVE_VSSCANF 1
    25.9  #define HAVE_SNPRINTF   1
   25.10  #define HAVE_VSNPRINTF  1
   25.11  #define HAVE_CEIL   1
    26.1 --- a/premake/config/SDL_config_windows.template.h	Sun Nov 24 21:04:51 2013 -0500
    26.2 +++ b/premake/config/SDL_config_windows.template.h	Sun Nov 24 23:35:38 2013 -0500
    26.3 @@ -118,7 +118,7 @@
    26.4  #define HAVE_STRNCMP 1
    26.5  #define HAVE__STRICMP 1
    26.6  #define HAVE__STRNICMP 1
    26.7 -#define HAVE_SSCANF 1
    26.8 +#define HAVE_VSSCANF 1
    26.9  #define HAVE_M_PI 1
   26.10  #define HAVE_ATAN 1
   26.11  #define HAVE_ATAN2 1
    27.1 --- a/src/stdlib/SDL_string.c	Sun Nov 24 21:04:51 2013 -0500
    27.2 +++ b/src/stdlib/SDL_string.c	Sun Nov 24 23:35:38 2013 -0500
    27.3 @@ -43,7 +43,7 @@
    27.4          return 0;
    27.5  }
    27.6  
    27.7 -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOL)
    27.8 +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL)
    27.9  static size_t
   27.10  SDL_ScanLong(const char *text, int radix, long *valuep)
   27.11  {
   27.12 @@ -84,7 +84,7 @@
   27.13  }
   27.14  #endif
   27.15  
   27.16 -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD)
   27.17 +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD)
   27.18  static size_t
   27.19  SDL_ScanUnsignedLong(const char *text, int radix, unsigned long *valuep)
   27.20  {
   27.21 @@ -116,7 +116,7 @@
   27.22  }
   27.23  #endif
   27.24  
   27.25 -#ifndef HAVE_SSCANF
   27.26 +#ifndef HAVE_VSSCANF
   27.27  static size_t
   27.28  SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep)
   27.29  {
   27.30 @@ -148,7 +148,7 @@
   27.31  }
   27.32  #endif
   27.33  
   27.34 -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOLL)
   27.35 +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOLL)
   27.36  static size_t
   27.37  SDL_ScanLongLong(const char *text, int radix, Sint64 * valuep)
   27.38  {
   27.39 @@ -189,7 +189,7 @@
   27.40  }
   27.41  #endif
   27.42  
   27.43 -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOULL)
   27.44 +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOULL)
   27.45  static size_t
   27.46  SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 * valuep)
   27.47  {
   27.48 @@ -221,7 +221,7 @@
   27.49  }
   27.50  #endif
   27.51  
   27.52 -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOD)
   27.53 +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOD)
   27.54  static size_t
   27.55  SDL_ScanFloat(const char *text, double *valuep)
   27.56  {
   27.57 @@ -967,25 +967,29 @@
   27.58  #endif /* HAVE_STRNCASECMP */
   27.59  }
   27.60  
   27.61 -#ifdef HAVE_SSCANF
   27.62  int
   27.63  SDL_sscanf(const char *text, const char *fmt, ...)
   27.64  {
   27.65      int rc;
   27.66      va_list ap;
   27.67      va_start(ap, fmt);
   27.68 -    rc = vsscanf(text, fmt, ap);
   27.69 +    rc = SDL_vsscanf(text, fmt, ap);
   27.70      va_end(ap);
   27.71      return rc;
   27.72  }
   27.73 +
   27.74 +#ifdef HAVE_VSSCANF
   27.75 +int
   27.76 +SDL_vsscanf(const char *text, const char *fmt, va_list ap)
   27.77 +{
   27.78 +    return vsscanf(text, fmt, ap);
   27.79 +}
   27.80  #else
   27.81  int
   27.82 -SDL_sscanf(const char *text, const char *fmt, ...)
   27.83 +SDL_vsscanf(const char *text, const char *fmt, ...)
   27.84  {
   27.85 -    va_list ap;
   27.86      int retval = 0;
   27.87  
   27.88 -    va_start(ap, fmt);
   27.89      while (*fmt) {
   27.90          if (*fmt == ' ') {
   27.91              while (SDL_isspace((unsigned char) *text)) {
   27.92 @@ -1239,11 +1243,10 @@
   27.93          /* Text didn't match format specifier */
   27.94          break;
   27.95      }
   27.96 -    va_end(ap);
   27.97  
   27.98      return retval;
   27.99  }
  27.100 -#endif /* HAVE_SSCANF */
  27.101 +#endif /* HAVE_VSSCANF */
  27.102  
  27.103  int
  27.104  SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...)