Differences From Artifact [f9630635cf]:
- File
src/OFZIPArchiveEntry.m
— part of check-in
[aa1bb213e0]
at
2015-05-09 21:29:43
on branch trunk
— OFZIPArchive: Remove OFFile requirement
Every OFSeekableStream can be used now. (user: js, size: 8795) [annotate] [blame] [check-ins using]
To Artifact [d3ecafe11e]:
- File
src/OFZIPArchiveEntry.m
— part of check-in
[48980f2297]
at
2015-11-29 11:43:05
on branch trunk
— Make properties a requirement and clean up code
This increases the required GCC version from 4.0 to 4.6 (exception:
Apple GCC, which already supports this with >= 4.0 starting with OS X
10.5). Since even GCC 4.6 is really old by now, there is no point in
still supporting something even older and making the code ugly because
of that. While some hardware and OS support was dropped from GCC 4.6
compared to GCC 4.0, there is nothing in there that would be an
interesting target with the exception of BeOS maybe - but a port to BeOS
can also be achieved using the Haiku support. The other dropped OSes are
mostly old versions of OSes while newer ones are still being supported
(and those newer versions of those OSes still support the same
hardware). (user: js, size: 8621) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | } *data = NULL; *size = 0; } @implementation OFZIPArchiveEntry - (instancetype)OF_initWithStream: (OFStream*)stream { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); uint16_t fileNameLength, extraFieldLength, fileCommentLength; | > > > > > > > > > > > > > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | } *data = NULL; *size = 0; } @implementation OFZIPArchiveEntry @synthesize fileName = _fileName, fileComment = _fileComment; @synthesize versionMadeBy = _versionMadeBy; @synthesize minVersionNeeded = _minVersionNeeded; @synthesize compressionMethod = _compressionMethod; @synthesize compressedSize = _compressedSize; @synthesize uncompressedSize = _uncompressedSize; @synthesize CRC32 = _CRC32; @synthesize versionSpecificAttributes = _versionSpecificAttributes; @synthesize OF_generalPurposeBitFlag = _generalPurposeBitFlag; @synthesize OF_lastModifiedFileTime = _lastModifiedFileTime; @synthesize OF_lastModifiedFileDate = _lastModifiedFileDate; @synthesize OF_localFileHeaderOffset = _localFileHeaderOffset; - (instancetype)OF_initWithStream: (OFStream*)stream { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); uint16_t fileNameLength, extraFieldLength, fileCommentLength; |
︙ | ︙ | |||
221 222 223 224 225 226 227 | [_fileName release]; [_extraField release]; [_fileComment release]; [super dealloc]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | [_fileName release]; [_extraField release]; [_fileComment release]; [super dealloc]; } - (OFDate*)modificationDate { void *pool = objc_autoreleasePoolPush(); uint_fast16_t year = ((_lastModifiedFileDate & 0xFE00) >> 9) + 1980; uint_fast8_t month = (_lastModifiedFileDate & 0x1E0) >> 5; uint_fast8_t day = (_lastModifiedFileDate & 0x1F); uint_fast8_t hour = (_lastModifiedFileTime & 0xF800) >> 11; |
︙ | ︙ | |||
280 281 282 283 284 285 286 | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } | < < < < < < < < < < | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | format: @"%Y-%m-%d %H:%M:%S"]; objc_autoreleasePoolPop(pool); return [date autorelease]; } - (OFDataArray*)extraField { return [[_extraField copy] autorelease]; } - (OFString*)description { |
︙ | ︙ | |||
320 321 322 323 324 325 326 | _compressionMethod, (intmax_t)_compressedSize, (intmax_t)_uncompressedSize, modificationDate, _CRC32, _extraField]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } | < < < < < < < < < < < < < < < < < < < < | 288 289 290 291 292 293 294 295 | _compressionMethod, (intmax_t)_compressedSize, (intmax_t)_uncompressedSize, modificationDate, _CRC32, _extraField]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } @end |