- wxArrayString args;
-
- const char *cptr = command.c_str();
-
- // split the command line in arguments
- //
- // TODO: combine this with wxCmdLineParser::ConvertStringToArgs(), it
- // doesn't do exactly the same thing right now but it's pretty close
- // and we shouldn't maintain 2 copies of this code
- do
- {
- wxString argument;
- char quotechar = '\0'; // is arg quoted?
- bool escaped = false;
-
- // eat leading whitespace:
- while ( wxIsspace(*cptr) )
- cptr++;
-
- if ( *cptr == '\'' || *cptr == '"' )
- quotechar = *cptr++;
-
- do
- {
- if ( *cptr == '\\' && !escaped )
- {
- escaped = true;
- cptr++;
- continue;
- }
+ ArgsArray argv(wxCmdLineParser::ConvertStringToArgs(command,
+ wxCMD_LINE_SPLIT_UNIX));