From 4e4527a123fb99a1677055d89c5fc74323ddc4d8 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 25 Nov 2021 23:11:50 +0300
Subject: [PATCH] SDL_win32_main.c: put back isspace() macro again :
because HAVE_CTYPE_H is not defined for windows here. used a short
version of SDL_isspace instead (like the original macro for wince.)
---
src/SDLmain/win32/SDL_win32_main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/SDLmain/win32/SDL_win32_main.c b/src/SDLmain/win32/SDL_win32_main.c
index fd7fdfd..99ded4e 100644
--- a/src/SDLmain/win32/SDL_win32_main.c
+++ b/src/SDLmain/win32/SDL_win32_main.c
@@ -26,6 +26,9 @@
#define STDOUT_FILE "stdout.txt"
#define STDERR_FILE "stderr.txt"
+#undef SDL_isspace
+#define SDL_isspace(a) ((a) == ' ' || (a) == '\t')
+
/* Set a variable to tell if the stdio redirect has been enabled. */
static int stdioRedirectEnabled = 0;
@@ -63,7 +66,7 @@ static int ParseCommandLine(char *cmdline, char **argv)
argc = last_argc = 0;
for ( bufp = cmdline; *bufp; ) {
/* Skip leading whitespace */
- while ( isspace(*bufp) ) {
+ while ( SDL_isspace(*bufp) ) {
++bufp;
}
/* Skip over argument */
@@ -88,7 +91,7 @@ static int ParseCommandLine(char *cmdline, char **argv)
++argc;
}
/* Skip over word */
- while ( *bufp && ! isspace(*bufp) ) {
+ while ( *bufp && ! SDL_isspace(*bufp) ) {
++bufp;
}
}