52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
{
self = [super init];
@try {
size_t count = 0;
const OFOptionsParserOption *iter;
OFOptionsParserOption *iter2;
const of_map_table_functions_t keyFunctions = {
.hash = stringHash,
.equal = stringEqual
};
const of_map_table_functions_t objectFunctions = { NULL };
/* Count, sanity check, initialize pointers */
for (iter = options;
iter->shortOption != '\0' || iter->longOption != nil;
iter++) {
if (iter->hasArgument < -1 || iter->hasArgument > 1)
@throw [OFInvalidArgumentException exception];
|
|
|
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
{
self = [super init];
@try {
size_t count = 0;
const OFOptionsParserOption *iter;
OFOptionsParserOption *iter2;
const OFMapTableFunctions keyFunctions = {
.hash = stringHash,
.equal = stringEqual
};
const OFMapTableFunctions objectFunctions = { NULL };
/* Count, sanity check, initialize pointers */
for (iter = options;
iter->shortOption != '\0' || iter->longOption != nil;
iter++) {
if (iter->hasArgument < -1 || iter->hasArgument > 1)
@throw [OFInvalidArgumentException exception];
|