diff --git a/programs/start/resources.h b/programs/start/resources.h index d965de620e..bbc05350f9 100644 --- a/programs/start/resources.h +++ b/programs/start/resources.h @@ -23,3 +23,4 @@ #define STRING_USAGE 101 #define STRING_EXECFAIL 103 #define STRING_UNIXFAIL 104 +#define STRING_NOMEMFORTITLE 105 diff --git a/programs/start/start.c b/programs/start/start.c index 18fd5f517f..8e40d5156c 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -172,6 +172,25 @@ static BOOL is_option(const WCHAR* arg, const WCHAR* opt) arg, -1, opt, -1) == CSTR_EQUAL; } +static void parse_title(const WCHAR *arg, WCHAR *title, int size) +{ + /* See: + * WCMD_start() in programs/cmd/builtins.c + * WCMD_parameter_with_delims() in programs/cmd/batch.c + * The shell has already tokenized the command line for us. + * All we need to do is filter out all the quotes. + */ + + int next; + const WCHAR *p = arg; + + for (next = 0; next < (size-1) && *p; p++) { + if (*p != '"') + title[next++] = *p; + } + title[next] = '\0'; +} + int wmain (int argc, WCHAR *argv[]) { SHELLEXECUTEINFOW sei; @@ -223,7 +242,13 @@ int wmain (int argc, WCHAR *argv[]) for (i=1; i