Differences From Artifact [3d818b6285]:
- File
utils/ofzip/OFZIP.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 12546) [annotate] [blame] [check-ins using]
To Artifact [7f837623bc]:
- File
utils/ofzip/OFZIP.m
— part of check-in
[d3158d091f]
at
2016-01-05 22:00:03
on branch trunk
— (u)int_fast*_t -> (u)int*_t
(U)INT_FAST*_MAX is broken on Android, which makes (u)int_fast*_t
dangerous to use while it does not provide any real speed benefit. (user: js, size: 12531) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
42 43 44 45 46 47 48 | #endif #ifndef S_IRWXO # define S_IRWXO 0 #endif @interface OFZIP: OFObject { | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #endif #ifndef S_IRWXO # define S_IRWXO 0 #endif @interface OFZIP: OFObject { int8_t _override, _outputLevel; int _exitStatus; } - (OFZIPArchive*)openArchiveWithPath: (OFString*)path; - (void)listFilesInArchive: (OFZIPArchive*)archive; - (void)extractFiles: (OFArray OF_GENERIC(OFString*)*)files fromArchive: (OFZIPArchive*)archive; |
︙ | ︙ | |||
326 327 328 329 330 331 332 | OFString *outFileName = [fileName stringByStandardizingPath]; OFArray OF_GENERIC(OFString*) *pathComponents; OFString *directory; OFStream *stream; OFFile *output; char buffer[BUFFER_SIZE]; uint64_t written = 0, size = [entry uncompressedSize]; | | | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | OFString *outFileName = [fileName stringByStandardizingPath]; OFArray OF_GENERIC(OFString*) *pathComponents; OFString *directory; OFStream *stream; OFFile *output; char buffer[BUFFER_SIZE]; uint64_t written = 0, size = [entry uncompressedSize]; int8_t percent = -1, newPercent; if (!all && ![files containsObject: fileName]) continue; [missing removeObject: fileName]; #if !defined(OF_WINDOWS) && !defined(OF_MSDOS) |
︙ | ︙ | |||
452 453 454 455 456 457 458 | _exitStatus = 1; goto outer_loop_end; } written += length; newPercent = (written == size | | | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | _exitStatus = 1; goto outer_loop_end; } written += length; newPercent = (written == size ? 100 : (int8_t)(written * 100 / size)); if (_outputLevel >= 0 && percent != newPercent) { percent = newPercent; [of_stdout writeFormat: @"\rExtracting %@... %3u%%", fileName, percent]; |
︙ | ︙ |