Is there a way in C to parse a piece of text and obtain values for argv and argc, as if the text had been passed to an application on the command line?
Matt Peitrek's LIBTINYC has a module called argcargv.cpp that takes a string and parses it out to the argument array taking quoted arguments into account. Note that it's Windows-specific, but it's pretty simple so should be easy to move to whatever platform you want.