Alexei Babich wrote: > Hi, Duane. > > >> It sounds like you want options from from the "dos/unix" command line in >> a batch file format. >> > Thank you for your detailed letter. As I understand English is not always > good, I'm still going to study the letter carefully :) But now, not to waste > time, let me clarify: > we are talking about C-code inside the driver imx3 * _nand, which takes a > string from the config file: "nand probe bla-bla [options]". > These options, in the form of "char *cmd, char **args, int argc", must be > analyzed. Comparing [many] variants with constant templates is ugly. I am > looking for a good way, which can be used in C-code. > Are we talking about the same? > If yes, then say "yes", please. >
Yes. The "char *cmd, char **args, int argc" - is "old-style" command. Today there is *NO* getopt style feature inside of OpenOCD source code to help "old-style" commands. There *is* for (new) JIM-TCL commands, but *NOT* for "old-style" commands. For old-style commands - what does exist is "parse_ulong()" - and "parse_llong()" functions and many other "parse" functions. Look at the end of "command.h" -Duane _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development