CoreFW  Diff

Differences From Artifact [c9268ffce9]:

To Artifact [316847ca63]:


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->eof(stream)) {
			free(buf);

			if (stream->cache == NULL)
				return NULL;

			ret_len = stream->cache_len;








|







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
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_eof(void *ptr)
{
	CFWStream *stream = ptr;

	if (stream == NULL || stream->ops == NULL)
		return true;

	if (stream->cache != NULL)
		return false;

	return stream->ops->eof(stream);
}

void
cfw_stream_close(void *ptr)
{
	CFWStream *stream = ptr;








|









|







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;