OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
13 #include "../safeguards.h"
28 if (this->
numleft == 0)
return -1;
31 if (*s !=
'-')
return -1;
50 this->
cont = (s[1] !=
'\0') ? s + 1 :
nullptr;
54 switch (odata->
flags) {
60 if (this->
cont !=
nullptr) {
76 default: NOT_REACHED();
@ ODF_END
Terminator (data is not parsed further).
@ ODF_OPTIONAL_VALUE
An option with an optional value.
const char * longname
Long option name including '-'/'–' prefix, use nullptr if not available.
const OptionData * options
Command line option descriptions.
char ** argv
Remaining command line arguments.
uint16 flags
Option data flags.
char * opt
Option value, if available (else nullptr).
byte id
Unique identification of this option data, often the same as shortname.
char shortname
Short option letter if available, else use '\0'.
char * cont
Next call to GetOpt should start here (in the middle of an argument).
int GetOpt()
Find the next option.
@ ODF_HAS_VALUE
An option with a value.
@ ODF_NO_VALUE
A plain option (no value attached to it).
int numleft
Number of arguments left in argv.