@@ -120,11 +120,11 @@ * @param buffer The buffer into which the data is read * @param length The length of the data that should be read at most. * The buffer *must* be *at least* this big! * @return The number of bytes read */ -- (size_t)readIntoBuffer: (void*)buffer +- (size_t)readIntoBuffer: (void *)buffer length: (size_t)length; /*! * @brief Reads exactly the specified length bytes from the stream into a * buffer. @@ -138,11 +138,11 @@ * * @param buffer The buffer into which the data is read * @param length The length of the data that should be read. * The buffer *must* be *at least* this big! */ - - (void)readIntoBuffer: (void*)buffer + - (void)readIntoBuffer: (void *)buffer exactLength: (size_t)length; #ifdef OF_HAVE_SOCKETS /*! * @brief Asynchronously reads *at most* size bytes from the stream into a @@ -169,11 +169,11 @@ * false from the method. * @param selector The selector to call on the target. The signature must be * `bool (OFStream *stream, void *buffer, size_t length, * OFException *exception)`. */ -- (void)asyncReadIntoBuffer: (void*)buffer +- (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length target: (id)target selector: (SEL)selector; /*! @@ -199,11 +199,11 @@ * false from the method. * @param selector The selector to call on the target. The signature must be * `bool (OFStream *stream, void *buffer, size_t size, * OFException *exception)`. */ -- (void)asyncReadIntoBuffer: (void*)buffer +- (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length target: (id)target selector: (SEL)selector; # ifdef OF_HAVE_BLOCKS @@ -228,11 +228,11 @@ * If the block returns true, it will be called again with the same * buffer and maximum length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return false from the block. */ -- (void)asyncReadIntoBuffer: (void*)buffer +- (void)asyncReadIntoBuffer: (void *)buffer length: (size_t)length block: (of_stream_async_read_block_t)block; /*! * @brief Asynchronously reads exactly the specified length bytes from the @@ -253,11 +253,11 @@ * If the block returns true, it will be called again with the same * buffer and exact length when more data has been received. If * you want the next block in the queue to handle the data * received next, you need to return false from the block. */ - - (void)asyncReadIntoBuffer: (void*)buffer + - (void)asyncReadIntoBuffer: (void *)buffer exactLength: (size_t)length block: (of_stream_async_read_block_t)block; # endif #endif @@ -331,11 +331,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * uint16_ts * @param count The number of uint16_ts to read * @return The number of bytes read */ -- (size_t)readBigEndianInt16sIntoBuffer: (uint16_t*)buffer +- (size_t)readBigEndianInt16sIntoBuffer: (uint16_t *)buffer count: (size_t)count; /*! * @brief Reads the specified number of uint32_ts from the stream which are * encoded in big endian. @@ -346,11 +346,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * uint32_ts * @param count The number of uint32_ts to read * @return The number of bytes read */ -- (size_t)readBigEndianInt32sIntoBuffer: (uint32_t*)buffer +- (size_t)readBigEndianInt32sIntoBuffer: (uint32_t *)buffer count: (size_t)count; /*! * @brief Reads the specified number of uint64_ts from the stream which are * encoded in big endian. @@ -361,11 +361,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * uint64_ts * @param count The number of uint64_ts to read * @return The number of bytes read */ -- (size_t)readBigEndianInt64sIntoBuffer: (uint64_t*)buffer +- (size_t)readBigEndianInt64sIntoBuffer: (uint64_t *)buffer count: (size_t)count; /*! * @brief Reads the specified number of floats from the stream which are encoded * in big endian. @@ -376,11 +376,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * floats * @param count The number of floats to read * @return The number of bytes read */ -- (size_t)readBigEndianFloatsIntoBuffer: (float*)buffer +- (size_t)readBigEndianFloatsIntoBuffer: (float *)buffer count: (size_t)count; /*! * @brief Reads the specified number of doubles from the stream which are * encoded in big endian. @@ -391,11 +391,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * doubles * @param count The number of doubles to read * @return The number of bytes read */ -- (size_t)readBigEndianDoublesIntoBuffer: (double*)buffer +- (size_t)readBigEndianDoublesIntoBuffer: (double *)buffer count: (size_t)count; /*! * @brief Reads a uint16_t from the stream which is encoded in little endian. * @@ -456,11 +456,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * uint16_ts * @param count The number of uint16_ts to read * @return The number of bytes read */ -- (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t*)buffer +- (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t *)buffer count: (size_t)count; /*! * @brief Reads the specified number of uint32_ts from the stream which are * encoded in little endian. @@ -471,11 +471,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * uint32_ts * @param count The number of uint32_ts to read * @return The number of bytes read */ -- (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t*)buffer +- (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t *)buffer count: (size_t)count; /*! * @brief Reads the specified number of uint64_ts from the stream which are * encoded in little endian. @@ -486,11 +486,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * uint64_ts * @param count The number of uint64_ts to read * @return The number of bytes read */ -- (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t*)buffer +- (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t *)buffer count: (size_t)count; /*! * @brief Reads the specified number of floats from the stream which are * encoded in little endian. @@ -501,11 +501,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * floats * @param count The number of floats to read * @return The number of bytes read */ -- (size_t)readLittleEndianFloatsIntoBuffer: (float*)buffer +- (size_t)readLittleEndianFloatsIntoBuffer: (float *)buffer count: (size_t)count; /*! * @brief Reads the specified number of doubles from the stream which are * encoded in little endian. @@ -516,11 +516,11 @@ * @param buffer A buffer of sufficient size to store the specified number of * doubles * @param count The number of doubles to read * @return The number of bytes read */ -- (size_t)readLittleEndianDoublesIntoBuffer: (double*)buffer +- (size_t)readLittleEndianDoublesIntoBuffer: (double *)buffer count: (size_t)count; /*! * @brief Reads the specified number of items with an item size of 1 from the * stream and returns them in an OFDataArray. @@ -529,11 +529,11 @@ * Otherwise you will get an exception! * * @param count The number of items to read * @return An OFDataArray with count items. */ -- (OFDataArray*)readDataArrayWithCount: (size_t)count; +- (OFDataArray *)readDataArrayWithCount: (size_t)count; /*! * @brief Reads the specified number of items with the specified item size from * the stream and returns them in an OFDataArray. * @@ -542,20 +542,20 @@ * * @param itemSize The size of each item * @param count The number of items to read * @return An OFDataArray with count items. */ -- (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize - count: (size_t)count; +- (OFDataArray *)readDataArrayWithItemSize: (size_t)itemSize + count: (size_t)count; /*! * @brief Returns an OFDataArray with all the remaining data of the stream. * * @return An OFDataArray with an item size of 1 with all the data of the * stream until the end of the stream is reached. */ -- (OFDataArray*)readDataArrayTillEndOfStream; +- (OFDataArray *)readDataArrayTillEndOfStream; /*! * @brief Reads a string with the specified length from the stream. * * If `\0` appears in the stream, the string will be truncated at the `\0` and @@ -567,11 +567,11 @@ * Otherwise you will get an exception! * * @param length The length (in bytes) of the string to read from the stream * @return A string with the specified length */ -- (OFString*)readStringWithLength: (size_t)length; +- (OFString *)readStringWithLength: (size_t)length; /*! * @brief Reads a string with the specified encoding and length from the stream. * * If a `\0` appears in the stream, the string will be truncated at the `\0` @@ -584,30 +584,30 @@ * * @param encoding The encoding of the string to read from the stream * @param length The length (in bytes) of the string to read from the stream * @return A string with the specified length */ -- (OFString*)readStringWithLength: (size_t)length - encoding: (of_string_encoding_t)encoding; +- (OFString *)readStringWithLength: (size_t)length + encoding: (of_string_encoding_t)encoding; /*! * @brief Reads until a newline, `\0` or end of stream occurs. * * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ -- (nullable OFString*)readLine; +- (nullable OFString *)readLine; /*! * @brief Reads with the specified encoding until a newline, `\0` or end of * stream occurs. * * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ -- (nullable OFString*)readLineWithEncoding: (of_string_encoding_t)encoding; +- (nullable OFString *)readLineWithEncoding: (of_string_encoding_t)encoding; #ifdef OF_HAVE_SOCKETS /*! * @brief Asynchronously reads until a newline, `\0`, end of stream or an * exception occurs. @@ -688,11 +688,11 @@ * `nil` if no complete line has been received yet. * * @return The line that was read, autoreleased, or `nil` if the line is not * complete yet */ -- (nullable OFString*)tryReadLine; +- (nullable OFString *)tryReadLine; /*! * @brief Tries to read a line from the stream with the specified encoding (see * @ref readLineWithEncoding:) and returns `nil` if no complete line has * been received yet. @@ -699,21 +699,21 @@ * * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the line is not * complete yet */ -- (nullable OFString*)tryReadLineWithEncoding: (of_string_encoding_t)encoding; +- (nullable OFString *)tryReadLineWithEncoding: (of_string_encoding_t)encoding; /*! * @brief Reads until the specified string or `\0` is found or the end of * stream occurs. * * @param delimiter The delimiter * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ -- (nullable OFString*)readTillDelimiter: (OFString*)delimiter; +- (nullable OFString *)readTillDelimiter: (OFString *)delimiter; /*! * @brief Reads until the specified string or `\0` is found or the end of * stream occurs. * @@ -720,12 +720,12 @@ * @param delimiter The delimiter * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ -- (nullable OFString*)readTillDelimiter: (OFString*)delimiter - encoding: (of_string_encoding_t)encoding; +- (nullable OFString *)readTillDelimiter: (OFString *)delimiter + encoding: (of_string_encoding_t)encoding; /*! * @brief Tries to reads until the specified string or `\0` is found or the end * of stream (see @ref readTillDelimiter:) and returns `nil` if not * enough data has been received yet. @@ -732,11 +732,11 @@ * * @param delimiter The delimiter * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ -- (nullable OFString*)tryReadTillDelimiter: (OFString*)delimiter; +- (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter; /*! * @brief Tries to read until the specified string or `\0` is found or the end * of stream occurs (see @ref readTillDelimiter:encoding:) and returns * `nil` if not enough data has been received yet. @@ -744,12 +744,12 @@ * @param delimiter The delimiter * @param encoding The encoding used by the stream * @return The line that was read, autoreleased, or `nil` if the end of the * stream has been reached. */ -- (nullable OFString*)tryReadTillDelimiter: (OFString*)delimiter - encoding: (of_string_encoding_t)encoding; +- (nullable OFString *)tryReadTillDelimiter: (OFString *)delimiter + encoding: (of_string_encoding_t)encoding; /*! * @brief Returns a boolean whether writes are buffered. * * @return A boolean whether writes are buffered @@ -772,11 +772,11 @@ * @brief Writes from a buffer into the stream. * * @param buffer The buffer from which the data is written to the stream * @param length The length of the data that should be written */ -- (void)writeBuffer: (const void*)buffer +- (void)writeBuffer: (const void *)buffer length: (size_t)length; /*! * @brief Writes a uint8_t into the stream. * @@ -826,11 +826,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of uint16_ts to write * @return The number of bytes written to the stream */ -- (size_t)writeBigEndianInt16s: (const uint16_t*)buffer +- (size_t)writeBigEndianInt16s: (const uint16_t *)buffer count: (size_t)count; /*! * @brief Writes the specified number of uint32_ts into the stream, encoded in * big endian. @@ -838,11 +838,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of uint32_ts to write * @return The number of bytes written to the stream */ -- (size_t)writeBigEndianInt32s: (const uint32_t*)buffer +- (size_t)writeBigEndianInt32s: (const uint32_t *)buffer count: (size_t)count; /*! * @brief Writes the specified number of uint64_ts into the stream, encoded in * big endian. @@ -850,11 +850,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of uint64_ts to write * @return The number of bytes written to the stream */ -- (size_t)writeBigEndianInt64s: (const uint64_t*)buffer +- (size_t)writeBigEndianInt64s: (const uint64_t *)buffer count: (size_t)count; /*! * @brief Writes the specified number of floats into the stream, encoded in big * endian. @@ -862,11 +862,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of floats to write * @return The number of bytes written to the stream */ -- (size_t)writeBigEndianFloats: (const float*)buffer +- (size_t)writeBigEndianFloats: (const float *)buffer count: (size_t)count; /*! * @brief Writes the specified number of doubles into the stream, encoded in * big endian. @@ -874,11 +874,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of doubles to write * @return The number of bytes written to the stream */ -- (size_t)writeBigEndianDoubles: (const double*)buffer +- (size_t)writeBigEndianDoubles: (const double *)buffer count: (size_t)count; /*! * @brief Writes a uint16_t into the stream, encoded in little endian. * @@ -921,11 +921,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of uint16_ts to write * @return The number of bytes written to the stream */ -- (size_t)writeLittleEndianInt16s: (const uint16_t*)buffer +- (size_t)writeLittleEndianInt16s: (const uint16_t *)buffer count: (size_t)count; /*! * @brief Writes the specified number of uint32_ts into the stream, encoded in * little endian. @@ -933,11 +933,11 @@ * @param count The number of uint32_ts to write * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @return The number of bytes written to the stream */ -- (size_t)writeLittleEndianInt32s: (const uint32_t*)buffer +- (size_t)writeLittleEndianInt32s: (const uint32_t *)buffer count: (size_t)count; /*! * @brief Writes the specified number of uint64_ts into the stream, encoded in * little endian. @@ -945,11 +945,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of uint64_ts to write * @return The number of bytes written to the stream */ -- (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer +- (size_t)writeLittleEndianInt64s: (const uint64_t *)buffer count: (size_t)count; /*! * @brief Writes the specified number of floats into the stream, encoded in * little endian. @@ -957,11 +957,11 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of floats to write * @return The number of bytes written to the stream */ -- (size_t)writeLittleEndianFloats: (const float*)buffer +- (size_t)writeLittleEndianFloats: (const float *)buffer count: (size_t)count; /*! * @brief Writes the specified number of doubles into the stream, encoded in * little endian. @@ -969,81 +969,83 @@ * @param buffer The buffer from which the data is written to the stream after * it has been byte swapped if necessary * @param count The number of doubles to write * @return The number of bytes written to the stream */ -- (size_t)writeLittleEndianDoubles: (const double*)buffer +- (size_t)writeLittleEndianDoubles: (const double *)buffer count: (size_t)count; /*! * @brief Writes from an OFDataArray into the stream. * * @param dataArray The OFDataArray to write into the stream * @return The number of bytes written */ -- (size_t)writeDataArray: (OFDataArray*)dataArray; +- (size_t)writeDataArray: (OFDataArray *)dataArray; /*! * @brief Writes a string into the stream, without the trailing zero. * * @param string The string from which the data is written to the stream * @return The number of bytes written */ -- (size_t)writeString: (OFString*)string; +- (size_t)writeString: (OFString *)string; /*! * @brief Writes a string into the stream in the specified encoding, without * the trailing zero. * * @param string The string from which the data is written to the stream * @param encoding The encoding in which to write the string to the stream * @return The number of bytes written */ -- (size_t)writeString: (OFString*)string +- (size_t)writeString: (OFString *)string encoding: (of_string_encoding_t)encoding; /*! * @brief Writes a string into the stream with a trailing newline. * * @param string The string from which the data is written to the stream * @return The number of bytes written */ -- (size_t)writeLine: (OFString*)string; +- (size_t)writeLine: (OFString *)string; /*! * @brief Writes a string into the stream in the specified encoding with a * trailing newline. * * @param string The string from which the data is written to the stream * @param encoding The encoding in which to write the string to the stream * @return The number of bytes written */ -- (size_t)writeLine: (OFString*)string +- (size_t)writeLine: (OFString *)string encoding: (of_string_encoding_t)encoding; /*! * @brief Writes a formatted string into the stream. * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects, %C for of_unichar_t and %S for const of_unichar_t*. + * See printf for the format syntax. As an addition, `%@` is available as + * format specifier for objects, `%C` for `of_unichar_t` and `%S` for + * `const of_unichar_t *`. * * @param format A string used as format * @return The number of bytes written */ -- (size_t)writeFormat: (OFConstantString*)format, ...; +- (size_t)writeFormat: (OFConstantString *)format, ...; /*! * @brief Writes a formatted string into the stream. * - * See printf for the format syntax. As an addition, %@ is available as format - * specifier for objects, %C for of_unichar_t and %S for const of_unichar_t*. + * See printf for the format syntax. As an addition, `%@` is available as + * format specifier for objects, `%C` for `of_unichar_t` and `%S` for + * `const of_unichar_t *`. * * @param format A string used as format * @param arguments The arguments used in the format string * @return The number of bytes written */ -- (size_t)writeFormat: (OFConstantString*)format +- (size_t)writeFormat: (OFConstantString *)format arguments: (va_list)arguments; /*! * @brief Returns whether data is present in the internal read buffer. * @@ -1108,11 +1110,11 @@ * unread. * * @param buffer The buffer to unread * @param length The length of the buffer to unread */ -- (void)unreadFromBuffer: (const void*)buffer +- (void)unreadFromBuffer: (const void *)buffer length: (size_t)length; /*! * @brief Closes the stream. * @@ -1130,11 +1132,11 @@ * * @param buffer The buffer for the data to read * @param length The length of the buffer * @return The number of bytes read */ -- (size_t)lowlevelReadIntoBuffer: (void*)buffer +- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length; /*! * @brief Performs a lowlevel write. * @@ -1144,11 +1146,11 @@ * subclassing! * * @param buffer The buffer with the data to write * @param length The length of the data to write */ -- (void)lowlevelWriteBuffer: (const void*)buffer +- (void)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length; /*! * @brief Returns whether the lowlevel is at the end of the stream. *