From 70298c0832b2e9a3df0ca1762f646437b13597c5 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sat, 4 Jul 2020 21:30:15 +0200 Subject: [PATCH] Use SDL string functions where possible --- src/include/uae/string.h | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/include/uae/string.h b/src/include/uae/string.h index 22608bef..5385caef 100644 --- a/src/include/uae/string.h +++ b/src/include/uae/string.h @@ -4,6 +4,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include + #include "uae/types.h" #include @@ -18,42 +20,42 @@ #ifdef _WIN32 /* Using the real _tcs* functions */ #else -#define _istdigit isdigit -#define _istspace isspace +#define _istdigit SDL_isdigit +#define _istspace SDL_isspace #define _istupper isupper -#define _sntprintf snprintf +#define _sntprintf SDL_snprintf #define _stprintf sprintf -#define _strtoui64 strtoll +#define _strtoui64 SDL_strtoll #define _tcscat strcat -#define _tcschr strchr -#define _tcscmp strcmp +#define _tcschr SDL_strchr +#define _tcscmp SDL_strcmp #define _tcscpy strcpy #define _tcscspn strcspn -#define _tcsdup strdup +#define _tcsdup SDL_strdup #define _tcsftime strftime #define _tcsftime strftime #define _tcsicmp stricmp -#define _tcslen strlen +#define _tcslen SDL_strlen #define _tcsncat strncat -#define _tcsncmp strncmp +#define _tcsncmp SDL_strncmp #define _tcsncpy strncpy #define _tcsnicmp SDL_strncasecmp -#define _tcsrchr strrchr +#define _tcsrchr SDL_strrchr #define _tcsspn strspn -#define _tcsstr strstr -#define _tcstod strtod +#define _tcsstr SDL_strstr +#define _tcstod SDL_strtod #define _tcstok strtok -#define _tcstol strtol -#define _tcstoul strtoul -#define _totlower tolower -#define _totupper toupper +#define _tcstol SDL_strtol +#define _tcstoul SDL_strtoul +#define _totlower SDL_tolower +#define _totupper SDL_toupper #define _tprintf printf -#define _tstof atof +#define _tstof SDL_atof #define _tstoi64 atoll -#define _tstoi atoi +#define _tstoi SDL_atoi #define _tstol atol -#define _vsnprintf vsnprintf -#define _vsntprintf vsnprintf +#define _vsnprintf SDL_vsnprintf +#define _vsntprintf SDL_vsnprintf #endif static inline size_t uae_tcslcpy(char *dst, const TCHAR *src, size_t size)