Differences From Artifact [c9268ffce9]:
- File src/stream.c — part of check-in [168ba16eda] at 2012-09-30 01:02:03 on branch trunk — Add cfw_stream_write_line(). (user: js, size: 6667) [annotate] [blame] [check-ins using]
To Artifact [316847ca63]:
- File
src/stream.c
— part of check-in
[6893b9f5ab]
at
2012-09-30 01:34:46
on branch trunk
— Rename eof to at_end.
This is more fitting as end of file is not really true for a socket. (user: js, size: 6676) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
137 138 139 140 141 142 143 | /* Read and see if we get a newline or \0 */ if ((buf = malloc(BUFFER_SIZE)) == NULL) return NULL; for (;;) { | | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /* Read and see if we get a newline or \0 */ if ((buf = malloc(BUFFER_SIZE)) == NULL) return NULL; for (;;) { if (stream->ops->at_end(stream)) { free(buf); if (stream->cache == NULL) return NULL; ret_len = stream->cache_len; |
︙ | ︙ | |||
270 271 272 273 274 275 276 | } free(tmp); return true; } bool | | | | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | } free(tmp); return true; } bool cfw_stream_at_end(void *ptr) { CFWStream *stream = ptr; if (stream == NULL || stream->ops == NULL) return true; if (stream->cache != NULL) return false; return stream->ops->at_end(stream); } void cfw_stream_close(void *ptr) { CFWStream *stream = ptr; |
︙ | ︙ |