[Process API] Quoting enhancements (#12946)

This commit is contained in:
Takase authored and GitHub committed 2025-05-12 09:17:21 -07:00
1 parent 9a6f70d75a
commit f6c1e81394
5 files changed
+217 -9

No files matched your search

+10
View File
@@ -2,6 +2,11 @@
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_test.h>
#ifdef SDL_PLATFORM_WINDOWS
#include <io.h>
#include <fcntl.h>
#endif
#include <stdio.h>
#include <errno.h>
@@ -102,6 +107,11 @@ int main(int argc, char *argv[]) {
if (print_arguments) {
int print_i;
#ifdef SDL_PLATFORM_WINDOWS
/* reopen stdout as binary to prevent newline conversion */
_setmode(_fileno(stdout), _O_BINARY);
#endif
for (print_i = 0; i + print_i < argc; print_i++) {
fprintf(stdout, "|%d=%s|\r\n", print_i, argv[i + print_i]);
}