Add intfstream_rewind

This commit is contained in:
twinaphex 2016-04-07 02:27:33 +02:00
parent ea037799a4
commit 99a9769014
2 changed files with 15 additions and 0 deletions

View File

@ -70,4 +70,6 @@ int intfstream_getc(intfstream_internal_t *intf);
int intfstream_seek(intfstream_internal_t *intf,
int offset, int whence);
void intfstream_rewind(intfstream_internal_t *intf);
#endif

View File

@ -204,3 +204,16 @@ int intfstream_getc(intfstream_internal_t *intf)
return 0;
}
void intfstream_rewind(intfstream_internal_t *intf)
{
switch (intf->type)
{
case INTFSTREAM_FILE:
filestream_rewind(intf->file.fp);
break;
case INTFSTREAM_MEMORY:
memstream_rewind(intf->memory.fp);
break;
}
}