Parse command line options.
int __fastcall__ getopt (int argc, char* const* argv, const char* optstring);
The function parses command line arguments,
argvare the argument count and array passed to
optstringis a string that contains command line option characters. If a character in
optstringis followed by a colon, the option requires an argument. An option on the command line is recognized if it is one of the option characters preceeded by a '-'.
getoptmust be called repeatedly. It will return each option character found on the command line and
EOF(-1) if there is no other option. An option argument is placed in
optarg, the index of the next element on the command line to be processed is placed in
- The implementation will not reorder options. A non option on the command line will terminate option processing. All remaining arguments are not recognized as options, even if the start with a '-' character.
- The function is only available as fastcall function, so it may only be used in presence of a prototype.