22 UnEscapeQuotes(
char *arg)
27 if (*arg ==
'"' && (last !=
NULL && *last ==
'\\')) {
45 ParseCommandLine(
char *cmdline,
char **argv)
52 for (bufp = cmdline; *bufp;) {
68 while (*bufp && (*bufp !=
'"' || *lastp ==
'\\')) {
92 if (argv && last_argc != argc) {
93 UnEscapeQuotes(argv[last_argc]);
111 #if defined(_MSC_VER) 113 # define console_ansi_main main 115 # define console_wmain wmain 121 main_utf8(
int argc,
char *argv[])
140 TCHAR *text = GetCommandLine();
147 if (cmdline ==
NULL) {
148 return OutOfMemory();
152 argc = ParseCommandLine(cmdline,
NULL);
155 return OutOfMemory();
157 ParseCommandLine(cmdline, argv);
159 retval = main_utf8(argc, argv);
169 console_ansi_main(
int argc,
char *argv[])
171 return main_getcmdline();
178 console_wmain(
int argc,
wchar_t *wargv[],
wchar_t *wenvp)
184 for (i = 0; i < argc; ++i) {
189 retval = main_utf8(argc, argv);
200 WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine,
int sw)
202 return main_getcmdline();
DECLSPEC char *SDLCALL SDL_strdup(const char *str)
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
#define SDL_stack_alloc(type, count)
#define WIN_StringToUTF8(S)
SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[])
DECLSPEC int SDLCALL SDL_isspace(int x)
DECLSPEC void SDLCALL SDL_SetMainReady(void)
DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window)
Create a simple modal message box.
DECLSPEC void SDLCALL SDL_free(void *mem)
#define SDL_stack_free(data)