Differences From Artifact [59a725be71]:
- File utils/ofhash/OFHash.m — part of check-in [325f616d84] at 2015-06-28 17:16:21 on branch trunk — {generators,utils/of{hash,http}}: Use generics (user: js, size: 3466) [annotate] [blame] [check-ins using]
To Artifact [d5afdd7b11]:
- File
utils/ofhash/OFHash.m
— part of check-in
[6b13727ce0]
at
2015-11-29 14:02:11
on branch trunk
— Make use of fast enumeration
Now that we require GCC >= 4.6 anyway, there's no more reason to not use
it anymore. (user: js, size: 3386) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
69 70 71 72 73 74 75 | } @implementation OFHash - (void)applicationDidFinishLaunching { OFArray OF_GENERIC(OFString*) *arguments = [OFApplication arguments]; id <OFHash> hash; | < | | < < | > > > > > > > | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | } @implementation OFHash - (void)applicationDidFinishLaunching { OFArray OF_GENERIC(OFString*) *arguments = [OFApplication arguments]; id <OFHash> hash; bool first = true; int exitStatus = 0; if ([arguments count] < 2) help(); if ((hash = hashForName([arguments firstObject])) == nil) help(); for (OFString *path in arguments) { void *pool; OFStream *file; const uint8_t *digest; size_t i, digestSize; if (first) { first = false; continue; } pool = objc_autoreleasePoolPush(); if ([path isEqual: @"-"]) file = of_stdin; else { @try { file = [OFFile fileWithPath: path mode: @"rb"]; } @catch (OFOpenItemFailedException *e) { |
︙ | ︙ |