Add intfstream_putc
This commit is contained in:
parent
2bb90f3702
commit
bf017e3a0c
|
@ -74,6 +74,8 @@ void intfstream_rewind(intfstream_internal_t *intf);
|
||||||
|
|
||||||
size_t intfstream_tell(intfstream_internal_t *intf);
|
size_t intfstream_tell(intfstream_internal_t *intf);
|
||||||
|
|
||||||
|
void intfstream_putc(intfstream_internal_t *intf, int c);
|
||||||
|
|
||||||
int intfstream_close(intfstream_internal_t *intf);
|
int intfstream_close(intfstream_internal_t *intf);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -250,3 +250,19 @@ void intfstream_rewind(intfstream_internal_t *intf)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void intfstream_putc(intfstream_internal_t *intf, int c)
|
||||||
|
{
|
||||||
|
if (!intf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (intf->type)
|
||||||
|
{
|
||||||
|
case INTFSTREAM_FILE:
|
||||||
|
filestream_putc(intf->file.fp, c);
|
||||||
|
break;
|
||||||
|
case INTFSTREAM_MEMORY:
|
||||||
|
memstream_putc(intf->memory.fp, c);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue