diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-02-02 13:56:33 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-02-02 13:56:33 -0500 |
commit | 8b3f2fa09e9241e20926c8171753a271c21ec93d (patch) | |
tree | a8bdff34505bfcf999467053dbfbf276bf7233f1 /src/stdio/freopen.c | |
parent | 3a9026cf8557c8efec34e652b6bf37ce49f12f86 (diff) |
first cut of tracking previous return values with ftell()/fseek() as POC
Diffstat (limited to 'src/stdio/freopen.c')
-rw-r--r-- | src/stdio/freopen.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index 3a1ef656..d431b0e3 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -96,6 +96,12 @@ FILE * freopen(const char * restrict filename, const char * restrict mode, FILE stream->buf = stream->ibuf; } + free(stream->valid_fpos); + stream->nvalid_fpos = 0; + + free(stream->valid_ftell); + stream->nvalid_ftell = 0; + stream->text = !(strchr(mode, 'b')); /* |