29 for (
size_t index = 0; index < len; index++)
41 option zero = {0,0,0,0};
81 int oldopterr = ::opterr;
86 ::optind = startindex;
102 ret = ::getopt_long_only(argc, argv,
"", longopts, &index);
109 if ((ret ==
'?') || (ret ==
':'))
118 if ((longopts[index].has_arg != 0) && (optarg != NULL))
129 for (
int j = ::optind; j < argc; j++)
131 if (strcmp(
"--", argv[j]) == 0)
147 ::opterr = oldopterr;
std::vector< option > _options
const option * GenerateOptions()
HRESULT ParseCommandLine(int argc, char **argv, int startindex, bool *fParseError)
HRESULT AddNonOption(std::string *pStrResult)
std::vector< OptionDetail > _listOptionDetails
HRESULT AddOption(const char *pszName, int has_arg, std::string *pStrResult)
#define ChkIfA(expr, hrerror)
std::vector< std::string * > _namelessArgs