Overview
Comment: | OF{LHA,ZIP}Archive: Make mode enum private |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fc4697adbf062a10ce66aac2a0623f7d |
User & Date: | js on 2021-04-28 20:56:58 |
Other Links: | manifest | tags |
Context
2021-04-28
| ||
21:31 | README.md: Update iOS instructions check-in: d89535d740 user: js tags: trunk | |
20:56 | OF{LHA,ZIP}Archive: Make mode enum private check-in: fc4697adbf user: js tags: trunk | |
2021-04-25
| ||
21:20 | runtime: Fix cut & paste mistake check-in: bbf92b046a user: js tags: trunk | |
Changes
Modified src/OFLHAArchive.h from [4b0e86f56f] to [934898264e].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - - - - + | * * @brief A class for accessing and manipulating LHA files. */ OF_SUBCLASSING_RESTRICTED @interface OFLHAArchive: OFObject { OFStream *_stream; |
︙ |
Modified src/OFLHAArchive.m from [164897d7b4] to [8caabc2fe9].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | + + + + + + | #import "OFChecksumMismatchException.h" #import "OFInvalidArgumentException.h" #import "OFNotImplementedException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFWriteFailedException.h" enum { modeRead, modeWrite, modeAppend }; OF_DIRECT_MEMBERS @interface OFLHAArchiveFileReadStream: OFStream <OFReadyForReadingObserving> { OFStream *_stream, *_decompressedStream; OFLHAArchiveEntry *_entry; uint32_t _toRead, _bytesConsumed; |
︙ | |||
90 91 92 93 94 95 96 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + - + - + - - + | { self = [super init]; @try { _stream = [stream retain]; if ([mode isEqual: @"r"]) |
︙ | |||
150 151 152 153 154 155 156 | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | - + | - (OFLHAArchiveEntry *)nextEntry { OFLHAArchiveEntry *entry; char header[21]; size_t headerLen; |
︙ | |||
191 192 193 194 195 196 197 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + - + | entry: entry]; return entry; } - (OFStream *)streamForReadingCurrentEntry { |
︙ |
Modified src/OFZIPArchive.h from [35e140687b] to [3dde37049e].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - - - - - + | * @brief A class for accessing and manipulating ZIP files. */ OF_SUBCLASSING_RESTRICTED @interface OFZIPArchive: OFObject { OFStream *_stream; int64_t _offset; |
︙ |
Modified src/OFZIPArchive.m from [2bb1e08022] to [952e87c05c].
︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + + + | #import "OFUnsupportedVersionException.h" /* * FIXME: Current limitations: * - Split archives are not supported. * - Encrypted files cannot be read. */ enum { modeRead, modeWrite, modeAppend }; OF_DIRECT_MEMBERS @interface OFZIPArchive () - (void)of_readZIPInfo; - (void)of_readEntries; - (void)of_closeLastReturnedStream; - (void)of_writeCentralDirectory; |
︙ | |||
171 172 173 174 175 176 177 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + - + - + - + - - + | - (instancetype)initWithStream: (OFStream *)stream mode: (OFString *)mode { self = [super init]; @try { if ([mode isEqual: @"r"]) |
︙ | |||
396 397 398 399 400 401 402 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + - | { @try { [_lastReturnedStream close]; } @catch (OFNotOpenException *e) { /* Might have already been closed by the user - that's fine. */ } |
︙ | |||
426 427 428 429 430 431 432 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - + | - (OFStream *)streamForReadingFile: (OFString *)path { void *pool = objc_autoreleasePoolPush(); OFZIPArchiveEntry *entry; OFZIPArchiveLocalFileHeader *localFileHeader; int64_t offset64; |
︙ | |||
476 477 478 479 480 481 482 | 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | - + | int64_t offsetAdd = 0; void *pool; OFMutableZIPArchiveEntry *entry; OFString *fileName; OFData *extraField; uint16_t fileNameLength, extraFieldLength; |
︙ | |||
609 610 611 612 613 614 615 | 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | - + | - (void)close { if (_stream == nil) @throw [OFNotOpenException exceptionWithObject: self]; [self of_closeLastReturnedStream]; |
︙ |