Differences From Artifact [9b11336043]:
- File utils/ofzip/OFZIP.m — part of check-in [1ba08eebc5] at 2015-10-19 22:15:13 on branch trunk — Add platform.h & make platform defines consistent (user: js, size: 11968) [annotate] [blame] [check-ins using]
To Artifact [6492307736]:
- File
utils/ofzip/OFZIP.m
— part of check-in
[bfa913aebe]
at
2015-11-28 18:56:19
on branch trunk
— OFOptionsParser: Reworked API
The new API allows long options and requires less manual parsing. (user: js, size: 12738) [annotate] [blame] [check-ins using]
︙ | |||
104 105 106 107 108 109 110 111 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + + + + + + + + + + - + | } #endif } @implementation OFZIP - (void)applicationDidFinishLaunching { const of_options_parser_option_t options[] = { { 'f', @"force", 0, NULL, NULL }, { 'h', @"help", 0, NULL, NULL }, { 'l', @"list", 0, NULL, NULL }, { 'n', @"no-clobber", 0, NULL, NULL }, { 'q', @"quiet", 0, NULL, NULL }, { 'v', @"verbose", 0, NULL, NULL }, { 'x', @"extract", 0, NULL, NULL }, { '\0', nil, 0, NULL, NULL } }; OFOptionsParser *optionsParser = |
︙ | |||
146 147 148 149 150 151 152 153 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | + + + + + + + + + - - - + + + + + + + + + + | mutuallyExclusiveError('x', 'l'); mode = option; break; case 'h': help(of_stdout, true, 0); break; case '=': [of_stderr writeFormat: @"%@: Option --%@ takes no " @"argument!\n", [OFApplication programName], [optionsParser lastLongOption]]; [OFApplication terminateWithStatus: 1]; break; default: if ([optionsParser lastLongOption] != nil) |
︙ | |||
355 356 357 358 359 360 361 | 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | + - + - | } directory = [outFileName stringByDeletingLastPathComponent]; if (![fileManager directoryExistsAtPath: directory]) [fileManager createDirectoryAtPath: directory createParents: true]; if (_override != 1 && |
︙ |