Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -323,11 +323,11 @@ src = [OFFile fileWithPath: from mode: @"rb"]; dest = [OFFile fileWithPath: to mode: @"wb"]; - while (![src atEndOfStream]) { + while (![src isAtEndOfStream]) { size_t len = [src readNBytes: 4096 intoBuffer: buf]; [dest writeNBytes: len fromBuffer: buf]; } @@ -455,11 +455,11 @@ fd = fd_; return self; } -- (BOOL)_atEndOfStream +- (BOOL)_isAtEndOfStream { if (fd == -1) return YES; return eos; Index: src/OFHash.h ================================================================== --- src/OFHash.h +++ src/OFHash.h @@ -14,15 +14,15 @@ /** * \brief A base class for classes providing hash functions. */ @interface OFHash: OFObject { - BOOL calculated; + BOOL isCalculated; } #ifdef OF_HAVE_PROPERTIES -@property (readonly) BOOL calculated; +@property (readonly) BOOL isCalculated; #endif /** * Adds a buffer to the hash to be calculated. * @@ -39,7 +39,7 @@ - (uint8_t*)digest; /** * \return A boolean whether the hash has already been calculated */ -- (BOOL)calculated; +- (BOOL)isCalculated; @end Index: src/OFHash.m ================================================================== --- src/OFHash.m +++ src/OFHash.m @@ -26,10 +26,10 @@ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- (BOOL)calculated +- (BOOL)isCalculated { - return calculated; + return isCalculated; } @end Index: src/OFMD5Hash.m ================================================================== --- src/OFMD5Hash.m +++ src/OFMD5Hash.m @@ -135,11 +135,11 @@ uint32_t t; if (size == 0) return; - if (calculated) + if (isCalculated) @throw [OFHashAlreadyCalculatedException newWithClass: isa]; /* Update bitcount */ t = bits[0]; if ((bits[0] = t + ((uint32_t)size << 3)) < t) @@ -186,11 +186,11 @@ - (uint8_t*)digest { uint8_t *p; size_t count; - if (calculated) + if (isCalculated) return (uint8_t*)buf; /* Compute number of bytes mod 64 */ count = (bits[0] >> 3) & 0x3F; @@ -224,10 +224,10 @@ ((uint32_t*)in)[15] = bits[1]; md5_transform(buf, (uint32_t*)in); OF_BSWAP32_V_IF_BE(buf, 4); - calculated = YES; + isCalculated = YES; return (uint8_t*)buf; } @end Index: src/OFSHA1Hash.m ================================================================== --- src/OFSHA1Hash.m +++ src/OFSHA1Hash.m @@ -148,11 +148,11 @@ ofSize: (size_t)size { if (size == 0) return; - if (calculated) + if (isCalculated) @throw [OFHashAlreadyCalculatedException newWithClass: isa]; sha1_update(state, &count, buffer, buf, size); } @@ -159,11 +159,11 @@ - (uint8_t*)digest { size_t i; char finalcount[8]; - if (calculated) + if (isCalculated) return digest; for (i = 0; i < 8; i++) /* Endian independent */ finalcount[i] = (char)((count >> ((7 - (i & 7)) * 8)) & 255); @@ -176,10 +176,10 @@ for (i = 0; i < OF_SHA1_DIGEST_SIZE; i++) digest[i] = (char)((state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); - calculated = YES; + isCalculated = YES; return digest; } @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -18,31 +18,31 @@ /** * \brief A base class for different types of streams. * * IMPORTANT: If you want to subclass this, override _readNBytes:intoBuffer:, - * _writeNBytes:fromBuffer: and _atEndOfStream, but nothing else. Those are not - * defined in the headers, but do the actual work. OFStream uses those and does - * all the caching and other stuff. If you override these methods without the - * _ prefix, you *WILL* break caching and get broken results! + * _writeNBytes:fromBuffer: and _isAtEndOfStream, but nothing else. Those are + * not defined in the headers, but do the actual work. OFStream uses those and + * does all the caching and other stuff. If you override these methods without + * the _ prefix, you *WILL* break caching and get broken results! */ @interface OFStream: OFObject { @public char *cache; @protected char *wBuffer; size_t cacheLen, wBufferLen; - BOOL bufferWrites;; + BOOL buffersWrites; } /** * Returns a boolean whether the end of the stream has been reached. * * \return A boolean whether the end of the stream has been reached */ -- (BOOL)atEndOfStream; +- (BOOL)isAtEndOfStream; /** * Reads at most size bytes from the stream into a buffer. * * \param buf The buffer into which the data is read @@ -198,18 +198,18 @@ withEncoding: (enum of_string_encoding)encoding; /** * \return A boolean whether writes are buffered */ -- (BOOL)bufferWrites; +- (BOOL)buffersWrites; /** * Enables or disables the write buffer. * * \param enable Whether the write buffer should be enabled or disabled */ -- (void)setBufferWrites: (BOOL)enable; +- (void)setBuffersWrites: (BOOL)enable; /** * Writes everythig in the write buffer to the stream. */ - (void)flushWriteBuffer; Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -40,11 +40,11 @@ wBuffer = NULL; return self; } -- (BOOL)_atEndOfStream +- (BOOL)_isAtEndOfStream { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } @@ -60,16 +60,16 @@ { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } -- (BOOL)atEndOfStream +- (BOOL)isAtEndOfStream { if (cache != NULL) return NO; - return [self _atEndOfStream]; + return [self _isAtEndOfStream]; } - (size_t)readNBytes: (size_t)size intoBuffer: (char*)buf { @@ -210,11 +210,11 @@ a = [OFDataArray dataArrayWithItemSize: 1]; buf = [self allocMemoryWithSize: of_pagesize]; @try { - while (![self atEndOfStream]) { + while (![self isAtEndOfStream]) { size_t size; size = [self readNBytes: of_pagesize intoBuffer: buf]; [a addNItems: size @@ -270,11 +270,11 @@ /* Read until we get a newline or \0 */ tmp = [self allocMemoryWithSize: of_pagesize]; @try { for (;;) { - if ([self _atEndOfStream]) { + if ([self _isAtEndOfStream]) { if (cache == NULL) return nil; ret_len = cacheLen; @@ -429,11 +429,11 @@ /* Read until we get the delimiter or \0 */ tmp = [self allocMemoryWithSize: of_pagesize]; @try { for (;;) { - if ([self _atEndOfStream]) { + if ([self _isAtEndOfStream]) { if (cache == NULL) return nil; ret = [OFString stringWithCString: cache encoding: encoding @@ -513,18 +513,18 @@ /* Get rid of a warning, never reached anyway */ assert(0); } -- (BOOL)bufferWrites +- (BOOL)buffersWrites { - return bufferWrites; + return buffersWrites; } -- (void)setBufferWrites: (BOOL)enable +- (void)setBuffersWrites: (BOOL)enable { - bufferWrites = enable; + buffersWrites = enable; } - (void)flushWriteBuffer { if (wBuffer == NULL) @@ -539,11 +539,11 @@ } - (size_t)writeNBytes: (size_t)size fromBuffer: (const char*)buf { - if (!bufferWrites) + if (!buffersWrites) return [self _writeNBytes: size fromBuffer: buf]; else { wBuffer = [self resizeMemory: wBuffer toSize: wBufferLen + size]; Index: src/OFStreamSocket.m ================================================================== --- src/OFStreamSocket.m +++ src/OFStreamSocket.m @@ -49,11 +49,11 @@ + socket { return [[[self alloc] init] autorelease]; } -- (BOOL)_atEndOfStream +- (BOOL)_isAtEndOfStream { return eos; } - (size_t)_readNBytes: (size_t)size Index: tests/OFMD5HashTests.m ================================================================== --- tests/OFMD5HashTests.m +++ tests/OFMD5HashTests.m @@ -34,12 +34,11 @@ OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"rb"]; TEST(@"+[md5Hash]", (md5 = [OFMD5Hash md5Hash])) - - while (![f atEndOfStream]) { + while (![f isAtEndOfStream]) { char buf[64]; size_t len = [f readNBytes: 64 intoBuffer: buf]; [md5 updateWithBuffer: buf ofSize: len]; Index: tests/OFSHA1HashTests.m ================================================================== --- tests/OFSHA1HashTests.m +++ tests/OFSHA1HashTests.m @@ -35,11 +35,11 @@ OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"rb"]; TEST(@"+[sha1Hash]", (sha1 = [OFSHA1Hash sha1Hash])) - while (![f atEndOfStream]) { + while (![f isAtEndOfStream]) { char buf[64]; size_t len = [f readNBytes: 64 intoBuffer: buf]; [sha1 updateWithBuffer: buf ofSize: len]; Index: tests/OFStreamTests.m ================================================================== --- tests/OFStreamTests.m +++ tests/OFStreamTests.m @@ -26,11 +26,11 @@ int state; } @end @implementation StreamTester -- (BOOL)_atEndOfStream +- (BOOL)_isAtEndOfStream { return (state > 1 ? YES : NO); } - (size_t)_readNBytes: (size_t)size