Differences From Artifact [03713bc866]:
- File
src/OFOptionsParser.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 6482) [annotate] [blame] [check-ins using]
To Artifact [f1e270d342]:
- File
src/OFOptionsParser.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 6488) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
22 23 24 25 26 27 28 | #import "OFMapTable.h" #import "OFInvalidArgumentException.h" static uint32_t stringHash(void *object) { | | | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #import "OFMapTable.h" #import "OFInvalidArgumentException.h" static uint32_t stringHash(void *object) { return [(OFString *)object hash]; } static bool stringEqual(void *object1, void *object2) { return [(OFString *)object1 isEqual: (OFString *)object2]; } @implementation OFOptionsParser @synthesize lastOption = _lastOption, lastLongOption = _lastLongOption; @synthesize argument = _argument; + (instancetype)parserWithOptions: (const of_options_parser_option_t *)options { return [[[self alloc] initWithOptions: options] autorelease]; } - init { OF_INVALID_INIT_METHOD } - initWithOptions: (const of_options_parser_option_t *)options { self = [super init]; @try { size_t count = 0; const of_options_parser_option_t *iter; of_options_parser_option_t *iter2; |
︙ | ︙ | |||
271 272 273 274 275 276 277 | return _lastOption; } } return '?'; } | | | 271 272 273 274 275 276 277 278 279 280 281 282 283 | return _lastOption; } } return '?'; } - (OFArray *)remainingArguments { return [_arguments objectsInRange: of_range(_index, [_arguments count] - _index)]; } @end |