actually I was more thinking of copying as is cmd arg parsing code into programs/start rather than creating a new version of it this new version that contains bits that are arguable at best, and wrong at worst * is_option can read after end of arg string (it uses blindly applies option length) * is_option doesn't follow cmd 'logic' (eg one can pass options without spaces between them -` start "foo"/min/wait/d"mydir" notepad`) * iswspace is more readable IMO than _ptr == ' ' ||_ ptr == '\\t' * ... (didn't do all the way)... but I'm not sure how bad it is to inject all the cmd' relevant code into programs/start on the other hand, WCMD_parameter has a poor design (reiterating over first N-1 parameters to get Nth is a bit overkill IMO; if need to discriminate arg from /qualifier, need to keep quotes and then test); WCMD_parse better separates args from qualifiers, but is limited in number of args... in both cases, using global variables to store result should be avoided I'm reluctant to push to programs/start arg handling code which is not the very same as (the) one from program/cmd's (what you've shown is that the standard argc/argv handling isn't what's expected) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10008#note_128963