Index: src/OFFile.h ================================================================== --- src/OFFile.h +++ src/OFFile.h @@ -170,14 +170,6 @@ * * \param str The C string from which the data is written to the file * \return The number of bytes written */ - (size_t)writeCString: (const char*)str; - -/** - * Writes a C string into the file, without the trailing zero. - * - * \param str The wide C string from which the data is written to the file - * \return The number of bytes written - */ -- (size_t)writeWideCString: (const wchar_t*)str; @end Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -12,11 +12,10 @@ #import "config.h" #import #import #import -#include /* include due to glibc brokenness */ #import #import #import "OFFile.h" @@ -161,15 +160,8 @@ - (size_t)writeCString: (const char*)str { return [self writeNItems: strlen(str) ofSize: 1 - fromBuffer: (const uint8_t*)str]; -} - -- (size_t)writeWideCString: (const wchar_t*)str -{ - return [self writeNItems: wcslen(str) - ofSize: sizeof(wchar_t) fromBuffer: (const uint8_t*)str]; } @end Index: src/OFSocket.h ================================================================== --- src/OFSocket.h +++ src/OFSocket.h @@ -109,6 +109,14 @@ * \param size The size of the data that should be written * \return The number of bytes written */ - (size_t)writeNBytes: (size_t)size fromBuffer: (const uint8_t*)buf; + +/** + * Sends a C string, without the trailing zero. + * + * \param str The C string from which the data is sent + * \return The number of bytes written + */ +- (size_t)writeCString: (const char*)str; @end Index: src/OFSocket.m ================================================================== --- src/OFSocket.m +++ src/OFSocket.m @@ -13,11 +13,10 @@ #import #import #import #import -#include /* include due to glibc brokenness */ #import "OFSocket.h" #import "OFExceptions.h" @implementation OFSocketAddress @@ -169,17 +168,6 @@ - (size_t)writeCString: (const char*)str { return [self writeNBytes: strlen(str) fromBuffer: (const uint8_t*)str]; } - -- (size_t)writeWideCString: (const wchar_t*)str -{ - size_t len = wcslen(str); - - if (len > SIZE_MAX / sizeof(wchar_t)) - [[OFOutOfRangeException newWithObject: self] raise]; - - return [self writeNBytes: len * sizeof(wchar_t) - fromBuffer: (const uint8_t*)str]; -} @end Index: src/OFStream.h ================================================================== --- src/OFStream.h +++ src/OFStream.h @@ -48,14 +48,6 @@ * * \param str The C string from which the data is written to the stream * \return The number of bytes written */ - (size_t)writeCString: (const char*)str; - -/** - * Writes a C string into the stream, without the trailing zero. - * - * \param str The wide C string from which the data is written to the stream - * \return The number of bytes written - */ -- (size_t)writeWideCString: (const wchar_t*)str; @end