Changes In Branch 0.8 Through [022994c409] Excluding Merge-Ins
This is equivalent to a diff from 6b8b7b6a7e to 022994c409
2015-09-06
| ||
15:51 | Fix compilation for Wii check-in: cfbd50afe2 user: js tags: 0.8 | |
2015-08-26
| ||
09:07 | OFZIPArchive: Throw invalid format on failed seek check-in: 022994c409 user: js tags: 0.8 | |
08:53 | Make sure of_hash_seed is never initialized to 0 check-in: 1b09ca22f3 user: js tags: 0.8 | |
2015-08-21
| ||
17:51 | Set version to 0.9-dev check-in: 9d505a482a user: js tags: trunk | |
2015-08-14
| ||
16:43 | Branch for 0.8 check-in: e63c7f6f7d user: js tags: 0.8, 0.8-release | |
16:41 | Update ChangeLog for 0.8 check-in: 6b8b7b6a7e user: js tags: trunk | |
09:44 | ChangeLog: Remove trailing dots check-in: bebee54bff user: js tags: trunk | |
Modified configure.ac from [f7868ab464] to [42239fc479].
|
| | | 1 2 3 4 5 6 7 8 | AC_INIT(ObjFW, 0.8, js@webkeks.org) BUILDSYS_INIT AS_IF([test configure.ac -nt configure], [ AC_MSG_ERROR([configure.ac is newer than configure! Run ./autogen.sh!]) ]) AC_CONFIG_SRCDIR(src) |
︙ | ︙ | |||
514 515 516 517 518 519 520 | ]) test x"$have_asprintf" != x"yes" -a x"$ac_cv_snprintf_useful_ret" != x"yes" && \ AC_MSG_ERROR(No asprintf and no snprintf returning required space!) AC_CHECK_FUNCS([arc4random random], break) AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl") | | | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | ]) test x"$have_asprintf" != x"yes" -a x"$ac_cv_snprintf_useful_ret" != x"yes" && \ AC_MSG_ERROR(No asprintf and no snprintf returning required space!) AC_CHECK_FUNCS([arc4random random], break) AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl") AC_CHECK_HEADERS_ONCE(dlfcn.h) case "$host_os" in netbsd*) dnl dladdr exists on NetBSD, but it is completely broken. dnl When using it with code that uses __thread, it freezes the dnl process so that it has to be killed using SIGKILL. dnl When disabling __thread, it doesn't freeze, but all symbols dnl are wrong. |
︙ | ︙ | |||
591 592 593 594 595 596 597 | AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads]) AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}') AC_ARG_ENABLE(compiler-tls, AS_HELP_STRING([--disable-compiler-tls], [disable compiler thread local storage])) AS_IF([test x"$enable_compiler_tls" != x"no"], [ | | | 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads]) AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}') AC_ARG_ENABLE(compiler-tls, AS_HELP_STRING([--disable-compiler-tls], [disable compiler thread local storage])) AS_IF([test x"$enable_compiler_tls" != x"no"], [ AC_CHECK_HEADER(threads.h, [ AC_DEFINE(OF_HAVE_THREADS_H, 1, [Whether we have threads.h]) ]) AC_MSG_CHECKING(whether _Thread_local works) AC_TRY_LINK([ static _Thread_local int x = 0; |
︙ | ︙ | |||
763 764 765 766 767 768 769 | AC_CHECK_LIB(network, socket, LIBS="$LIBS -lnetwork") AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32") AC_CHECK_HEADER(sys/socket.h, [ AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1, [Whether we have sys/socket.h]) ]) | | | | 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | AC_CHECK_LIB(network, socket, LIBS="$LIBS -lnetwork") AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32") AC_CHECK_HEADER(sys/socket.h, [ AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1, [Whether we have sys/socket.h]) ]) AC_CHECK_HEADER(netinet/in.h, [ AC_DEFINE(OF_HAVE_NETINET_IN_H, 1, [Whether we have netinet/in.h]) ]) AC_CHECK_HEADER(netinet/tcp.h, [ AC_DEFINE(OF_HAVE_NETINET_TCP_H, 1, [Whether we have netinet/tcp.h]) ]) AC_CHECK_HEADERS([arpa/inet.h netdb.h]) AC_CHECK_FUNCS([paccept accept4]) |
︙ | ︙ | |||
960 961 962 963 964 965 966 | ;; esac AS_IF([test x"$have_processes" = x"yes"], [ AC_SUBST(OFPROCESS_M, "OFProcess.m") AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes]) ]) | | | 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | ;; esac AS_IF([test x"$have_processes" = x"yes"], [ AC_SUBST(OFPROCESS_M, "OFProcess.m") AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes]) ]) AC_CHECK_HEADERS_ONCE([sys/ioctl.h sys/termios.h]) AS_IF([test x"$objc_runtime" = x"Apple runtime"], [ AC_CHECK_HEADER(Foundation/NSObject.h, [ AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m") AC_SUBST(BRIDGE, "bridge") AS_IF([test x"$enable_shared" != x"no"], [ |
︙ | ︙ |
Modified src/OFBlock.m from [c478213743] to [536f7c35b9].
︙ | ︙ | |||
237 238 239 240 241 242 243 | { int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK | OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF); if (src_ == NULL) return; | < < < > | | < < < > | | | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | { int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK | OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF); if (src_ == NULL) return; switch (flags) { case OF_BLOCK_FIELD_IS_BLOCK: *(of_block_literal_t**)dst_ = _Block_copy(src_); break; case OF_BLOCK_FIELD_IS_OBJECT: if (!(flags_ & OF_BLOCK_BYREF_CALLER)) *(id*)dst_ = [(id)src_ retain]; break; case OF_BLOCK_FIELD_IS_BYREF:; of_block_byref_t *src = (of_block_byref_t*)src_; of_block_byref_t **dst = (of_block_byref_t**)dst_; if ((src->flags & OF_BLOCK_REFCOUNT_MASK) == 0) { if ((*dst = malloc(src->size)) == NULL) { alloc_failed_exception.isa = [OFAllocFailedException class]; @throw (OFAllocFailedException*) &alloc_failed_exception; } if (src->forwarding == src) (*dst)->forwarding = *dst; memcpy(*dst, src, src->size); if (src->flags & OF_BLOCK_HAS_COPY_DISPOSE) src->byref_keep(*dst, src); } else *dst = src; (*dst)->flags++; break; } } void _Block_object_dispose(const void *obj_, const int flags_) { const int flags = flags_ & (OF_BLOCK_FIELD_IS_BLOCK | OF_BLOCK_FIELD_IS_OBJECT | OF_BLOCK_FIELD_IS_BYREF); if (obj_ == NULL) return; switch (flags) { case OF_BLOCK_FIELD_IS_BLOCK: _Block_release(obj_); break; case OF_BLOCK_FIELD_IS_OBJECT: if (!(flags_ & OF_BLOCK_BYREF_CALLER)) [(id)obj_ release]; break; case OF_BLOCK_FIELD_IS_BYREF:; of_block_byref_t *obj = (of_block_byref_t*)obj_; if ((--obj->flags & OF_BLOCK_REFCOUNT_MASK) == 0) { if (obj->flags & OF_BLOCK_HAS_COPY_DISPOSE) obj->byref_dispose(obj); free(obj); } break; } } |
︙ | ︙ |
Modified src/OFFile.h from [03d8a7c1d4] to [26137313b3].
︙ | ︙ | |||
149 150 151 152 153 154 155 156 157 158 159 160 | * @param path The new directory to change to */ + (void)changeCurrentDirectoryPath: (OFString*)path; /*! * @brief Returns the size of the specified file. * * @return The size of the specified file */ + (of_offset_t)sizeOfFileAtPath: (OFString*)path; /*! | > > | > > | | > > > | | > > > | | 149 150 151 152 153 154 155 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 190 191 192 193 194 | * @param path The new directory to change to */ + (void)changeCurrentDirectoryPath: (OFString*)path; /*! * @brief Returns the size of the specified file. * * @param path The path to the file whose path should be returned * * @return The size of the specified file */ + (of_offset_t)sizeOfFileAtPath: (OFString*)path; /*! * @brief Returns the last access time of the specified item. * * @param path The path to the file whose last access time should be returned * * @return The last access time of the specified item */ + (OFDate*)accessTimeOfItemAtPath: (OFString*)path; /*! * @brief Returns the last modification time of the specified item. * * @param path The path to the file whose last modification time should be * returned * * @return The last modification time of the specified item */ + (OFDate*)modificationTimeOfItemAtPath: (OFString*)path; /*! * @brief Returns the last status change time of the specified item. * * @param path The path to the file whose last status change time should be * returned * * @return The last status change time of the specified item */ + (OFDate*)statusChangeTimeOfItemAtPath: (OFString*)path; #ifdef OF_HAVE_CHMOD /*! * @brief Changes the permissions of an item. * |
︙ | ︙ | |||
280 281 282 283 284 285 286 287 288 289 290 291 292 293 | + (void)createSymbolicLinkAtPath: (OFString*)destination withDestinationPath: (OFString*)source; /*! * @brief Returns the destination of the symbolic link at the specified path. * * @param path The path to the symbolic link * @return The destination of the symbolic link at the specified path */ + (OFString*)destinationOfSymbolicLinkAtPath: (OFString*)path; #endif /*! * @brief Initializes an already allocated OFFile. | > | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | + (void)createSymbolicLinkAtPath: (OFString*)destination withDestinationPath: (OFString*)source; /*! * @brief Returns the destination of the symbolic link at the specified path. * * @param path The path to the symbolic link * * @return The destination of the symbolic link at the specified path */ + (OFString*)destinationOfSymbolicLinkAtPath: (OFString*)path; #endif /*! * @brief Initializes an already allocated OFFile. |
︙ | ︙ |
Modified src/OFFile.m from [2c4c5b7c7a] to [da1fb6d2d1].
︙ | ︙ | |||
115 116 117 118 119 120 121 | # define S_IWOTH 0 #endif #define DEFAULT_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH #define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) | | | | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | # define S_IWOTH 0 #endif #define DEFAULT_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH #define DIR_MODE DEFAULT_MODE | S_IXUSR | S_IXGRP | S_IXOTH #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) static of_mutex_t chownMutex; #endif #if !defined(HAVE_READDIR_R) && !defined(_WIN32) && defined(OF_HAVE_THREADS) static of_mutex_t readdirMutex; #endif int of_stat(OFString *path, of_stat_t *buffer) { #if defined(_WIN32) return _wstat64([path UTF16String], buffer); |
︙ | ︙ | |||
203 204 205 206 207 208 209 | @implementation OFFile + (void)initialize { if (self != [OFFile class]) return; #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) | | | | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | @implementation OFFile + (void)initialize { if (self != [OFFile class]) return; #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) if (!of_mutex_new(&chownMutex)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif #if !defined(HAVE_READDIR_R) && !defined(_WIN32) && defined(OF_HAVE_THREADS) if (!of_mutex_new(&readdirMutex)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif #ifdef __wii__ if (!fatInitDefault()) @throw [OFInitializationFailedException |
︙ | ︙ | |||
395 396 397 398 399 400 401 | encoding = [OFSystemInfo native8BitEncoding]; if ((dir = opendir([path cStringWithEncoding: encoding])) == NULL) @throw [OFOpenItemFailedException exceptionWithPath: path errNo: errno]; # if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) | | | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | encoding = [OFSystemInfo native8BitEncoding]; if ((dir = opendir([path cStringWithEncoding: encoding])) == NULL) @throw [OFOpenItemFailedException exceptionWithPath: path errNo: errno]; # if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) if (!of_mutex_lock(&readdirMutex)) @throw [OFLockFailedException exception]; # endif @try { for (;;) { struct dirent *dirent; # ifdef HAVE_READDIR_R |
︙ | ︙ | |||
444 445 446 447 448 449 450 | [files addObject: file]; objc_autoreleasePoolPop(pool); } } @finally { closedir(dir); # if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) | | | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | [files addObject: file]; objc_autoreleasePoolPop(pool); } } @finally { closedir(dir); # if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) if (!of_mutex_unlock(&readdirMutex)) @throw [OFUnlockFailedException exception]; # endif } #else void *pool = objc_autoreleasePoolPush(); HANDLE handle; WIN32_FIND_DATAW fd; |
︙ | ︙ | |||
606 607 608 609 610 611 612 | if (path == nil || (owner == nil && group == nil)) @throw [OFInvalidArgumentException exception]; encoding = [OFSystemInfo native8BitEncoding]; # ifdef OF_HAVE_THREADS | | | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | if (path == nil || (owner == nil && group == nil)) @throw [OFInvalidArgumentException exception]; encoding = [OFSystemInfo native8BitEncoding]; # ifdef OF_HAVE_THREADS if (!of_mutex_lock(&chownMutex)) @throw [OFLockFailedException exception]; @try { # endif if (owner != nil) { struct passwd *passwd; |
︙ | ︙ | |||
640 641 642 643 644 645 646 | group: group errNo: errno]; gid = group_->gr_gid; } # ifdef OF_HAVE_THREADS } @finally { | | | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | group: group errNo: errno]; gid = group_->gr_gid; } # ifdef OF_HAVE_THREADS } @finally { if (!of_mutex_unlock(&chownMutex)) @throw [OFUnlockFailedException exception]; } # endif if (chown([path cStringWithEncoding: encoding], uid, gid) != 0) @throw [OFChangeOwnerFailedException exceptionWithPath: path owner: owner |
︙ | ︙ |
Modified src/OFObject.m from [8a0142f57a] to [920a5b1adb].
︙ | ︙ | |||
226 227 228 229 230 231 232 233 | objc_setForwardHandler((IMP)&of_forward, (IMP)&of_forward_stret); #endif #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumerationMutationHandler); #endif #if defined(HAVE_ARC4RANDOM) | > > | | | | | > | | | | > | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | objc_setForwardHandler((IMP)&of_forward, (IMP)&of_forward_stret); #endif #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumerationMutationHandler); #endif of_hash_seed = 0; while (of_hash_seed == 0) { #if defined(HAVE_ARC4RANDOM) of_hash_seed = arc4random(); #elif defined(HAVE_RANDOM) struct timeval t; gettimeofday(&t, NULL); srandom((unsigned)(t.tv_sec ^ t.tv_usec)); of_hash_seed = (uint32_t)((random() << 16) | (random() & 0xFFFF)); #else struct timeval t; gettimeofday(&t, NULL); srand((unsigned)(t.tv_sec ^ t.tv_usec)); of_hash_seed = (uint32_t)((rand() << 16) | (rand() & 0xFFFF)); #endif } } + (void)unload { } + (void)initialize |
︙ | ︙ |
Modified src/OFProcess.m from [30416b7510] to [dc696d6c83].
︙ | ︙ | |||
564 565 566 567 568 569 570 | #ifndef _WIN32 if (_readPipe[0] != -1) close(_readPipe[0]); if (_writePipe[1] != -1) close(_writePipe[1]); if (_pid != -1) { | | | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | #ifndef _WIN32 if (_readPipe[0] != -1) close(_readPipe[0]); if (_writePipe[1] != -1) close(_writePipe[1]); if (_pid != -1) { kill(_pid, SIGTERM); waitpid(_pid, &_status, WNOHANG); } _pid = -1; _readPipe[0] = -1; _writePipe[1] = -1; #else |
︙ | ︙ |
Modified src/OFZIPArchive.m from [da28dbf09c] to [a813c350e7].
︙ | ︙ | |||
115 116 117 118 119 120 121 | *data += 8; *size -= 8; return field; } static uint32_t | | > > > > > > > > > > > > > > > | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | *data += 8; *size -= 8; return field; } static uint32_t calculateCRC32(uint32_t crc, uint8_t *bytes, size_t length) { size_t i; for (i = 0; i < length; i++) { uint_fast8_t j; crc ^= bytes[i]; for (j = 0; j < 8; j++) crc = (crc >> 1) ^ (CRC32_MAGIC & (~(crc & 1) + 1)); } return crc; } static void seekOrThrowInvalidFormat(OFSeekableStream *stream, of_offset_t offset, int whence) { @try { [stream seekToOffset: offset whence: whence]; } @catch (OFSeekFailedException *e) { if ([e errNo] == EINVAL) @throw [OFInvalidFormatException exception]; @throw e; } } @implementation OFZIPArchive + (instancetype)archiveWithSeekableStream: (OFSeekableStream*)stream { return [[[self alloc] initWithSeekableStream: stream] autorelease]; } |
︙ | ︙ | |||
201 202 203 204 205 206 207 | { void *pool = objc_autoreleasePoolPush(); uint16_t commentLength; of_offset_t offset = -22; bool valid = false; do { | < < < < < < | < < | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | { void *pool = objc_autoreleasePoolPush(); uint16_t commentLength; of_offset_t offset = -22; bool valid = false; do { seekOrThrowInvalidFormat(_stream, offset, SEEK_END); if ([_stream readLittleEndianInt32] == 0x06054B50) { valid = true; break; } } while (--offset >= -65557); |
︙ | ︙ | |||
240 241 242 243 244 245 246 | _centralDirectoryDisk == 0xFFFF || _centralDirectoryEntriesInDisk == 0xFFFF || _centralDirectoryEntries == 0xFFFF || _centralDirectorySize == 0xFFFFFFFF || _centralDirectoryOffset == 0xFFFFFFFF) { uint64_t offset64, size; | | < > | < | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | _centralDirectoryDisk == 0xFFFF || _centralDirectoryEntriesInDisk == 0xFFFF || _centralDirectoryEntries == 0xFFFF || _centralDirectorySize == 0xFFFFFFFF || _centralDirectoryOffset == 0xFFFFFFFF) { uint64_t offset64, size; seekOrThrowInvalidFormat(_stream, offset - 20, SEEK_END); if ([_stream readLittleEndianInt32] != 0x07064B50) { objc_autoreleasePoolPop(pool); return; } /* * FIXME: Handle number of the disk containing ZIP64 end of * central directory record. */ [_stream readLittleEndianInt32]; offset64 = [_stream readLittleEndianInt64]; if ((of_offset_t)offset64 != offset64) @throw [OFOutOfRangeException exception]; seekOrThrowInvalidFormat(_stream, (of_offset_t)offset64, SEEK_SET); if ([_stream readLittleEndianInt32] != 0x06064B50) @throw [OFInvalidFormatException exception]; size = [_stream readLittleEndianInt64]; if (size < 44) @throw [OFInvalidFormatException exception]; |
︙ | ︙ | |||
297 298 299 300 301 302 303 | { void *pool = objc_autoreleasePoolPush(); size_t i; if ((of_offset_t)_centralDirectoryOffset != _centralDirectoryOffset) @throw [OFOutOfRangeException exception]; | > | < | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | { void *pool = objc_autoreleasePoolPush(); size_t i; if ((of_offset_t)_centralDirectoryOffset != _centralDirectoryOffset) @throw [OFOutOfRangeException exception]; seekOrThrowInvalidFormat(_stream, (of_offset_t)_centralDirectoryOffset, SEEK_SET); _entries = [[OFMutableArray alloc] init]; _pathToEntryMap = [[OFMutableDictionary alloc] init]; for (i = 0; i < _centralDirectoryEntries; i++) { OFZIPArchiveEntry *entry = [[[OFZIPArchiveEntry alloc] OF_initWithStream: _stream] autorelease]; |
︙ | ︙ | |||
351 352 353 354 355 356 357 | [_lastReturnedStream release]; _lastReturnedStream = nil; offset64 = [entry OF_localFileHeaderOffset]; if ((of_offset_t)offset64 != offset64) @throw [OFOutOfRangeException exception]; | | < | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | [_lastReturnedStream release]; _lastReturnedStream = nil; offset64 = [entry OF_localFileHeaderOffset]; if ((of_offset_t)offset64 != offset64) @throw [OFOutOfRangeException exception]; seekOrThrowInvalidFormat(_stream, (of_offset_t)offset64, SEEK_SET); localFileHeader = [[[OFZIPArchive_LocalFileHeader alloc] initWithStream: _stream] autorelease]; if (![localFileHeader matchesEntry: entry]) @throw [OFInvalidFormatException exception]; if ((localFileHeader->_minVersionNeeded & 0xFF) > 45) { |
︙ | ︙ | |||
564 565 566 567 568 569 570 | min = (length < _size ? length : (size_t)_size); ret = [_decompressedStream readIntoBuffer: buffer length: min]; _size -= ret; } | | | 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | min = (length < _size ? length : (size_t)_size); ret = [_decompressedStream readIntoBuffer: buffer length: min]; _size -= ret; } _CRC32 = calculateCRC32(_CRC32, buffer, ret); return ret; } - (void)close { _closed = true; } @end |
Modified utils/ofhttp/ProgressBar.m from [e84b0f1e4e] to [ea91008bdd].
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #include <math.h> #ifdef HAVE_SYS_IOCTL_H # include <sys/ioctl.h> #endif #import "OFDate.h" #import "OFStdIOStream.h" #import "OFTimer.h" #import "ProgressBar.h" | > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #include <math.h> #include <unistd.h> #ifdef HAVE_SYS_IOCTL_H # include <sys/ioctl.h> #endif #ifdef HAVE_SYS_TERMIOS_H # include <sys/termios.h> #endif #import "OFDate.h" #import "OFStdIOStream.h" #import "OFTimer.h" #import "ProgressBar.h" |
︙ | ︙ |