stream: stream_reset

We can reuse the same stream by resetting it.  We don't delete the
cached data.
This commit is contained in:
2026-02-09 08:33:35 +00:00
committed by oreodave
parent 2238f348e1
commit f164427b47
2 changed files with 8 additions and 0 deletions

View File

@@ -100,6 +100,13 @@ stream_err_t stream_init_file(stream_t *stream, const char *name, FILE *pipe)
return STREAM_ERR_OK;
}
void stream_reset(stream_t *stream)
{
if (!stream)
return;
stream->position = 0;
}
void stream_stop(stream_t *stream)
{
if (!stream)