Differences From Artifact [0b28d6c4b4]:
- File
src/OFFile.m
— part of check-in
[f48ee629e3]
at
2008-12-10 17:53:03
on branch trunk
— Always use [self alloc] in + new.
This way, derivated classes are not forced to always override + new. (user: js, size: 3280) [annotate] [blame] [check-ins using]
To Artifact [e3b833eee4]:
- File
src/OFFile.m
— part of check-in
[c83137e7cd]
at
2008-12-11 13:43:35
on branch trunk
— Remove - close from OFStream protocol.
The reason is that closing a file isn't too useful, because an OFFile
object can't be reused, whereas an OFTCPSocket can. So only the
OFTCPSocket should have closed. Plus, we don't need to handle the case
that someone tried to read from / write to a closed OFFile. (user: js, size: 3186) [annotate] [blame] [check-ins using]
︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | + | } return self; } - free { fclose(fp); return [super free]; } - (BOOL)atEndOfFile { return (feof(fp) == 0 ? NO : YES); } |
︙ | |||
160 161 162 163 164 165 166 | 161 162 163 164 165 166 167 168 | - - - - - - - - - - | - (size_t)writeCString: (const char*)str { return [self writeNItems: strlen(str) ofSize: 1 fromBuffer: (const uint8_t*)str]; } |