12 #include "../stdafx.h" 15 #include "../safeguards.h" 30 if (this->
numleft == 0)
return -1;
33 if (*s !=
'-')
return -1;
52 this->
cont = (s[1] !=
'\0') ? s + 1 : NULL;
56 switch (odata->
flags) {
62 if (this->
cont != NULL) {
78 default: NOT_REACHED();
A plain option (no value attached to it).
char ** argv
Remaining command line arguments.
const char * longname
Long option name including '-'/'–' prefix, use NULL if not available.
Terminator (data is not parsed further).
Library for parsing command-line options.
An option with an optional value.
const OptionData * options
Command line option descriptions.
char * opt
Option value, if available (else NULL).
uint16 flags
Option data flags.
char * cont
Next call to #MyGetOpt should start here (in the middle of an argument).
byte id
Unique identification of this option data, often the same as shortname.
char shortname
Short option letter if available, else use '\0'.
int GetOpt()
Find the next option.
int numleft
Number of arguments left in argv.