Make major improvements to stdio
Buffering now has optimal performance, bugs have been fixed, and some missing apis have been introduced. This implementation is also now more production worthy since it's less brittle now in terms of system errors. That's going to help redbean since lua i/o is all based on stdio. See #97
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
* Like fseek(), this function can be used to restore a stream from the
|
||||
* EOF state, without reopening it.
|
||||
*/
|
||||
void rewind(FILE *stream) {
|
||||
fseek(stream, 0, SEEK_SET);
|
||||
void rewind(FILE *f) {
|
||||
fseek(f, 0, SEEK_SET);
|
||||
f->state = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user