Overview
Comment: | Remove writeWideCString as that's a bad idea.
Endianess, size etc. may differ from system to system. While this might |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
70874cf3c5542b71c172fae2d27f2112 |
User & Date: | js on 2008-12-07 03:06:33 |
Other Links: | manifest | tags |
Context
2008-12-07
| ||
10:24 | OFSocket -> OFTCPSocket. check-in: d1a5065e69 user: js tags: trunk | |
03:06 | Remove writeWideCString as that's a bad idea. check-in: 70874cf3c5 user: js tags: trunk | |
02:59 | glibc is broken once again. I guess no other libc is that broken... check-in: 6d069e2a83 user: js tags: trunk | |
Changes
Modified src/OFFile.h from [38c6717cee] to [4108e927d0].
︙ | ︙ | |||
168 169 170 171 172 173 174 | /** * Writes a C string into the file, without the trailing zero. * * \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; | < < < < < < < < | 168 169 170 171 172 173 174 175 | /** * Writes a C string into the file, without the trailing zero. * * \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; @end |
Modified src/OFFile.m from [9d35a4ce1a] to [44934e3ad8].
︙ | ︙ | |||
10 11 12 13 14 15 16 | */ #import "config.h" #import <stdio.h> #import <string.h> #import <unistd.h> | < | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | */ #import "config.h" #import <stdio.h> #import <string.h> #import <unistd.h> #import <sys/types.h> #import <sys/stat.h> #import "OFFile.h" #import "OFExceptions.h" |
︙ | ︙ | |||
159 160 161 162 163 164 165 | fromBuffer: buf]; } - (size_t)writeCString: (const char*)str { return [self writeNItems: strlen(str) ofSize: 1 | < < < < < < < | 158 159 160 161 162 163 164 165 166 167 | fromBuffer: buf]; } - (size_t)writeCString: (const char*)str { return [self writeNItems: strlen(str) ofSize: 1 fromBuffer: (const uint8_t*)str]; } @end |
Modified src/OFSocket.h from [896e2569bc] to [e31807ae92].
︙ | ︙ | |||
107 108 109 110 111 112 113 114 | * * \param buf The buffer from which the data is written to the file * \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; @end | > > > > > > > > | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | * * \param buf The buffer from which the data is written to the file * \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 |
Modified src/OFSocket.m from [8a25c414b4] to [9c27c4838b].
︙ | ︙ | |||
11 12 13 14 15 16 17 | #import "config.h" #import <stdio.h> #import <stdlib.h> #import <string.h> #import <unistd.h> | < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #import "config.h" #import <stdio.h> #import <stdlib.h> #import <string.h> #import <unistd.h> #import "OFSocket.h" #import "OFExceptions.h" @implementation OFSocketAddress + newWithHost: (const char*)host andPort: (uint16_t)port |
︙ | ︙ | |||
167 168 169 170 171 172 173 | } - (size_t)writeCString: (const char*)str { return [self writeNBytes: strlen(str) fromBuffer: (const uint8_t*)str]; } | < < < < < < < < < < < | 166 167 168 169 170 171 172 173 | } - (size_t)writeCString: (const char*)str { return [self writeNBytes: strlen(str) fromBuffer: (const uint8_t*)str]; } @end |
Modified src/OFStream.h from [6335fea124] to [1921fa4c55].
︙ | ︙ | |||
46 47 48 49 50 51 52 | /** * Writes a C string into the stream, without the trailing zero. * * \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; | < < < < < < < < | 46 47 48 49 50 51 52 53 | /** * Writes a C string into the stream, without the trailing zero. * * \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; @end |